Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
Redgate SQL Prompt
The Voice of the DBA
 

Daily Coping Tip

Make time to do something you really enjoy

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Would You Move For a Job?

Today we have a guest editorial from Andy Warren as Steve is on vacation. This was originally published on 4 Apr 2016.

It’s a fun question to ask to help understand where someone is in life and how they see life – would you move for a job? Assuming the salary adjusted for the cost of living is equivalent or better, would you be willing to move to a different place if you saw the right opportunity? That opportunity might be truly more money, a promotion of some type, or maybe the chance to work for a mega company with tons of resources. Or maybe it’s about where – you long for cold weather, or warm weather, urban transit, night life, or something else.

What’s my answer? Nope, not moving for a job. I might at some point (hard to envision!) leave Orlando, but I’d be moving to some place I wanted to go (Sarasota maybe) or at least a type of place I wanted to go (warm weather, sunny). All kinds of factors go into that. Stability for the kids in school, kids being close to grandma, owning a home, family in the area are the obvious ones for me, but if you dig deeper it’s more about how I approach risk and change. I’m not opposed to risk, yet clearly I am! I would see deciding to move and then finding a job to support it as reasonable, but not moving just to take a job. Strange isn’t it?

Years ago I met a friend who travelled a lot and only booked his hotel one night at a time. If he was in town multiple days he would go down each morning ready to check out and would ask if they had the same rate or better for another day. If they did, he would stay and if not, he checked out and then later in the day he’d book a room for that night. I’d find it stressful, he found it invigorating. I have no doubt he would move for a job and if it didn’t work out he would just move again. I admire that confidence and outlook – it’s just not me, at least not yet.

It’s a question with no right answer. Having set some boundaries about re-locating and even commuting limits me, but it does so in a way that supports the things I value. I can see someone else looking at moving as a way to support their values.

What about you? Would you, or have you moved for a job? Was it more or less stressful than expected? Advice for those trying to decide if considering if moving should be an option during their job search?

Andy Warren

Join the debate, and respond to today's editorial on the forums

Redgate SQL Prompt
 
 Featured Contents

SQL Server on Amazon RDS vs SQL Server on Amazon EC2

Br. Kenneth Igiri from SQLServerCentral.com

Exploring briefly the difference between using Amazon Machine Images running SQL Server and using SQL Server instances on Amazon's Relational Database Service.

Posting SQL Server Notifications to Slack

Additional Articles from MSSQLTips.com

In this article we look at how to send Slack notifications when certain events occur in a SQL Server database.

From the SQL Server Central Blogs - Workload Replay for Azure SQL Database and Amazon RDS

jsterrett from John Sterrett

Want to make sure you don’t have errors, validate performance, and save money while making changes with Azure SQL Database, Azure SQL Managed Instance, SQL Server RDS in Amazon...

From the SQL Server Central Blogs - Failing SQL Agent Jobs – Part 2

gbargsley from GarryBargsley

Welcome to Part 2 in the series about SQL Server Agent Job Failures. In this part you are going to learn how to build an HTML report with Failed...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Getting the Remote URL in Git

I have been working with a repository in git, and am having an issue. I want to delete the repo and then re-clone it, but I can't remember where the repo is located. I deal with so many, that I'd like to quickly just get the URL. How can I do that in git?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

File Backups and Offline Files

I have a database on SQL Server 2019 that has two filegroups. In the Archive filegroup, I have three files: FGArchive1, FGArchive2, and FGArchive3. I take Archive 1 offline with this code:

ALTER DATABASE FGTest MODIFY FILE (NAME = N'FGArchive1', OFFLINE)
GO

What happens if I try to run a backup of this file with this code?

BACKUP DATABASE [FGTest] FILE = N'FGArchive1' 
TO  DISK = N'D:\SQLBackup\FGARchive1.bak' 
WITH NOFORMAT, INIT,  NAME = N'FGTest-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

 

Answer: An error is returned as the file is offline

