To fix the error which occurs after the Windows server name been changed, when trying to update or delete the jobs previously created in a SQL Server 2000 instance, or attaching msdb database.
Error 14274: Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server. The job was not saved.
Reason:
SQL Server 2000 supports multi-instances, the originating_server field contains the instance name in the format ‘server\instance’. Even for the default instance of the server, the actual server name is used instead of ‘(local)’. Therefore, after the Windows server is renamed, these jobs still reference the original server name and may not be updated or deleted by the process from the new server name. It’s a known problem with SQL2000 SP3.
Fix/Workaround/Solution:
In order to solve the problem you should perform the following steps:
From the Query Analyzer run following steps in order:
SELECT @@servername
and verify if it shows the correct SQL server name.
a) If not, run:
sp_dropserver <'name_returned'>
and then:
sp_addserver <'correct_servername'>, 'local'
to change the SQL server name.
Please restart SQL server service to let the new configuration takes effect.
b) If yes,
Please check the originating_server column in msdb..sysjobs by running:
SELECT *
FROM msdb..sysjobs
and verify if all jobs have the correct server name for originating_server.
If not, update this value with the correct server name by running following script
USE msdb
GO
DECLARE @server sysname
SET @server = CAST(SERVERPROPERTY('ServerName')AS sysname)
UPDATE sysjobs
SET originating_server = @server
WHERE originating_server = '<wrong_servername>'
Reference: Pinal Dave (http://www.SQLAuthority.com),
http://support.microsoft.com/default.aspx?scid=kb;en-us;281642
104 Comments. Leave new
Thanks so much!
Worked perfectly
Thanks so much. Fixed my problem too.
Really, really, great work! You helped me sooo much!
Thanks a lot!
JSK
Great…Thanks for your help
Thanks a load… You’re GREAT
Just what I needed! You’re the best!
I just ran it like this
DELETE
FROM msdb..sysjobs
and it took them all off for me, if you don’t want to remove them all then put the name of the backup like
DELETE backup1
FROM msdb..sysjobs
This worked really well for me
Thank you very much
This works perfectly. Thanks a lot for always sharing useful stuff!!
Thanks Pinal. Worked well and saved a lot of time.
TY Pinal.
Thank you. This is just one of your posts that really helped me.
We restored an image of our server so all jobs goofed up because of server renamed. And your solution just worked like a charm.
Best wishes to you.
You are superb.. Pinal
Thanks a lot..
Thanx Matey!
This is still very effective after all these years. Thank you for writing it.
Thanks!!
This worked perfectly. Many thanks! Both my production server and standby server names have been set properly. Thanks Again, Ed K
Thanks
Pinal, by any chance do you happen to know Sumit Dave?
He looks remarkabally like you.. just like your long lost brother. Have you been to kumbh?
– KK
Fabulous… worked just as expected… 5 stars for this effort