Avatar of shanj
shanj
 asked on

Running sql on my local pc, cannot start sql Agent

Cannot start sqlagent from the config manager, getting the following error

2011-05-14 22:26:29 - ! [298] SQLServer Error: 15247, User does not have permission to perform this action. [SQLSTATE 42000] (DisableAgentXPs)
2011-05-14 22:26:29 - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_has_server_access', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnIsLoginSysAdmin)
2011-05-14 22:26:29 - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_get_startup_info', database 'msdb', schema 'dbo'. [SQLSTATE 42000]
2011-05-14 22:26:29 - ! [298] SQLServer Error: 229, The UPDATE permission was denied on the object 'sysalerts', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (DumpAndCheckServerVersion)
2011-05-14 22:26:29 - ! [298] SQLServer Error: 229, The INSERT permission was denied on the object 'syssessions', database 'msdb', schema 'dbo'. [SQLSTATE 42000]
2011-05-14 22:26:29 - ! [000] Error creating a new session
2011-05-14 22:26:30 - ? [098] SQLServerAgent terminated (normally)
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
shanj

8/22/2022 - Mon
Daniel_PL

Service account from which SQL Agent is running doesn't have administrative priviledges in SQL Server. It's adviced to change accounts and password using SQL Server Configuration Manager.

Use following procedure, it's for SQL 2005 but will apply:
Fixing Startup Failure of SQL Server Agent Service in SQL Server 2005
shanj

ASKER
Hello Daniel!
      right on the Target the logon user is defined as NT AUTHORITY\NETWORKSERVICE

I do not find this user in my login so i tried to create this user
CREATE LOGIN [NT AUTHORITY\NETWORKSERVICE] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO

GETTING THE FOLLOWING ERROR
Msg 15401, Level 16, State 1, Line 1
Windows NT user or group 'NT AUTHORITY\NETWORKSERVICE' not found. Check the name again.

??
Daniel_PL

Try following
USE [master]
GO
CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS WITH
DEFAULT_DATABASE=[master]
GO

Open in new window

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
shanj

ASKER
Daniel!
   getting the same error
"Msg 15401, Level 16, State 1, Line 1
Windows NT user or group 'NT AUTHORITY\NETWORKSERVICE' not found. Check the name again."

This is of utmost importance, hope to solve it today.
shanj

ASKER
Hello Daniel!
      the link u sent me it says that sql agent is not suported with the 2008 express ?
ASKER CERTIFIED SOLUTION
Daniel_PL

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
shanj

ASKER
The link helped me, did not read the entire replies.
Anyway found the solution in the link
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.