Explanation: An error is returned in this case, as the file is offline. Ref: Full File Backups - https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/full-file-backups-sql-server?view=sql-server-ver15  

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Administration
Basic Availability Groups and AG Listener - Hi Can anybody tell me, when setting up Basic Availability Groups in a 2 node cluster, do you require a separate listener for each DB you create into a new B.A.G ? (or could the app just connect via cluster ip?) Thanks
Replication - I would like to know if any one in this group has worked with Qlik attunity Replicate it is a Data Replication Software. Thanks in Advance!
How does sql server agent access the azure storage blob - Good morning all , I must configure an automated backup to an azure blob storage in the backup script I have correctly configured the credential now what right is needed for the sql server agent startup account to access the storage azure blob thank you for your help
SQL Server 2017 - Development
How long will a view stay cached in memory? - I've inherited a stored procedure that is using a view several times to load temp tables. I'm thinking I can increase performance by loading a temp table with the data from the view and then use the temp table instead of the view. Im just not sure if once a view is called if it […]
SQL Server 2016 - Development and T-SQL
SQL Server grab data for multiple rows from two tables - So here's the two tables I'm working with StockItem: ItemID SKU MSKU -------------------- ------------------------------ ------------------------- 36414 SWR0060 14859140 4220.12.010 220.12.010 14860211 6220.12.010 220.12.010 47717413 6000.22.010 6000.22.XXX 102244764 SWR-SPIGOT SWR-SPIGOTS 115377648 SWR-SPIGOTBLA SWR-SPIGOTS 115381142 SWR-SPIGOTCOP SWR-SPIGOTS 116112478 6000.22.030 6000.22.XXX 116112701 6000.22.050 6000.22.XXX 119263276 SWR-SPIGOTAG SWR-SPIGOTS StockItemMemo: ItemID MemoText -------------------- ---------------------------------------- 36414 Title:Professional C7 Steel Wire Rope […]
SUM and JOIN 2 columns with different tables but did not SUM Qty - Good day! Need help re SUM and JOIN 2 columns with different tables but did not SUM qty and duplicates row result here's the sample data tables; Transfer Shipment table; TransTO - TransFROM -  ItemNo   -   Desc   -   Desc2   -   VariantCode   -   Qty Location1      HO               Item01         Active      Black […]
Development - SQL Server 2014
How to prioritize the phone nos values in three columns. - Hello Evening please see below code for sample data CREATE TABLE PHONENOS (CustID Varchar(10), MobilePhone bigint, LandPhone bigint, OfficePhone bigint) INSERT INTO PHONENOS (100030, 2001231234, 2011231234, 2561231234) INSERT INTO PHONENOS (100040, 9001231234, NULL, 9561231234) INSERT INTO PHONENOS (100050, 8001231234, 8011231234, NULL) INSERT INTO PHONENOS (100060, NULL, 2017231234, NULL) INSERT INTO PHONENOS (100070, 2031231234, NULL, 2531231234) […]
SQL 2012 - General
Question on a stored procedure - Hi, I recently ran into something really strange, that I would like to just understand how this can work. I was asked to move some stored procedures and their tables to a server on Azure, no problem. However about three of them would now go, and when I looked at them I saw why. The […]
SQL Server 2019 - Development
How to write query for multiple rows into a single row for different columns - How to write query for multiple rows into a single row for different columns in SQL Server While storing in table, I am inserting like below. CountryIDCityID TownID 10 6 11 10 6 12 10 3 11 10 3 12 10 3 13 11 9 11 11 9 12 11 14 11 11 14 12 […]
Creating a unique Batch ID for Update - Hi There, I'm trying to write a query that sets a batch of rows to have a single uniquely generated ID on the fly. Tried lots of things and just can't get it right. Below are sample scripts to create the table and insert some test data along with two update queries that do not […]
Reporting Services
Condition Based Parameter - SSRS - Hi, I have a situation that I am unable to find any solution by browsing. I have an internal parameter @Category which has to be passed null value to StoredProc if we select @subCategory option "All". If we select any other value in @SubCategory drop down, I need to pass the selected value to Dataset […]
General
Import a large SQL query definition from a text file - The query definition has about 75 lines.     It is part of an Excel VBA routine in which I connect to a MS SQL database using ADO.  One reason to go with an external file is to avoid adding the line break characters such as  " & _  at the end of every line. I […]
Powershell
Need Powershell script to change SQL Server service password - Need sample Powershell script to change PWDS for SQL Server services (on many SQL Servers). We need to modify the SQL Server 'services' passwords (SQL Server, SQL Agent, IS, RS, AS) on several dozen SQL Servers. I am local admin and SQL sysadmin on every server - and I have all current service accts & […]
Integration Services
Unable to cast COM object of type error using SSIS ODBC Connection to PostgreS - how to avoid Unable to cast COM object of type error using SSIS ODBC Connection to PostgreSQL I want load data from postgres to sql server using ssis package . In ssis solution I have 50 plus dft for loading data from postgres to sql server . source is postgre connecting using odbc connection and […]
Certification
Gaining knowledge - All, I would appreciate some opinions on a few questions. I appreciate that some of it's subjective and I'm not looking for definitive answers, just some advice or opinions. I've had a bit of experience of reading CV's and recruiting staff but not much. I'm currently unemployed looking for a new job. I have several […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -