Archives: July 2011
I saw this question come across Twitter under the #sqlhelp tag one day and was wondering myself. Someone suggested the default trace, I was thinking msdb.dbo.restorehistory and decided to check.
First I hit Books Online. It notes that the restore_date column means: Date and time of the restore operation. Can… Read more
From the other side of the world, I had a guest at the ranch today.
Pinal Dave, a friend from India, sent me an email that he’d unexpectedly come to Denver this week. He had some time, so I invited him out to the ranch today for a few hours… Read more
When I started working with SQL Server I got bit in the rear one day while I was testing backups. I was in the process of making a quick backup before I deployed some changes. I think this was in the Enterprise Manager days of SQL 2000, but it could… Read more
I have been working at home for over 8 years, sharing an office with my wife for most of that time. I like working at home, though I do notice that if my wife is gone for a few days, I go a little stir crazy being completely by myself.… Read more
There are times you really do want to stripe backups across multiple files. If you have a short backup window, or a large data set, if you can write the backup to multiple files at the same time, you can drastically reduce your backup window. I think I heard one… Read more
I’ve seen quite a few posts from people asking how to do something like this:
SELECT a.ID , IF a.MyChar = 'A' THEN 'Success' ELSE 'Fail' FROM MyTable a
Of course, that doesn’t work in T-SQL, and you’ll get something like this:
Msg 156, Level 15,… Read more
So you’re restored a database, restored a few logs, all with NORECOVERY as expected and realize there are no more logs. You see this in Management Studio and wonder what do to:
I’ve run a bunch of code, restoring lots of files, but I’m done.
RESTORE DATABASE db4 FROM DISK…
One of the things I’m missing today is Wild West Day at Red Gate. It’s not just because I don’t live anywhere near the office (they’re in Cambridge, UK, I’m in Denver, CO), but also because I have a vacation scheduled. Camping up near Fort Collins with family is on… Read more
An early peak at the bloopers going out on Monday. Feel free to enjoy today. I’ve included the editorial and then the raw bloopers from the last month, which has a few more mistakes in there.
The raw ones are below, and include… Read more