Mark Brown's Blog

TFS, Visual Studio, SQL Server, BizTalk, SharePoint, .Net, and more ...

Unable to delete or disable SQL Server job due to error regarding MSX server

Have you ever run across this error before when trying to delete or disable a SQL server job (or edit one):
Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.  

This sometimes can happen if you rename a server to another name after you have created your jobs and you try to disable a SQL job.   This may be fine if you use a management server, however if you are sure you do not have a management server and you want to fix it up continue to read on.

To inspect all your job information use this command. 

use msdb
select * from sysjobs

To make all your jobs, owned so to speak, by the server, issue the following command after you make reasonable precautions (backups, backups, etc): 

use msdb
DECLARE @srv sysname
SET
@srv = CAST(SERVERPROPERTY('ServerName') AS sysname)
select @srv
select * from sysjobs
UPDATE sysjobs SET originating_server = @srv
select * from sysjobs

Published Saturday, January 26, 2008 9:54 AM by mab
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

MSDN Blog Postings » Unable to delete or disable SQL Server job due to error regarding MSX server said:

January 26, 2008 1:33 PM
 

Mixx said:

Thanks this did the trick!  Much better than Microsoft's solution which is to script, delete and rebuild the scripts!

August 3, 2009 9:07 AM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker