Restoring my StandBy / ReadOnly Db - HELP PLEASE

  • Hey guys... i really need some help...

    I'm new as SQL-DBA, Our LogShipping DB is out of sync (since the windows-team patched the server)

    We have a primary DB running on a server with logshipping

    A Secondary DB running on an other server which is in standby / readonly mode. (wich copys and restores the .trn logs from primary. this worked fine until the serverteam patched the backup server (and didnt start the sql-server again)

    Now my problem... how can i restore the standby db ?

    I made a fullbackup from the primary today (log shipping is not working for 4 days)--- my plan was to resotre the standby db with the fullback from the primary and after this (the trn from today are still here) it should resync itself...

    But i'm not able (using SQL Server Manager) to use the "Tasks/Restore/Database" (greyd out) to restore my fullback.

    now i read something about a command:

    Restore Database (dbname) from disk='C:\Temp\Fullbackup.bak" with standby = 'xxxxx.ldf'

    What is this .ldf path for ? i found a .ldf from the Database (secondary) on the path: F:\Microsoft SQL Server\MSSQL\Data\"ourDB-Name".ldf ...

    Is it ok when i restore my BackupDB (in standby mode) with the following command ?

    Restore Database OURDBNAME from disk='C:\Temp\Fullbackup.bak" with standby = 'F:\Microsoft SQL Server\MSSQL\Data\"ourDB-Name".ldf' ... i dont wanna break our secondary db 🙁 --> or do i have to create a new .ldf file ?

    Thanks a lot for your help

  • The standby file is NOT an ldf. It's a separate file that should have a different extension to show that it's something different. It is NOT a database log file.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • OK, Thanks...

    The DB is allready running in Standby/readonly mod, sould i find the old standby file and put it in the command ? Or do i have to create a new one ...

    Other question... is it possible to restore the standby DB (from a fullbackup) when i take it offline ? --> when i take DB after restore online... will it be as standby /readonly like before ?

    Thanks for your help

    Regards, Dominic

  • Well, when you restore you're replacing the old database, so it doesn't matter what or where the old database had anything.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply