Results 1 to 13 of 13
  1. #1
    Join Date
    May 2016
    Posts
    7

    Unanswered: stuck in restoring state

    I have two databases that are stuck in restoring state on secondary server we are using transaction log shipping, how can I fix this?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you are using log shipping, the target databases will stay in the restoring state until you need to end the log shipping and recover the databases.

    If you are feeling rather geeky, you might be interested in an article by Kendra Little that explains some options (specifically STANDBY mode) that might help somewhat:

    https://www.brentozar.com/archive/20...-standby-mode/

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    May 2016
    Posts
    7
    how do i check to see if the log shipping is working?

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Check the errorlog on the standby server to see that restore log commands are being run. Alternatively, if you have enterprise edition, you may be able to make a snapshot of the database, and check to see if that has recent data.

  5. #5
    Join Date
    May 2016
    Posts
    7
    after I restore my database with no recovery from a full backup how do I restore the transaction logging?

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Using the restore command, it is pretty easy. If you are using a backup tool (Symantec, HP Data Protector, DPM, etc.), it gets difficult to explain.

    Code:
    restore log [databasename] from disk = 'filename of log backup' with norecovery
    There are plenty of other options listed in the MSDN article for the RESTORE command

  7. #7
    Join Date
    May 2016
    Posts
    7
    Now I have this error when i try to restore a trn. how do i find the correct lsn?

    Click image for larger version. 

Name:	Capture001.PNG 
Views:	3 
Size:	5.3 KB 
ID:	16898

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Log backups need to be restored in order. You get this error, when one of the log backups in the sequence has been missed. If you query the msdb..backupset table, you should be able to tell who ran what backup when.

  9. #9
    Join Date
    May 2016
    Posts
    7
    when I look into job history of lsrestore it has, executed as user:dom\704548-DB1$. The step has failed

  10. #10
    Join Date
    May 2016
    Posts
    7
    are there some self paced courses or great books that help to cover this?

  11. #11
    Join Date
    Jun 2011
    Posts
    31
    Provided Answers: 1

    Post

    Quote Originally Posted by majorkuso View Post
    Now I have this error when i try to restore a trn. how do i find the correct lsn?

    Click image for larger version. 

Name:	Capture001.PNG 
Views:	3 
Size:	5.3 KB 
ID:	16898
    This error message occurs, when the log backup is older than SQL Full backup.

    Use WITH FILE=<filename> to restore a specific backup file number from backup file.

  12. #12
    Join Date
    May 2016
    Posts
    7
    I appreciate the help and feedback, however my company is moving to a cloud-based service called couchbase and will not me using ms sql, so I will not have to worry about this secondary db.

  13. #13
    Join Date
    Aug 2015
    Posts
    5
    restoring the database with
    Code:
    RESTORE DATABASE <database name> WITH RECOVERY
    useful when you've already restored the database.

Posting Permissions

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