Latest Posts

When the Student is Ready, The Teacher Will Appear


This week I ran into a problem I’d never experienced in 20 years of working in SQL Server. A query that had run perfectly fine in an old version of SQL Server (2008R2 to be precise) suddenly became the slowest query on earth in a new edition (SQL Server 2016). The two servers were comparable…

Read More

How To: Set Up Email Notifications for SQL Agent Jobs


“Before we hired you, I would check the job histories on the servers to make sure all the databases got backed up over the weekend,” my boss said, about week three into the job. Can you do that now?” I told him I could do him one better: I could get the servers to tell…

Read More

How To: Backup SQL Server Databases to Azure


Adding “the cloud” to your data center’s high availability/disaster recovery scheme is a bewitchingly tempting proposition. An infinitely scalable product that is always being replicated to datacenters across the globe for your protection? Who wouldn’t want that? Answer: folks on a budget. Today I’m going to show you the simplest — possibly most inexpensive —…

Read More

What does the -n parameter of the bcp command specify?


Question: “What does the -n parameter of the bcp command specify?” Answer: “Use native format.” The bcp utility is used to perform bulk copies between Microsoft SQL Server and flat data files. It is often used to insert large numbers of new rows into tables, or to run large exports into .csv (or other format)…

Read More

Allow Drop and Create in the SQL2014 Table Editor


Q:  I went to change a column to a Primary Key with an Identity specification on a table in SSMS, but when I hit save I got an error message saying the table would have to be dropped then recreated. I’m ok with this. How can I set SSMS to allow drop and create in…

Read More