How to force a standby database to recovery

  • I have a standby readonly db as part of logshipping.

    I am trying to make the standby db to recover mode.

    The app team doesn't really care about the data is sync or not.....so, i am trying to recover the db with this stmnt.

    restore database dbname with recovery;

    it's been running for more than 30 mins.....anyway to force this db to recovery state ASAP?

    seems like the logshipping wasn't synced up, I tried to apply some of the last log backup and it keep telling me "too early to apply the log".......

    so, I just want the db to be read/write mode so app team can do the testing.

    please advise, if i can force the database to make it read/write.

    Regards,
    SQLisAwe5oMe.

  • The statement you posted should bring it online, you'll just have to wait while SQL runs the recovery process.

    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
  • Hi Gail, thanks for your reply.

    Now, I see the database (In Recovery) and the query is still executing.

    I should still wait and let the query complete?

    Regards,
    SQLisAwe5oMe.

  • The query is still running, about 3 hours now.

    Is there anyway to find the ETA for this?

    Please advise as I am stuck with no options at the moment.

    Regards,
    SQLisAwe5oMe.

  • Recovery process should be logged to the error log. Yes, you just have to wait.

    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
  • Hi Gail, yes, I looked at the error log and found it will take about 33000 seconds to recover the database....therefore my DR failed and we had to fail back to PROD without testing.

    I am still not sure why it would take that long to recover the database since the logshipping was already in sync before I broke it, so if that was the case why does the DB need that much time to recover?

    Let me know your thoughts. The database is around 700GB.

    Regards,
    SQLisAwe5oMe.

  • Probably some long-running transaction which had to be rolled back.

    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 7 posts - 1 through 6 (of 6 total)

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