Friday, December 25, 2015

How to fix the Error: "Warning: you must recover this database prior to access."


Warning

Mainly cause of this Warning “Warning: you must recover this database prior to access.” is the corruption of transaction log file for the database. For recovery of this database you need to follow these steps :




1) Open ‘SSMS’ with ‘SA’ or ‘Super’ credentials.


2) Go to ‘Databases‘ and select your respective  suspected database.

3) Right click on that database and select ‘New Query’.

4) Run the following commands sequentially one by one.

    • EXEC sp_resetstatus [Database name]
    • ALTER DATABASE [Database name] SET EMERGENCY
    • DBCC checkdb([Database name])
    • ALTER DATABASE [Database name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE.
    • DBCC CheckDB ([Database name],REPAIR_ALLOW_DATA_LOSS)
    • ALTER DATABASE [Database name] SET MULTI_USER


5) After successful execution of all commands your database is recovered and ready for use.


Enjoyed the topic, Please do subscribe to our newsletter to get updated with every post without a miss.

Thanks for reading,

Shubin Dongre

2 comments:

  1. thanks, but after fixing this problem i had a problem with my dll file, that i fixed by replacing it with this file http://fix4dll.com/xlive_dll.

    ReplyDelete
  2. Thanks for the valuable information Robert!

    ReplyDelete