here is the error I get:
C:\WINDOWS\system32>"C:\Program Files\Microsoft SQL Server\120\LocalDB\Binn\sqlservr.exe" -m
2017-09-27 16:09:26.50 Server Error: 17058, Severity: 16, State: 1.
2017-09-27 16:09:26.50 Server initerrlog: Could not open error log file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 32(The process cannot access the file because it is being used by another process.).
2017-09-27 16:09:26.80 Server Error: 17058, Severity: 16, State: 1.
2017-09-27 16:09:26.80 Server initerrlog: Could not open error log file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 32(The process cannot access the file because it is being used by another process.).
Any hint to help me would be great. Thank you!
Best Answer
Analysis
You receive the above error message if the
sqlservr.exe
program is already running or if your privileges are not correct.Solution
Try stopping the SQL Server () service first and the you should be able to start
sqlservr.exe -m
without any further issues.IF the service is not running, check the Processes tab in the Windows Task Manager for a process
sqlservr.exe
.IF the the service is not running and no other process can be seen in the Task Manager ensure you start the Command Prompt with
Runas Administrator...
and you should be able to start the process.IF you are still unable to start the instance, then you might have to add additional parameters when manually starting your instance.
SQL Server Startup Parameters (2014)
The parameters for manually starting SQL Server are as follows: