SQL Server Performance

DB is In Recovery

Discussion in 'ALL SQL SERVER QUESTIONS' started by Arunchakrapu, Sep 15, 2012.

  1. Arunchakrapu New Member

    Log backup was succeed for some time after reboot the server.
    Can you please check the attachments and let us know if you need any information

    Attached Files:

  2. Robert L Davis New Member

    Okay, so looks like your database has mroe than 1 log file, and 1 of the log files is on the E drive. It reports that the E drive is not accessible (according to error stating that the OS reports the device is not connected).

    So first, investigate the E drive being offline, and try to bring that online. If it is online by now or once you are able to get it online, try to restart the database by bringing it online with an ALTER DATABASE command.

    I pray that the E drive isn't the drive with your backups if you aren't able to bring it online.

    If the E drive is dead, and you can't bring it online, try setting the database to Emergency state using the ALTER DATABASE COMMAND and attempt to get a backup of the tail of the log. This may not be possible since part of the active portion of the log is not available, but try it. Then you will need to restore the database from a backup using the NORECOVERY option (so you can restore further backups). If the additional log file on the E drive already existed when the backup was taken, you will need to use the WITH MOVE option to put that log file somewhere else. Then restore whatever other backups are available to bring the database current (most recent differential since the full backup, if any, and log backups). Restore the tail log backup last if you were able to get it earlier in this process. Finally, recover the database by issuing a RESTORE DATABASE <DB NAME> WITH RECOVERy command.

    Let us know where you stand after this point.
  3. Arunchakrapu New Member

    Thank you so much sir for the reply.

    Yes there was a problem with E drive where the one of the log file located and after some time E drive was able to access but still the DB status was in Pending Recovery

    So i tried to bring online by using ALTER Database xxxxx set ONLINE

    Then it was stuck in In Recovery mode.

    After that i have decided that to restart the SQL services

    Verified there were no active user connections to the database (sp_who2 active) and restarted the services.

    Issue resolved.

    Arun

Share This Page