Whilst taking over from the outgoing DBA I wrote this handy query to list the SQL-Jobs he owned …
--list_job_owners.sql SELECT name job_name, SUSER_SNAME(owner_sid) job_owner FROM msdb.dbo.SysJobs ORDER BY name;
… and here’s the code to change them to ‘sa’ …
--change_job_owners.sql
EXEC msdb.dbo.sp_manage_jobs_by_login
@action = N'REASSIGN',
@current_owner_login_name = N'SomeLoginName',
@new_owner_login_name = N'sa';