• GilaMonster (11/8/2012)


    Don't do it that way. When you want to take the last backup, run backup database with norecovery (or backup log with norecovery), that'll switch DB into restoring, allow no further transactions.

    Hi Gail,

    I recently upgraded our main database server to SQL 2012, and I used the method that the OP described of bringing the server into single user mode, etc.

    Your advice seems like a much better way to accomplish this. I am testing it on a local test server, and I can't seem to get NORECOVERY to work with the BACKUP DATABASE command:

    BACKUP DATABASE test_db

    TO DISK = 'c:\backups\test_db.bak'

    WITH NORECOVERY

    Msg 3032, Level 16, State 2, Line 1

    One or more of the options (norecovery) are not supported for this statement. Review the documentation for supported options.

    If I changed the database into FULL recovery, take a backup, and then take a log backup with BACKUP LOG ... WITH NORECOVERY, your advice works perfectly.

    Did I miss something somewhere? I am on SQL 2012 RTM.