I'm new to SQL Server and encountering an error when running sqlservr.exe (Microsoft® SQL Server® 2008 R2 SP2 - Express Edition)

Error 17058, Severity: 16, State: 1.
initerrlog: Could not open error log file ''.
Operating System Error = 3 (The system cannot find the path specified.).

Here are my startup parameters:

-dc:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf;
-ec:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG;
-lc:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mastlog.ldf

I've also made sure that all users have full control access and removed read-only permission from folders

Thanks!

migrated from stackoverflow.com Aug 29 '15 at 14:54

This question came from our site for professional and enthusiast programmers.

  • What are you trying to run sqlservr.exe ? When you install SQL Server, a Windows service is created that automatically runs at system startup - no need for you to manually "run" sqlservr.exe at all ... – marc_s Aug 29 '15 at 7:50
  • 1
    This sounds like a permission error. You can try two things. 1) If you security policy permits it, open SQL Server Configuration Manager, go to SQL Services -> SQL Server and right-click it to open the Properties window. Change logon account temporarily to the built-in account Local System and try again. If it works, you probably have a permission error. 2) You can also try going to SQL Server Installation Center and running Repair. – RSax Aug 29 '15 at 8:03
  • I had the same issue. You Need to run CMD as Administrator to get it to start. – Patrick J Jan 10 '17 at 16:52

I face the same problem after windows update on our server. Resolved with these steps.

  • rename or delete ERRORLOG file found in below directory

c:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log

  • start service

I think the file corrupted. When I change the name, it created a new file.

I faced this EXACT issue two weeks ago. The resolution I found myself was that when you goto CMD prompt do not just open it, right click and say RUN AS ADMINISTRATOR. Then start SQL Server as you state. It will work that way. Security on WIn2008 is tighter and you have to do the RUN AS ADMIN for it to work correctly.

  • SQL Server runs as a service, not as an application, so there is no need normally to run it as Administrator, as the install performs the required permission grants. Security in Windows Server 2008 is not tighter than in Windows Server 2012 or 2016: it has evolved in the right way, because the Security has evolved as well, and quite much, since 9 years ... – Nicolas Souquet Aug 29 '17 at 4:18

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.