Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    91

    Unanswered: Need Help Restoring A Set Of Transaction Logs

    I am trying to restore a set of transactions logs on my SQL server and I keep getting the following error 'The preceding restore operation did not specify with NO RECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step. RESTORE LOG is terminating abnormally.

    Can someone please show me how to properly restore a set of backup logs with specifying the required recovery option?


    Thanks

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    From SQL 2000 BOL (Updated) Examples (under RESTORE Transact-SQL Reference):

    Code:
    RESTORE DATABASE MyNwind
       FROM MyNwind_1, MyNwind_2
       WITH NORECOVERY
    RESTORE LOG MyNwind
       FROM MyNwindLog1
       WITH NORECOVERY
    RESTORE LOG MyNwind
       FROM MyNwindLog2
       WITH RECOVERY, STOPAT = 'Apr 15, 1998 12:00 AM'
    If restoring from disk:
    Code:
    RESTORE DATABASE MyNwind
       FROM DISK = 'c:\Northwind.bak'
       WITH NORECOVERY
    RESTORE LOG MyNwind
       FROM DISK = 'c:\Northwind_01.trn'
       WITH NORECOVERY
    RESTORE LOG MyNwind
       FROM DISK = 'c:\Northwind_02.trn'
       WITH RECOVERY
    WITH RECOVERY means that you are all done restoring the database; that's where you want to stop and the database is then "opened" after the restore is completed.

    WITH NORECOVERY means that you are NOT done restoring the database; you have additional log files to apply in the restore process.

    If you attempt to follow a RESTORE statement having the RECOVERY option with additional RESTORE statements, then you will get an error.

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Nov 2005
    Posts
    91
    Thanks it worked!!! However now my database is greyed out with 'Loading' labeled beside it in brackets. It has been like that for about an hour now. I have tried refreshing and reopening Enterprise Manager but the status has not changed. Will I interrupt the process if I detach and reattach the database?

  4. #4
    Join Date
    Nov 2005
    Posts
    122
    Did you specify WITH RECOVERY on the last restore statement you executed?

    If you didn't, simply execute RESTORE DATABASE dbname WITH RECOVERY to put it online. Keep in mind that you can not restore more log files after this is done.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •