Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Change a job user?

Author  Topic 

taunt
Posting Yak Master

128 Posts

Posted - 2013-05-30 : 17:33:52
Hello I'm on sql 2008 and I have a job that keeps erroring out after starting. The job is set up to update my website, so I have log in info saved. When it starts it says executed by user workgroup. I need to change it to sql/administrator. Right now it is set up that the ower is admin, but it doesn't use that to execute. How do I change that setting?

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2013-05-31 : 01:43:17
Its a good practice you have job owner to 'sa'.
To change the job owner you can use the below script

USE [msdb]
GO
EXEC msdb.dbo.sp_update_job @job_name=N'Your Job Name',
@owner_login_name=N'DOMAIN\ThenewOwner'
GO


mohammad.javeed.ahmed@gmail.com
Go to Top of Page

taunt
Posting Yak Master

128 Posts

Posted - 2013-05-31 : 11:54:44
Hello solved my problem. It was cause of the agent log in. I changed the log in for sql server agent to administrator under services, and I'm good.
Go to Top of Page
   

- Advertisement -