Search code examples
sql-serversql-server-2000backup

Warm SQL 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 '<dbname>' 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?


Solution

  • 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.