Windows > General Windows

SQL Unable to open the physical file "c:\xxx\xxx\xxx\ERRORLOG". Operating system


Rahul Krishnan N:
Unable to start the MSSQL service and you will see the below error

 "SQL Unable to open the physical file "c:\xxx\xxx\xxx\ERRORLOG". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

This error can cause due to multiple reasons, like incorrect permissions over the log files, Incorrect log file specification in SQL startup, and registery errors for SQL log file

1) You can follow the below steps for correcting the permissions,

Right click on the Log folderfolder (for Plesk Windows 2008 r2 server the directory will be C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG )
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

Tip: To find the "service account", open services.msc (start >> run  >> services.msc >> Enter), Find SQL Service under "Name"  >> Check the "Log On As" Column, that will be the service account

2) Please follow the below steps to check the SQL Startup parameter,

Start >> All Programs >> SQL Server 2008 R2 >> Configuration tools >> Open SQL Server configuration Manager with esclated admin privileges (right click >> Run as Administrator) >>  Click SQL Server Services >> Right Click on SQL service instance name >> Properties >> Advanced >> Expand the drop down for "Startup Parameters"   >> Check the parameters for -d, -e and -l are specified correctly and the files are there in place.

Tip: Sometimes, one of the declarations will not be there and you can manually add the absolute path there. Also the parameters are case sensitive.

3) You can verify the registry settings by following the below steps.

Start >> Run >> Regedit >> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SQL Server\<Instance_Name>\MSSQLServer\Parameters >> Right Click on Arg0, Arg1 and Arg2 >> Modify >> Verify that  the "Value Data"  are  same as in  SQL Startup parameter.

Tip : Case sensitive.


[0] Message Index

Go to full version