SQL SERVER – FIX : Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details

SQL SERVER – FIX : Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details

This error is very common and many times, I have seen affect of this error as Suspected Database, Database Operation Ceased, Database Stopped transactions. Solution to this error is simple but very important.

Fix/Solution/WorkAround:

1) If possible add more hard drive space either by removing of unnecessary files from hard drive or add new hard drive with larger size.

2) Check if the database is set to Autogrow on.

3) Check if the account which is trying to access the database has enough permission to perform operation.

4) Make sure that .mdf and .ldf file are not marked as read only on operating system file system level.

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Error Messages
Previous Post
SQL SERVER – SQL Joke, SQL Humor, SQL Laugh – Search SQL
Next Post
SQLAuthority News – Book Review – SQL Server 2005 Practical Troubleshooting: The Database Engine

Related Posts

122 Comments. Leave new

  • V gud…

    Reply
  • N.Sreenivasa Rao
    December 20, 2010 10:03 pm

    Thank you very it helped a lot.

    Reply
  • Hi Pinal,

    This very common error when disk space is low that database goes to inassessiable mode. Thanks for usefull article

    Regards
    Jayant Dass

    Reply
  • Thank alot bro..

    it helped a lot and useful

    Reply
  • hey thanks a lot, this one solved my problem…

    i am from Africa-Mozambique and you dont know how it helped me.

    thanks

    Reply
  • thanks..

    Reply
  • Many many many thanks! I can’t begin to say how this has helped me!

    Reply
  • Thank you Pinal for this post!

    Following the provided solution help to resolve my issue.
    I cleaned the drive off unwanted stuff and then apply this

    use master
    alter database db_name set online

    Issue resolved.

    Reply
  • Thanks a lot this saved me so many problems I had been looking at this issue for a day
    Excellent

    Reply
  • Thank you very much. Solved my db issue

    Reply
  • Z2, thanks!!!!!

    Reply
  • Hi its Moti
    I have a strange problem
    My Master Database is corrupt
    When i m starting the sqlserver it didn’t start
    Can anyone help me plz….

    Reply
  • Thank you very much

    Reply
  • How come I can rename an attached mdf file, thereby making the associated databases inaccessible, but when I try to copy said mdf file, it’s locked?

    Reply
  • Right click on the folder C:\ArrowSQL\Arr@Data and click on properties
    Click on security tab
    Click on Add button and add sql service account
    Provide modify privilege and click ok
    Verify both mdf and ldf have modify privilege
    Attach the db!

    Reply
    • I know this is an old post, but just wanted to say thanks for this comment. I had a permission issue on my transaction logs and the DB would not start. This post saved me tons of time. Thank you.

      Reply
  • Worked for me too. additionally I had to play with permissions setting for mdf file. Thanks.

    Reply
  • Am frequently getting below message from my DMS database, i googled a lot to get a workable solution, no success yet. Can anybody help to resolve this ?

    Could not find database ID 2, name ‘tempdb’. The database may be offline. Wait a few minutes and try again.

    Raghu korambath.

    Reply
  • Thanks a lot dear… thats worked…

    Reply
  • Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file “c:\myworks_master.mdf”. Operating system error 5: “5(Access is denied.)”.
    Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file “c:\myworks_log.ldf”. Operating system error 5: “5(Access is denied.)”.
    Msg 945, Level 14, State 2, Line 1
    Database ‘myworks’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
    Msg 5069, Level 16, State 1, Line 1
    ALTER DATABASE statement failed.

    Reply
  • Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file “c:\myworks_master.mdf”. Operating system error 5: “5(Access is denied.)”.
    Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file “c:\myworks_log.ldf”. Operating system error 5: “5(Access is denied.)”.
    Msg 945, Level 14, State 2, Line 1
    Database ‘myworks’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
    Msg 5069, Level 16, State 1, Line 1
    ALTER DATABASE statement failed.

    My database is read only , i made it offline and trying increasing file size it show the same error.
    Does any one clear my issue..
    Thanks in advance…!

    Reply

Leave a Reply