Hello everyone! We had an issue this week where SQL Server Agent did not restart automatically. Weekly maintenance runs on the server each Sunday in which a reboot of the server occurs. Both SQL Server and SQL Server Agent are set to auto-start when OS starts. SQL started fine, but SQL Server Agent didn't.
Anyone know of a reason why SQL Server Agent wouldn't have restarted? Also, does anyone know of a way to set something up that would alert me (through email) if this service hasn't restarted?
I am not successful in getting SQL Server Agent to startup when SQL server starts up.
I believe the problem has to do with a lack of permissions or rights. I will list the steps below which seem to me to be all that are needed to install SQL Server Agent. I used Enterprise Manager to get this information.
If anyone can shoot any holes in the process, please do, that may be where my problem lies.
a. Created NT accounts called MSSQLSERVER for the server and MSSQLSERVERAGENT for SQL Agent.
b. Each of these accounts has the "right" to logon as a service.
c. Each of these accounts has "admin" rights.
d. Each of these accounts has been added to SQL SERVER under Security and Logins.
e. The properties assigned to each of the accounts are: (1) on the general tab -- Windows NT authentication is in effect, database is master and language is English (2) on the server roles tab -- System Administrators is checked (3) on the database access tab -- the master database is checked
f. Under SQL Server Agent, properties, selecting the General Tab, in the frame titled "service startup account": (1) the circle labelled "this account" is clicked (2) the account is filled in using domain namemssqlserveragent (3) the correct password is filled in taking case into consideration
g. Under SQL Server Agent, properties, selecting the Connection Tab, in the frame titled "sql server connection": (1) the circle labelled "use windows NT authentication" is clicked
h. Right clicking the server and selecting properties show a multi-tab window (1) the general tab shows that all three autostart boxes are checked (2) the security tabs shows SQL Server and Windows authentication are in effect (3) the startup service account shows "this account" selected and the account is filled in with domain namemssqlserver and the password is filled in (taking case into consideration)
In all cases above, the domain name is not the domain in which the server resides, but is in a "trusted" domain.
I have a SQL Server 2000 that failed to start after a Windows reboot.Agent properties are checked to auto start if stopped. Under the AgentError Log, I have the following data:Information:SQL Agent stopping because of Windows shutdown.SQL Agent terminated normally.Error:SQL Server Error: 1115, cannot generate SSPI context SQLState HY000.Logon to server(local) failed.Help apprecaited. ThanksFrank*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
Hello, I'm working on some maintenance task. I need some O/S system to start my SQL Service when it found stopped due to error or els any reason. I mean, when due to error if they fail, they have to start automatically by O/S.
Hi Experts, I have a table with fields: remindWHO remindWHEN remindWHATsomeone@test.com 6/20/05 do blah blah I want SQL Server Agent automatically run every morning at 1:00 AM, check against "remindWHEN" date, if match with current date, send out email to "remindWHO" for what they need to do in "remindWHAT" I was told this can be done by using the "Jobs" feature under SQL Server Agent to do this, but I don't know how to write Transact-SQL-Script under "Job Step". Please help me. Or any better alternative?I appreciate for any help.
We are having problems w/ our agent. When we try to start it in computer management, it will say the agent started then stopped because it has nothing to do. In surface area config, when we try to start it it times out. Does anyone have experience with this? We are desperate. Thanks!
I cannot run SQl Server Agent service. Each time I try I get these 2 errors
Event Type:Error Event Source:SQLAgent$MY_INSTANCE Event Category:(2) Event ID:17310 Date:18/06/2007 Time:09:27:49 User:N/A Computer:MY SERVER Description: A user request from the session with SPID 53 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data:
Event Type:Error Event Source:SQLAgent$MY_INSTANCE Event Category:Service Control Event ID:103 Date:18/06/2007 Time:09:27:49 User:N/A Computer:MY SERVER Description:
SQLServerAgent could not be started (reason: SQLServerAgent cannot start because the msdb database is not set to a compatibility level of 70 or higher).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
I am on SQL Server 2005. Do you have any ideas what might cause it and how to fix it?
I cannot run SQl Server Agent service. Each time I try I get these 2 errors
Event Type: Error Event Source: SQLAgent$MY_INSTANCE Event Category: (2) Event ID: 17310 Date: 18/06/2007 Time: 09:27:49 User: N/A Computer: MY SERVER Description: A user request from the session with SPID 53 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data:
Event Type: Error Event Source: SQLAgent$MY_INSTANCE Event Category: Service Control Event ID: 103 Date: 18/06/2007 Time: 09:27:49 User: N/A Computer: MY SERVER Description:
SQLServerAgent could not be started (reason: SQLServerAgent cannot start because the msdb database is not set to a compatibility level of 70 or higher).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
I am on SQL Server 2005. Do you have any ideas what might cause it and how to fix it?
I need to start SQL Server Agent so that I can run scheduled jobs. I am running SQL Server 7.0 with windows NT 4.0 service pack 4. When I try to start the agent I get the following error
Error 22003: StartService() returned error 5,'Access is denied'
Does anyone have an idea as to why this is happening? Any help with this problem would be appreciated. Thanks
hi guys i keep getting this error when trying to start the sql server agent service.
"The SQLSERVERAGENT service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service".
the SQL server service starts fine and i tryied starting the agent with the same user but it fails still.
I have 2 servers that are members of the same AD Domain.
I need an account that can login to either one, but needs to be able to start a service, which my network admin says a local domain administrator cannot do.
So, I just decided to create an account with the same name, properties and password on both machines.
This I did. The account is a member of local Windows Administrator group on each server. Additionally, it is an SQL account on the SQL Server local instance, and a member of the SysAdmin group.
I can assign this account to SQL Server as the startup account (Log in with this account). That works fine. However, when I assign this account to SQL Server, then SQL Server Agent quits running. So I try to assign this same account to this service and I get an error that the account 'Unknown' cannot login and needs to be a member of the SysAdmin group!??
This is a completely confusing error message since the account is a Windows Admin, SQL Server SysAdmin account and can start SQL Server fine without a hitch.
Two NT accounts have been created on the server. MSSQLSERVER MSSQLSERVERAGENT
These accounts have been given: a. logon rights b. unchangeable passwords c. passwords which never expire d. NT admin rights
Questions:
a. Do I have to create a login account within SQL Server 7 itself for these accounts? b. Must the properties for "this account' box on the general tab include the domain name? c. If the answer to (b) is yes, then can I use ".MSSQLSERVERAGENT" in the "this account" box on the general tab? d. Does the SQL Server Agent function require the "BUILTINadministrators" login in order to work?
Any help in figuring out why I can't get my SQL Server Agent to startup will be appreciated!!
I have a job in SQL Server agent with 199 SSIS steps and growing. In the job log only 99 steps are shown, which is a problem if a step higher than 99 fails to run. I need the steps to run in sequence and preferable would like to split the job into several jobs each containing no more than 99 steps. The only thing I don't know is if it is possible to have the next job in sequence start only when the previous job has finished.
Does anyone know if this is possible, and if so how it is done?
I would appreciate any help here at all. I am pulling my hair out!
I am unable to start the snapshot agent or log reader agent from within SQL management studio. it fails on executing step 2 with unknown username or bad password.
I have checked all account details and they are correctly using my domain admin account. I can connect to SQL using teh same account and it also has sysadmin permissions.
If i copy the step 2 paramters and start from the cmd prompt (again logged in using the same domain account) they both start fine.
I am testing peer to peer replication in our environment. I simulated a three node peer to peer topology and a local distributor.
For some wierd reason I cannot get the Log Reader Agent and snapshot agent to start. The domain account under which SQL Server Agent runs has administrator previlage on the box. I also use a domain account for SQL Server Service. (none of the passwords changed).
This is the error I am getting - "Executed as user: abc. A required privilege is not held by the client. The step failed"
Hello, I've configured SQL Server 2000 for merge replication and am trying to start the snapshot agent for the publication and after about 20 minutes of it trying to start, it gives up with this error.
Server execution failed
There is no more information in the event viewer. I've tried it with a bunch of different subscriptions. SQL Server and SQL Agent are running under a local account which has access to the replcation data directory. SQL Agent is running.
Had some big problems with my SQL Server 2008 R2 SP1 during the last maintenance running on Windows Server 2008 R2 Enterprise ( upgraded from Standard). I'm getting the following error,
"SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online."
I did a google search and found others with the problem but the resolution isn't working for me. I ran the following commands, heck I ran them multiple times. No errors come back running these commands. But the same error keeps happening, I even restart the service and then the server again.
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Agent XPs', 1; GO RECONFIGURE GO
The msdb got too big for the disk it was on. I had maintenance plans to clear out the all of histories but I didn't think of the mail items. When I finally saw this problem I tried clearing them out using the stored procedures only with it finally failing because the transaction log got full. Since we didn't have a lot of jobs scheduled I decided to just recreate the msdb. So I scheduled a maintenance window, download SQL Server Service Pack 3.
my steps are as follows: ->diff backup of msdb ->stopped the service and started it again with: NET START MSSQLSERVER /T3608 ->detached msdb with: SQLCMD -E -SP-SRVR-SQL-01 -dmaster -Q"EXEC sp_detach_db msdb" ->moved it off the drive ->restarted the service without any startup flags ->recreated msdb with: SQLCMD -E -SP-SRVR-SQL-01 -i"D:Microsoft SQL ->ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb.sql" -o"D:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb62715.out"
I looked at the log file and there were no actual error messages so I applied service pack 3 and restarted server after it installed, was actually prompted to restart. In my tests I was never prompted to restart the server.Now I never started the agent service after recreating the msdb database since I knew it wasn't on the same version. I just went directly to the latest SP. Our applications are running fine but now I cant do scheduled backups.
Hi again! I would like to thank the 2 persons which I had an answer from my previous question first. Thanks a lot !
But, it didn't quite answer my question so I'll give a bit more info. I would like to know if I can make a batch file, that excutes or starts an active script in SQL Server Agent (that is in SQL Enterprise Manager). If I can, can you give me more info on how to do it (command line, parameters), a web site, anything that can help me to that.
If I cannot do that, let me know please. Thanks a lot!
I have used the script file to make a transcation repliation. All the things goes well except a bug, when the script executed over, the snapshot does not start copy at once and need me go to the enterprise manager and right click it in the replication monitor to start it, I just want to start it auto when finish executing the script . How should I do ?
We currently have SQL Server 6.5 installed on 2 servers and did not specify to automatically start the mail client. When I display the Server Configuration/Options screen in Enterprise Manager, the Auto Start Mail Client check box option is grayed out. How can I change these servers to automatically start the mail client at startup?
I set up SQL Agent to start up on a domain account with Administrator rights, and the auto-restart option is on. However, the agent does not restart automatically when restarting SQL Server. No problems restarting manually. The Event Viewer logs the following: "SQLServerAgent security context does not have server-autorestart privileges."
I changed my server's service account to Domainsqladmin and the service started successfully.
I did the same for SQL Agent but the service starts and stops. In Event Viewer saw this error:
SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).
I checked Logins under under security in SSMS and the Domainsqladmin is a member of SysAdmin roles. What's wrong?
Is it possible to manually force/call/start the system AUTOSHRINK process? I have an issue that appears only when the engine shrinking process is running and I need this to reproduce my bug.
I know how to start a "regular" database shrink process with:DBCC SHRINKDATABASE(xxxx);, but this is not the same as one started from the database engine.
I'm trying to set up SQL 7 for replication, so I set SQLAgent to start automatically, same as SQL Server itself. SQL Server starts fine, but SQL Agent "fails to connect in a reasonable time" according to the Event log (3000 milliseconds).
Can you suggest how I go about fixing this? They both are using valid logins, so I don't know what else could be wrong.
I have a problem with a server where for some reason when it is rebooted the SQLAgent service does not start automatically. You have to go into control panel, services and start it, even the it is set to Automatic.
We restored a database with replicated tables. Now, the Log Reader Agent will not run. This displays: "The process could not execute 'sp_repldone/sp_replcounters' on 'ourservername'." In Error Details for the agent: "The process could not set the last distributed transaction." And, from the logs: "ForwardLogBlockReadAheadAsync: Operating system error 998(Invalid access to memory location.) encountered."
Does anyone know how we get the Distribution database and the Log Reader running again? It is only affecting Transactional replication (not snapshot or merge).