Blocking is just part of life I’m afraid. Because we have locks (and yes we have to have them, and no, NOLOCK doesn’t avoid them) we will have blocking. Typically it’s going to be very brief and you won’t even notice it. But sometimes you get a query or… Read more
You’ll frequently hear that you should add the COPY_ONLY clause when taking an ad-hoc full backup to avoid messing up the backup chain. Just in case you haven’t: You should add the COPY_ONLY clause when taking an ad-hoc full backup to avoid messing up the backup chain.
But you may… Read more
I recently had an interesting time getting the SQL Auth logins on a new instance working. I was doing a side by side upgrade and the only server principals used by the application were SQL Server authenticated logins. I tried over and over again but kept getting the same error. Read more
I’m a big fan of the sp_help system stored procedures, which is why I’ve been a bit disappointed that the sp_helpindex stored procedure is rather badly flawed. It doesn’t have the included columns from the index. This seems a bit strange to me since included columns first appeared in… Read more
I’ve been studying Azure recently and came across a really interesting Azure site.
To give you an idea why I find this view so interesting I’m going to drill down to a SQL Database that I have.
Up front, you can see some interesting information. The location, status, service… Read more
Honestly, I’m only posting this because I had a hard time finding anything posted on this error and I found it somewhat unclear. Here is a quick walk through to produce the error:
-- Create server principal. CREATE LOGIN SQLTest WITH PASSWORD = 'SQLTest'; GO -- Create a database principal…
I was thrilled to host TSQL Tuesday #85, the last TSQL Tuesday of 2016. My subject was backup and recovery and I was pleased to see this line of my invitation quoted several times.
Backups are one of the most common things DBAs discuss, and they are at once one…
I’ve been using sp_helptext for years. Honestly I probably end up using it at least once a day. But I was recently exposed to object_definition() which has a similar output. There are, however, a few differences.
This system function returns the text of any (T-SQL) code based object. I.e.… Read more
Years ago I worked for a company that had a rather cool way of handling requests. When we ran the request the query we used and the output were saved to a directory on the network. This way if there were any questions about what had been done we had… Read more
The other day I received an email asking for some help with a school project. Would I please answer some questions about my career and industry. Well after some due diligence I answered the questions. But the questions were rather interesting and the answers turned out pretty well (IMHO) so… Read more
The basic steps when restoring backups are
- The most recent full backup.
- The most recent differential backup.
- All log backups after the most recent differential.
I’ve been really excited about the new Data Migration Assistant (DMA) since I first heard about it. One of the things I like best about it is that unlike the old Upgrade Advisor it doesn’t have to be run on the server being upgraded. You can run it against… Read more
No. Wait. Sorry, that was last time. This time I want to hear about backup and recovery.
Backups are one of the most common… Read more
I recently wrote an article for SQL Server Central about using OUTPUT. In case you aren’t aware OUTPUT is a clause that lets you output the changed data from an INSERT, UPDATE, DELETE, or MERGE statement. One of the comments on the article was a question… Read more
If you ask a senior DBA what are the top 5 most important commands in T-SQL you’ll probably see DBCC CHECKDB in most if not all of those lists. Unfortunately, the output can be long, overwhelming and a more than a bit difficult to read. So here are a few… Read more
I while back as part of a T-SQL Tuesday post I created HAL0001, then later HAL0002 with a long-term goal of building up a database version of HAL9000. Well, at the rate I’m going I may have to pass this on to my kids (or even grandkids). But in… Read more
Sometimes loading new data or even changes into a table just isn’t going to work. You need a complete reload. A summary table of data from the previous month, for example. It just doesn’t make sense to do an update. You delete/truncate and you re-load. Unfortunately, this leaves the table… Read more
SQLSkills is an amazing resource for the SQL Server community. Between their blogs, white papers, and the SQLSkills Insider emails you should make a point of taking a look. But earlier this year they announced an absolutely astounding new offering. A library of wait types and latches. So now… Read more
SQL Server stores a create date and a change date for each object in the sys.objects system view.
Unfortunately while tables, views and even constraints are objects, indexes are not. Or at least they aren’t stored in the sys.objects system view. And the sys.indexes system view doesn’t have any dates… Read more
First I guess we had best start with definitions right? The permission Administer Bulk Operations and the role bulkadmin are required (one or the other) to perform bulk imports. Nothing more, nothing less. There is a really nice comparison of the two here.
So as with all permissions we… Read more