views:

259

answers:

1
+1  Q: 

Warm Backup

We have a warm sql backup. full backup nightly, txn logs shipped every so often during the day and restored. I need to move the data files to another disk. These DB's are in a "warm backup" state (such that i can't unmark them as read-only - "Error 5063: Database '' is in warm standby. A warm-standby database is read-only. ") and am worried about detaching and re-attaching.

How do we obtain the "warm backup" status after detach/attach operations are complete?

A: 

The only solution I know is to create a complete backup of your active database and restore this backup to a copy of the database in a 'warm backup' state. First create a backup from the active db:

backup database activedb to disk='somefile'

Then restore the backup on another sql server. If needed you can use the WITH REPLACE option to change the default storage directory

restore database warmbackup from disk='somefile'
       with norecovery, replace ....

Now you can create backups of the logs and restore them to the warmbackup with the restore log statement.

Frans
Exactly correct. We had the restore statements scripted out to be run in a batch, so I just reran those with the "replace" parameter and ta dah! All is right in the universe.
Jody
In case anybody is wondering the "warm backup" refers to the 3rd option in enterprise manager "leave database read-only and able to restore additional transaction logs" or the "WITH STANDBY" option under the "restore" command.
Jody