MS SQL Server: Error 14724 – MSX server

2 04 2007

I wanted to change several jobs on our MS SQL Server just now. I got the following error when I tried saving a job after deleting a step:

Error 14724 Cannot add, update, or delete a job (or its steps or
schedules) that originated from an MSX server.

After using my friend (Google that is), I found out that the reason for the error is that a job remembers the name of the server on which it was originally created on. If the name of the server changes after the job has been created, and you want to edit that job, it will not be possible to do so.
The only solution is to change the originating_server attribute of the job to the current servername.

You can do this by executing the following transact-sql command:

UPDATE msdb.dbo.sysjobs
SET originating_server = CONVERT(nvarchar, SERVERPROPERTY('servername'))
WHERE originating_server <> CONVERT(nvarchar, SERVERPROPERTY('servername'))

Do note that some solutions online will offer the following answer:
UPDATE msdb.dbo.sysjobs
SET originating_server = @@SERVERNAME
WHERE originating_server <> @@SERVERNAME

Which is not entirely correct, as @@SERVERNAME doesn’t automatically update itself, as explained here [ msdn.microsoft.com ]:

Although the @@SERVERNAME function and the SERVERNAME property of SERVERPROPERTY function may return strings with similar formats, the information can be different. The SERVERNAME property automatically reports changes in the network name of the computer.

In contrast, @@SERVERNAME does not report such changes. @@SERVERNAME reports changes made to the local server name using the sp_addserver or sp_dropserver stored procedure.

Make sure you first do a select * from msdb.dbo.sysjobs to make sure you don’t mess up your system ;)

Technorati Tags: , , , ,


Actions

Information

4 responses

31 10 2007
Woil

Thanks!

11 04 2008
MCDBA - SQL Server 2000 - MCSEboard.de MCSE Forum

[...] vielleicht Hilft folgender Link für die Zukunft: MS SQL Server: Error 14724 – MSX server « Room of a Muzik Souldjah Gruss [...]

19 11 2008
Error 14724 Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server | VB

[...] fix: UPDATE msdb.dbo.sysjobs SET originating_server = CONVERT(nvarchar, SERVERPROPERTY(’servername’)) WHERE originating_server <> CONVERT(nvarchar, SERVERPROPERTY(’servername’)) [...]

20 03 2009
Piommagat

Was ist das?

Leave a comment