in Projects, Programming, Technology

Problem Deleting SQL Job

Problem:

When deleting a SQL job, receive this error: “Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.”

Diagnosis:

SQL is confused because the server was recently renamed

Solution:

DECLARE @srv sysname
SET @srv = CAST(SERVERPROPERTY(‘ServerName’) AS sysname)
UPDATE sysjobs SET originating_server = @srv

Source:

Keith Kratochvil

Write a Comment

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.