SQL server users may face errors in the Sql Server database whether; they are experts or newbie. If you are a DBA of your company then you have lots of responsibilities and a small Error can mess up your whole work. Some SQL database error self-explanatory and if you understand the message correctly then, half of the problem will be solved. In this blog, we will discuss the SQL database error 3417 which is a very common error that appears when DBA starts the SQL Server database.I also got this error message earlier and I am discussing here the steps that I followed to fix it. The error message looks like:
In the above error message, just read this sentence: For more information, review the System Event Log. I checked the event log and it was looking like this:
The file “C:\path of .mdf file” is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Now, I follow the following steps to fix this issue:
- Go to the data folder where .mdf file is located. Please confirm both the file (.mdf and .ldf) are not compressed.
- Now, select the Properties.
- Click on the Advanced button.
- Un-check the Compress Contents to save disk spaces option.
- Click on the OK button.
- Start the SQL Server from the service manager.
Other reasons: If you are unable to fix this problem by the above solution then please check the Network Service permission in the data folder.
- Go to the Data folder and click on the Security/Permission setting.
- In the Network Service Account, add the Network Service account.
Note: Take the backup of the .mdf file and .ldf file and replace them. If the paths are different (like 32 bit vs 64 bit) then, in this case the SQL Server may give the error.
If still not able to fix this problem that means, there is a corruption in your .mdf file. In this case, you can try the Stellar Phoenix SQL Database Repair tool to fix thr error. This tool is able to repair corrupt .mdf files without any alteration in the original database.