Log Shipping Subscriber Database Status

Vinaya Rao 66 Reputation points
2022-02-14T00:54:36.457+00:00

Hello,

If I am setting up Log Shipping on say SQL2k19, on the subscriber database, we can have either Restoring or on Standby mode. If we say have Restoring mode, I guess, we can the status of Restoring mode to normal by sending the below shown command? I will execute this command only after stopping the log shipping sql server agent jobs from the publisher server.

RESTORE DATABASE "name" WITH RECOVERY

Will appreciate your early response.

Thanks.
Vinaya Rao

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
568 questions
0 comments No comments
{count} votes

Accepted answer
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2022-02-14T01:24:54.723+00:00

    Hi @Vinaya Rao ,

    Log shipping has two mode:

    No recovery mode ------ Secondary DB will be in restoring state, no one can read it until its online.
    Standby mode -----------Secondary DB will be in standby/read-only state, user can read the data.

    > If we say have Restoring mode, I guess, we can the status of Restoring mode to normal by sending the below shown command?

    Yes. In order to bring the secondary database involved in log shipping to online we have to use any of below command. this command is to be used in case the primary database becomes un-available either because of database corruption or database going offline or any other damage to the primary database. You can also bring the secondary database online when you remove the secondary database from this log shipping configuration.

    Restore Database <Database Name> WITH Recovery  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


1 additional answer

Sort by: Most helpful
  1. Vinaya Rao 66 Reputation points
    2022-02-14T02:53:53.773+00:00

    Thanks again Cathy.
    Victor

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.