none
Database 'XXX' cannot be opened due to inaccessible files or insufficient memory or disk space

    Question

  • I am getting the following error with my database Database ' XXX' cannot be opened due to inaccessible files or insufficient memory or disk space. I have sufficient space on the drive >100gigs. Does anyone have any suggestion what caused this and how it can be fixed? I am running SQL 2008 and not commands are running on the db.
    Thursday, March 11, 2010 3:07 PM

Answers

  • Blindly doing reapir without root cause analysis is not a good idea. Repair can leave you with an inconsistent database. Also, you probably want to know *why your database went corrupt in the first place (hardware problem rarely repair themselves).
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Thursday, March 11, 2010 6:52 PM

All replies

  • Check out the SQL Server errorlog file for further details on wht SQL Server couldn't access this file.
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Thursday, March 11, 2010 3:49 PM
  • SQL Server is not able to access the Database files , can u restart the server and check agian,

    I hope the 100 Disk is SAN Stgorage.If so check for disk error in ur windows event log .
    Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.
    Thursday, March 11, 2010 4:25 PM
  • actually this did not work. I had to do the following, put the database in
    emergency mode, set it to single user and run repair  --
    ALTER DATABASE emergencydemo SET EMERGENCY;
        GO
    ALTER DATABASE emergencydemo SET SINGLE_USER;
        GO
        DBCC CHECKDB (emergencydemo, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;
        GO

    • Marked as answer by Richard Garcia Thursday, March 11, 2010 5:17 PM
    • Unmarked as answer by Vijay SirohiEditor Friday, December 02, 2011 7:25 AM
    • Proposed as answer by Beaver_Rox Monday, February 13, 2012 10:09 PM
    Thursday, March 11, 2010 5:17 PM
  • Blindly doing reapir without root cause analysis is not a good idea. Repair can leave you with an inconsistent database. Also, you probably want to know *why your database went corrupt in the first place (hardware problem rarely repair themselves).
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Thursday, March 11, 2010 6:52 PM
  • Hi TiborK,

    I encounter the same issue as well, the root cause in my case was because of log file was full, and the undoing operation causes the error, then end up that database unable to access.

    Would like to check with you, DBCC CHECKDB('DatabaseName', REPAIR_ALLOW_DATA_LOSS) might cause data loss in database or the log file? 

    is there any other alternative way to solve these without loss of data?

    Wednesday, November 30, 2011 8:22 AM
  • Sam,

    first run the checkdb for the database and post the results here.



    Muthukkumaran Kaliyamoorthy

    Helping SQL DBAs and Developers >>> SqlserverBlogForum
    Wednesday, November 30, 2011 11:29 AM