Comments posted to this topic are about the item Backup log with norecovery
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
This was removed by the editor as SPAM
I am using this a lot lately.
Quite interesting. It's a neat way to leave the database.
Gail suggested this to me a few days ago. I now think it is preferable to
ALTER DATABASE MyDatabaseName SET OFFLINE WITH ROLLBACK IMMEDIATE
which I currently use (before restoring the DB)
and much better than
ALTER DATABASE MyDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
which I used to use, but had the risk that someone other than me might grab the single user connection!
Thanks, good training question.
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Nice one, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Thanks for the question.
Good tip, thanks!
(in reply to post about using OFFLINE instead of SINGLE_USER)
Nice question; but it's a command I hope I never have to use; another is
BACKUP LOG <database> TO <device> WITH STANDBY = <file>.
Interesting question about I never used thru T-SQL.
I discovered the WITH NORECOVERY when I tested how to backup with SMO ( there is an option which permits to visualize the T-SQL code generated thru a SMO application without executing it : useful to test it )
Viewing 11 posts - 1 through 10 (of 10 total)