Hi Rakesh Yadav3,
Thank you for posting in the Microsoft Community Forums.
Check the service startup type
The startup type of the SQL Server Agent service should be set to “Automatic”. If it is set to “Disabled” or “Manual”, the service cannot start automatically.
Check the startup type:
You can check the startup type of the SQL Server Agent service by using the PowerShell command Get-Service SQLAgent | Select StartType.
Set the startup type to Automatic:
If the startup type is not “Automatic”, you can set it to “Automatic” by PowerShell command Set-Service SQLAgent -StartupType Automatic.
Check the service account privileges
The service account of SQL Server Agent service may not have enough privileges to access the database or perform related operations.
Find the service account:
Locate the service account for the SQL Server agent service on your computer.
Grant permissions:
Give the service account database access privileges and execution privileges.
Check the port occupancy
The port used by the SQL Server Agent Service may be occupied by other programs, which may cause the service to fail to start.
Check the port occupancy:
Use the command netstat -ano | findstr “port_number” (replace “port_number” with the port number that may be used by the SQL Server proxy service) to check the port occupancy.
Release the port:
If the port is occupied, you can use the command taskkill /pid ProcessID /f (replace “ProcessID” with the PID of the process that occupies the port) to force the process to end, thus releasing the port.
Check the service status and try to start
Check the service status:
You can check the status of the SQL Server agent service through SQL Server Management Studio (SSMS) or Windows Service Manager.
Start the service:
In Windows Service Manager, find the “SQL Server Agent (MSSQLSERVER)” service, right-click on the service and select “Start”.
Or, in SSMS, connect to the SQL Server instance, expand the SQL Server instance in “Object Explorer”, right-click “SQL Server Agent” and select “Start”. “Start”.
Check the error log
If the service still stops after starting, you need to check the error log to determine the cause.
View the error log through SSMS:
Use T-SQL command EXECxp_readerrorlog0,1,N'SQL Server Agent' to read the SQL Server error log and find the information related to SQL Server Agent.
Best regards
Neuvi