Monday, 4 February 2008

Error scripting SQL Agent jobs

" Msg 515, Level 16, State 2, Procedure sp_add_job, Line 137
Cannot insert the value NULL into column 'owner_sid', table 'msdb.dbo.sysjobs'; column does not allow nulls. INSERT fails.
The statement has been terminated. "

This occurred scripting a job from one server to another.

The solution? Create the user that owns the job first!

No comments: