Wednesday, October 15, 2014

Database in Recovery Pending State



Database 'db_name' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
Looks like Log file got corrupted and not allowing the database to come online. 


First thing make sure you have .mdf and .ldf files in your drives. 
next verify 

select * from sys.sysdatabases where name ='db_name'

Verify the filename column sees the database .mdf file with full path. 

Next 

Execute the following commands to bring your database to online. 

alter database [db_databasename] set offline with rollback immediate
alter database [db_databasename] set online with rollback immediate
with this your database is online and accessible. 

I would also recommend to run the following command to make sure no corruption. 

DBCC CHECKDB ('db_databasename')

2 comments:

  1. thank you for the post.

    ReplyDelete
  2. Golden Nugget Casino - MapyRO
    Golden Nugget Casino is a hotel and casino located in Las Vegas, 보령 출장샵 Nevada. 사천 출장샵 The casino 성남 출장안마 is located near the 천안 출장마사지 entrance to the Golden Nugget Casino and 강원도 출장샵

    ReplyDelete