Freigeben über


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

Comments