When we restart SQLServer, sometimes SQL Agents gets stopped and we may unable to restart the SQLAgent, it remains as Stopped.
In that case execute the below query and try restarting SQL Agent:
EXEC sp_addsrvrolemember 'NT SERVICE\<ServiceName>', 'sysadmin';
GO
You must replace <ServiceName> with SQLServerAgent for the default instance or SQLAgent$InstanceName
for a named instance as below:
EXEC sp_addsrvrolemember 'NT SERVICE\SQLAGENT$BIP1', 'sysadmin';
GO
No comments:
Post a Comment