Microsoft SQL Server is a great relational database management system if everything is working fine. But if there’s some sort of issue going on, you’re likely to encounter error messages and other problems. Just like any other application, Microsoft SQL Server is also prone to errors which may result in serious troubles. In this article, I will describe “Microsoft SQL Server error 945”, one of the most common error messages of Microsoft SQL Server. Also, I will help you learn how to troubleshoot this particular SQL Server error.
In computers, it’s very common to encounter the error messages these days. There’s almost no software application that’s actually immune to errors. While using Microsoft SQL Server, you may come across an error message at any time due to any reason. And Microsoft SQL Server Error 945 is the most common one. This SQL Server error is most likely to occur while you’re executing a Transact-SQL statement or batch. Thus, the database cannot be opened due to inaccessible files or insufficient memory or disk space.
SQL Error 945 Severity Level 16 Message Text Database '%.*ls' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
This SQL Server error 945 has many harmful effects, such as
- SQL Server database may go to suspect mode;
- The database operation may be ceased;
- The database may stop the transactions, etc.
Possible Reasons for SQL Server Error 945
It’s not easy to figure out the main reason responsible for SQL Server error 945. However, I have listed the most possible reasons below which may cause SQL Server error 945:
- When the SQL Server database is marked as “IsShutdown”, SQL Server error 945 is likely to occur.
- You may also encounter this SQL Server error if some files are missing from the database.
- If the database you want to open is in suspect mode, you may receive this SQL Server error.
Troubleshoot SQL Server Error 945
Before the “SQL Server error 945” may put your database at high risk, you must troubleshoot it as soon as possible. Below I’m showing you the most possible solutions to troubleshoot the SQL Server error, “database cannot be opened due to inaccessible files or insufficient memory or disk space”:
Fix #1: If possible you should add more free space on the hard disk drive.
- Either you can remove all the unnecessary files from the hard disk drive.
- Or you can add a new hard disk drive that has a larger size.
Fix #2: Check if the database is set to Autogrowth.
Go to the Growth and Autogrowth Settings and check if the “Enable Autogrowth” is checked. Make sure you shouldn’t enable the Autogrowth option.
Fix #3: Check if your account has enough permission to perform any operation. If you don’t have the permission, you should contact your system administrator (SA).
Fix #4: Make sure the primary and secondary databases, i.e. MDF and LDF files, aren’t marked as read-only.
Also Read: Recover-SQL-Database-Password
If the Database is Tagged as Suspect
If the MDF database is tagged as suspect, then also you’re likely to encounter this SQL Server error. In order to remove the SQL database from the suspect mode, you should repair it. Try SQL Database Repair tool that can repair SQL database file which is corrupt due to any reason.
You should do the needful in time, otherwise, the SQL Server error 945 may cause a lot of damage. There’s no guarantee that a 3rd party SQL Database Repair tool will surely work for you, but there’s no harm in trying it. But make sure you first download the demo version of SQL Database Repair tool recommended above before purchasing it.