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

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

0341
Starting Member

USA
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.

-Phil

SwePeso
Patron Saint of Lost Yaks

Sweden
29910 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

rmiao
Flowing Fount of Yak Knowledge

USA
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

baghul
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'

Kash

Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.08 seconds. Powered By: Snitz Forums 2000