Error when creating job from script

  • I have one SQL 2000 server with some jobs.  I generated some SQL scripts from those jobs.  On a second server with the same databases I try to run the script in query analyser so that i can recreate the jobs on the new server and I get errors.

     

     

    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.

     

     

    If i run the script on the original server it runs OK.

     

    My goal is to get these jobs from one server on to the other one.  Is there a better way?

     

  • if possible change the owner of the job to "sa" and then script.  I am not sure but this might work.

    Can you post your job script

     


    Kindest Regards,

    Amit Lohia

  • That fixed it

     

    thanks

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply