Summary: As an SQL user, you may come across a situation when attempting to start the SQL Server results in SQL error 3417. This blog discusses different occurrences of the error and causes behind it. Also, the blog explores workarounds on how to resolve SQL Server Error 3417.
Sometimes, when trying to start SQL Server service manually, SQL Server error 3417 may occur. The complete error message reads as:
“Windows could not start the SQL Server (MSSQLSERVER) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.”
Before discussing the reasons behind the SQL service error 3417 and workarounds to fix it, let’s first look at a few user instances reporting the error.
Tip: SQL Server error 3417 can render the SQL database inaccessible. While there are manual workarounds, troubleshooting using these workarounds can take significant time and increase db downtime. Use Stellar Repair for MS SQL software to restore the db in a few simple clicks.
Occurrences of SQL Error 3417
Instance 1: In this instance, a user reported that when moving the folder: (Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL) to another drive, the SQL server stopped working. On trying to start the server again, it displayed an error message: “Windows could not start the SQL Server (MSSQLSERVER) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.”
Instance 2: When trying to connect to SQL Server to run a web project, a user received an error message:
“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 40 – Error Locating Server/Instance Specified)”
The user found that SQL Server Express stopped working in SQL Server Configuration Manager. On attempting to run SQL Server Express, the service did not respond. And when the user tried opening services.msc to start a SQL Server (SQLEXPRESS instance), it returned the “Windows could not start the SQL Server (SQLEXPRESS) on local computer” error message with error code 3417.
What Causes SQL Server Error 3417?
You may encounter this error when the SQL Server doesn’t start due to any of these reasons:
“Master database or tempdb cannot be brought online.” This event may occur when the db is damaged due to hardware or software failure.
The folder containing the MDF and NDF files is compressed.
Folder permission issue where the db file resides.
How to Fix SQL Server Error 3417?
Try the following workarounds in the sequence given below to resolve MS SQL error 3417:
Workaround 1: Decompress SQL Database MDF File
When you cannot open the master database, check if the master database file (.mdf) is compressed. If the file is compressed, you will need to decompress it. To do so, follow these steps:
Step 1: Browse and locate the Microsoft SQL Server data folder containing db (MDF and NDF) files.
Note: You can locate the SQL server data folder by browsing the location: “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data”.
Step 2: Right-click on the SQL Server data folder. The Microsoft SQL Server Properties window gets displayed. Click Advanced.
Step 3: In the Advanced Attributes dialog box that appears, uncheck the Compress contents to save disk space checkbox, and then click OK.
Step 4: The Microsoft SQL Server Properties dialog box opens again. Click on the Apply button, and then hit OK. When the Confirm Attribute Changes box pops-up, click OK.
Step 5: Click Continue to proceed.
Step 6: Wait for the attribute changes to complete. Once the changes have been applied, click OK.
After performing these steps, try starting the SQL Server service again. If the error persists, proceed with the next workaround.
Workaround 2: Check for Folder Permissions
Note: This SQL error 3417 fix applies to users who receive the error while moving a folder to another drive.
Make sure that the account that runs the SQL Server service has access rights (network permissions) to the folder containing the SQL db files. If not, follow these steps to grant the right to the folder:
Step 1: Go to the SQL files folder and right-click on it, and then choose Properties.
Step 2: From the Properties box, click the Security tab.
Step 3: In the dialog box that pops-up, choose the Network Service account under the Group or user names: section.
Step 4: Select the Full control checkbox under the Permissions for Authenticated Users section, and hit the OK button.
Now check if running the SQL Server instance starts without the error.
Workaround 3: Rebuild Master Database
We can restore master db from the most recent full database backup, but only if the SQL Server instance is running. Since we cannot start the server instance, rebuilding the master db might help fix the 3417 error.
Refer to this link for more information on rebuilding the master database.
Workaround 4: Repair MDF File
If rebuilding the master db doesn’t help resolve the error, the chances are that the master db file is severely corrupt. In that case, you can try to repair the corrupted MDF file. For more information on repairing the db file, read this: Repairing Corrupt MDF File of SQL Server Database.
You may encounter SQL Server error 3417 when trying to start the SQL Server service. The error may occur when you cannot bring online the master or tempdb, the folder containing the database (.mdf or .ndf) files is compressed, or you don’t have access rights on the folder. You can try to resolve the issue by following the manual workarounds discussed in this post. However, troubleshooting SQL error 3417 manually can be time-consuming and increases database downtime. A better approach is to use a specialized SQL database repair tool such as Stellar Repair for MS SQL to repair the MDF file and fix the error.
Charanjeet is a Technical Content Writer at Stellar®who specializes in writing about databases, e-mail recovery, and e-mail migration solutions. She loves researching and developing content that helps database administrators, organizations and novices to fix multiple problems related to MS SQL and MySQL databases and Microsoft Exchange.