Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 594

SQL SERVER – Event ID 7000 – The System Cannot Find the File Specified

$
0
0

Many times, I feel that I have so many blogs that I must have covered all common possible error related to the usage of SQL Server. But it looks like there are few easy ones which I missed. And thanks to those who take time in sending them to me that it makes a great reminder to what I have missed to date. This blog is from one that came from a DBA from one of my consulting engagements. Let us learn how to fix event id 7000 error.

SQL SERVER - Event ID 7000 - The System Cannot Find the File Specified event-id-7000-800x184

My client told me that they are having an issue with SQL Server Agent. After restarting the operating system, SQL Agent Service didn’t start even though it was set to start automatically. As usual, I started looking around for error messages and fond them below in the event log.

Log Name:      System
Source:        Service Control Manager
Event ID:      7000
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Description:
The SQL Server Agent (MSSQLSERVER) service failed to start due to the following error: 
The system cannot find the file specified.

The message means that Services are trying to start the process (sqlagent.exe) but its failing.

WORKAROUND/SOLUTION – Event Id 7000

When we tried starting it manually, we got below error.

SQL SERVER - Event ID 7000 - The System Cannot Find the File Specified sqlagt-path-err-01

This is the same error that we see in the event log. When I looked into the properties of the service, I found that the path mentioned in “Path to executable” was an invalid path.

SQL SERVER - Event ID 7000 - The System Cannot Find the File Specified sqlagt-path-err-02

The value was “F:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE” -i MSSQLSERVER”

For my client, all binaries are in C: drive and ideally this path should be “C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE” -i MSSQLSERVER”

My client was not sure how it got changed. To change the path defined in “ImagePath”under “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT”

You need to identify the name of the service, shown under “Service name” in the properties. If you have a named instance of SQL Server, then it would be SQLAgent$InstanceName.

SQL SERVER - Event ID 7000 - The System Cannot Find the File Specified sqlagt-path-err-03

After modifying ImagePath, to C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE” -i MSSQLSERVER we were able to start SQL Server Agent Service and the issue was resolved.

Have you ever encountered this error ever in your environments? Do let me know what you did to solve the same.

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – Event ID 7000 – The System Cannot Find the File Specified


Viewing all articles
Browse latest Browse all 594

Trending Articles