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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Trouble scheduling jobs
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

21 Posts

Posted - 09/25/2007 :  11:26:19  Show Profile  Reply with Quote
When I try to create a scheduled job using a script I get the following error message. I am an SA. Not sure why this is happening. It happens when I script some jobs from another server by not others on the same server.

Server: Msg 515, Level 16, State 2, Procedure sp_add_job, Line 105
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.


Patron Saint of Lost Yaks

30421 Posts

Posted - 09/25/2007 :  11:35:07  Show Profile  Visit SwePeso's Homepage  Reply with Quote
The error message is very informative.

Why can't you insert NULL value in column owner_sid in table msdb.dbo.sysjobs?
Because the column do not accept NULL values...

E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Flowing Fount of Yak Knowledge

7266 Posts

Posted - 09/25/2007 :  23:29:05  Show Profile  Reply with Quote
You can copy job in dts.
Go to Top of Page

Starting Member

2 Posts

Posted - 03/03/2010 :  15:28:21  Show Profile  Visit baghul's Homepage  Reply with Quote
I have seen this error also when I am moving jobs from one server to another one.
You have to make sure:

1. The original job owner exists in the target server
2. If you have a different user in the target server, replace the following,

@owner_login_name=N'old_owner' to @owner_login_name=N'new_owner'


Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000