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)
122 Comments. Leave new
V gud…
Thank you very it helped a lot.
Hi Pinal,
This very common error when disk space is low that database goes to inassessiable mode. Thanks for usefull article
Regards
Jayant Dass
Thank alot bro..
it helped a lot and useful
hey thanks a lot, this one solved my problem…
i am from Africa-Mozambique and you dont know how it helped me.
thanks
thanks..
Many many many thanks! I can’t begin to say how this has helped me!
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.
Thanks a lot this saved me so many problems I had been looking at this issue for a day
Excellent
Thank you very much. Solved my db issue
Z2, thanks!!!!!
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….
Thank you very much
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?
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!
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.
Old is gold. This is still applicable!
Worked for me too. additionally I had to play with permissions setting for mdf file. Thanks.
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.
Thanks a lot dear… thats worked…
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.
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…!
Make sure you have specified the server’s file path and not local file path