It is a very good document and very useful for all the DBA's. I would rate 5 star for this.
cheers
Sunil S.
As someone who's inherited the DBA role, I'm having to trawl through our databases and look at our backup plans. Articles like this serve to highlight some of the glaring errors some of my predecessors made which hopefully I can now make right (with a little help from my friends at SQL Server Central).
Very useful article!! Thanks
Excellent article as usual Grant!
I think the best part is the advice to practice the recovery steps when you're not under the cosh. In fact I would recommend that all production DBAs do this at least once a week because:
a) You are absolutely, 100% proving that your backups are working and can be used. Backups are meaningless until it can be proved that they can be recovered from in the event of a disaster. By doing a test recovery once a week you are ensuring that everything is still as it should be. I worked at a company where they had set up an excellent backup plan but, somehow, the incremental backup job got disabled and it wasn't noticed until, you guessed it, it was needed to get the company system back online! The DBA and the company went their separate ways.
b) For the reason that Grant stated - you will be familiar with the steps involved. Doing this once a week burns this knowledge into your brain. Practice, practice, practice.
If you're in a team then this shouldn't be too arduous and should be cycled round the team making sure that everyone knows how to do it without having to think about it.
Malc
From the article:
"After you get the users out of the system and lock it down so that you’re not contending with them (if there are connections into a database, you can’t restore it),"
Yes, there's the rub. How do you get the users out of the system and lock it down? We do not have a DBA here, so as senior programmer, I get to do most of these tasks. I haven't found a good explanation as to how to do this. Can someone enlighten me?
TIA,
Owen
There are several scripts on the web that kill SQL Server connections; here are a couple to try:
http://www.extremeexperts.com/SQL/Scripts/default.aspx (look for the Kill Connections script)
or
http://www.databasejournal.com/scripts/article.php/2110211
Blake
If you are able to, take a log backup of it after 8:40 (depending on the type of crash I suppose). Then you can do the restoration stopping at 8:39. If you cannot back it up after your 8:40 crash, then I suppose you are in lots more trouble Maybe try some repairs using DBCC then log backup and restore to 8:39?
Anyone have further ideas?
"Yes, there's the rub. How do you get the users out of the system and lock it down? We do not have a DBA here, so as senior programmer, I get to do most of these tasks. I haven't found a good explanation as to how to do this. Can someone enlighten me?"
I'd try it this way:
ALTER DATABASE X SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
This is harsh and won't make you popular, but it does kick everyone that isn't a member of db_owner role out of the system PDQ.
However, if you've got a bunch of users in the db_owner role, in addition to have other issues, you'll need to try a different approach.