Error 14377
The schedule was not attached to the specified job. The schedule owner and the job owner must be the same or the operation must be performed by a sysadmin.
After little mind boggling I was able to resolve the issue and heres the simple solution and root cause I noticed.
Cause: The Job if was created by login 'abc' then two objects are created as:
Job Owner = abc
Schedule Owner = abc
If you change the job owner later to 'def' then now you end up having:
Job Owner = def
Schedule Owner = abc
.. and so the error
My Resolution: Being 'admin' myself - took job script in a window and dropped the existing job from object explorer. Ran the retained job script on other window adding EXECUTE AS and REVERT cmds as follows so as to have both job and schedule created by 'abc' and not my ID. That was the trick :)
USE msdb
GO
EXECUTE AS LOGIN = 'abc'
GO
-- -- -Job Script here -----
GO
REVERT;
GO
Tuesday, October 6, 2009
Subscribe to:
Posts (Atom)