Missing Sql Server Startup parameters

Missing Sql Server Startup parameters

I once came across an issue with a local SQL Server instance that refused to start on my laptop. The Windows Event viewer reported ‘initerrlog: Could not open error log file ”. Operating system error = 3(The system cannot find the path specified.).

Error Log event

Error Log event

At the time I searched around on the net but couldn’t find any thing quick so I resorted to comparing the instance against another machine. To my surprise, my startup parameters had been wiped out. This is what they should have looked like:

Default Startup Parameters

Default Startup Parameters

Furthermore, the Add button in the Instance Properties dialog above would grey out the moment I tried to type in the first part of the parameter -d, -e or -l. The workaround was to add the parameters in to the Registry directly.

This was achieved by navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters. I had to add the master DB data file, log data file and error log file parameters.

Here’s what a default instance should look like:

Default Startup Parameters in the Registry

Default Startup Parameters in the Registry

I took this opportunity to quickly experiment with the errors produced if each of the parameters above were to be deleted. Here’s the default parameter values, together with the error you’re likely to encounter should it be missing.

Error if missing: Error 3(The system cannot find the path specified.) occurred while opening file ‘master.mdf’ to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.

Error if missing: initerrlog: Could not open error log file ”. Operating system error = 3(The system cannot find the path specified.).

Error if missing: FCB::Open failed: Could not open file  for file number 2.  OS error: 3(The system cannot find the path specified.).

In my case all three were missing and the error reported was the one associated with the missing ERRORLOG file.

2 Comments

  1. HI i have followed all the steps given above. when i try to start the service i still get the same error will you please help me out.

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *