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
Well, it’s that time of the month again. It’s T-SQL Tuesday yet again, and this time round it’s Andy Yun (b/t) hosting with a subject of Growing New Speakers. Well, I’ll admit I’m a fairly new speaker myself. In fact, I’ve spoken a grand total… Read more
I saw something like this the other day. My first thought was “Hu, never seen that before.” My second thought was “Wow, that’s really cool. I wonder what a hypothetical index is?” A quick search later and I discovered that the DTA (database tuning adviser) uses them to test out… Read more
DBA: Help me! Help me! It’s Halloween! I have a problem! Oh won’t you please help me!
Ok, so that’s really got nothing to do with the Halloween problem. But it is Halloween today so it seemed like a good time to bring the subject up. Of course if… Read more
As I write this we are packing to leave for Disney World, where my family and I will spend close to a week hanging out with hundreds of thousands of the happiest people, not just from the US, but from all over the world. Then while I’m traveling home thousands… Read more
You’ll hear these terms thrown around in programming all the time, but what do they mean and why do we care? Starting with simple definitions first:
- occurring at the same time; coinciding in time; contemporaneous; simultaneous.
- going on at the same rate and exactly together; recurring together.
- Physics, Electricity.…
For anyone who wasn’t aware SQLCMD is a command line tool for running T-SQL statements and scripts. Before anyone says anything I want to point out that yes, I realize that you can use Powershell instead. Of course not all of us know Powershell all that well and most of… Read more
A while ago I talked about Templates. This is an easy way to get a, well, template of a piece of code. But a much faster way to get a simple template is to use a snippet. With a simple key command (ctrl-K, ctrl-X) you can… Read more
Indexes are great. They speed up our queries. In fact, without them relational database systems wouldn’t work.
Different indexes work best for different queries. In a system with a lot of queries that means we could need a lot of indexes. Fortunately we can have up to 999 non-clustered indexes… Read more
My friend Andy Mallon (b/t) is hosting T-SQL Tuesday this month. In case you aren’t aware T-SQL Tuesday is a blog party started by Adam Machanic (b/t) almost 7 years ago. Each month someone selects a topic and hosts the “party”. Then… Read more