On one of our servers the sqlseragent was running fine. But now it is not running. We se the option to start the server agent each time the OS starts. Even when I tried to start the agent manually from service manager it is not starting. Would any one help on this urgently.
Also how can we identify under what account any job runs. The reason is when we deleted some NT user accounts one of the job failed as this job runs under that userid. But in the properties it shows that sa is the owner of that job. What is best way to create a job so that these jobs run under one userid so that it won't fail when we delete users.
Look at the properties page for the SQL Server Agent and see what account it is running under. You may have deleted the account it was using. Alternatively, you can open Services under Administrative Tools and view what account it is running under.
As for the owner of jobs, right-click on the job and choose properties. You will see a drop down box called Owner. You can set the desired owner here.
Thanks It worked. Actually what happend is the SQL server agent is running under sa. Recently we changed the password for sa. When I used this new password then the SQL Agent started.
My question is when ever we change the password for sa, and when the sql server starts with this new login password, doesn't the Agent also start with
this new password. Do we have to manually change the login password for the Agent?
For the second question, this particular job was failed because we deleted the userid and the error says that the job did not find the specified user. But when I checked the properties the owner is showing as sa. I am not sure why it got that error. That is why I wanted to find out from all the jobs which runs under the deleted username.
My preference for SQL Server Agent is to use a Domain account, rather than a SQL Server Login. This allows SQL Server Agent to access network resources under the credentials of a domain account. This might be necessary if you want a job to move a file to a network share, or a similar operation. We use the same domain account that the SQL Server Service uses, though you could use two different ones if you want to.
As far as the credentials for the Job, I would create a SQL Server Login specifically for Jobs. It's a little more secure and also provides you with the added benefit on not having to worry about your jobs every time you change the SA password.