Error 14274 Cannot Add Update Delete Job
Contents |
360 games PC games
Sp_add_jobserver
Windows games Windows phone games Entertainment All Entertainment sp_delete_job Movies & TV Music Business & Education Business Students & educators
Sp_dropserver
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums SQL Server 2008 Forums Transact-SQL (2008) Cannot add, update, or delete a job (or its https://support.microsoft.com/en-us/kb/281642 steps Reply to Topic Printer Friendly Author Topic rosetulip Starting Member 15 Posts Posted-06/28/2013: 23:58:43 I have a trouble to merge two jobs into a master script file by sharing the same globalization declaration. If I run separately, it works fine.The two jobs are testdbname jobtestnewdb jobIt comes up with the following errorsI got many these http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186495 messageMsg 14274, Level 16, State 1, Procedure sp_add_job, Line 132Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.Msg 14274, Level 16, State 1, Procedure sp_add_job, Line 132Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.Msg 14274, Level 16, State 1, Procedure sp_add_job, Line 132 Here is two job scriptUSE [msdb]GODECLARE @LLC_DATABASE_NAME NVARCHAR(100) = N'LLC'DECLARE @LLC_LOG_IN_NAME NVARCHAR(100) = N'LLC'DECLARE @Roll_Back_Server NVARCHAR(100) = N'(local)'IF EXISTS (SELECT job_id FROM msdb.dbo.sysjobs_view WHERE name = N'testdbname')EXEC sp_delete_job @job_name = N' testdbname' , @delete_unused_schedule=1IF EXISTS (SELECT job_id FROM msdb.dbo.sysjobs_view WHERE name = N'testnewdb')EXEC sp_delete_job @job_name = N'testnewdb' , @delete_unused_schedule=1/****** Object: Job [testdbname] Script Date: 06/25/2013 16:41:15 ******/BEGIN TRANSACTIONDECLARE @ReturnCode INTSELECT @ReturnCode = 0/****** Object: JobCategory [Database Maintenance] Script Date: 06/25/2013 16:41:15 ******/IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'Database Maintenance' AND category_class=1)BEGINEXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'Database Maintenance'IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollbackEND-- testdbname jobDECLARE @jobId BINARY(16)EXEC @ReturnCode = msdb.dbo.sp_add_job @job_name=N'testdbname', @enabled=1, @notify_level_eventlog=0, @notify_level_email=0, @notify_level_netsend=0, @notify_level_page=0, @delet
add, update, or delete a job (or its steps or schedules) that originated from an MSX server. http://www.sqlserver-query.com/sql-server-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 error 14274 the format server\instance. Even for the default instance of the server, the actual server name is used instead of (local). After the Windows server is renamed, these jobs still reference the original server name and may not be updated or error 14274 cannot deleted by the process from the new server name. It’s a known problem with SQL2000 SP3. Fix --Verify Server Name SELECT @@servername If SQL name is not correct run. -- if no sp_dropserver <'nameReturned'> -- and then sp_addserver <'correctServername'> , 'local' Print 'Your server name has now been changed, restart SQL Service so changes will take effect.' If SQL name is correct run. --check originating_server column SELECT * FROM msdb..sysjobs --if not USE msdb GO DECLARE @server sysname SET @server = CAST(SERVERPROPERTY('ServerName')AS sysname) UPDATE sysjobs SET originating_server = @server WHERE originating_server = '
Database Engine Tuning Advisor SQL SERVER - Create Database Role with simple example using tsql Script » SQL Server Error 14274 - Cannot add, update or delete a job (or its steps or schedules) that originated from an MSX server 7 Nov 2014 | SQL Server Database Maintenance Error 14274 occurs when you try to update a sql agent job after renaming server name. If sql server is running on the server then after renaming windows server, you need to update sql server name. Otherwise when you will try to add, update or delete a job on sql server, it will throw below error. SQL Server 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. Because MSDB stores server name in originating_server field under sysjobs table. So now whenever you will try to access jobs information it will refer to old server. SQL server 2000 supports multiple instances so for default instance also it store server name instead of local. Fix-Workaround-Solution To fix this problem, one option to drop old server name using system stored procedure in sql server and then add new server name and restart the services. a. Run the below query SELECT @@servername b. Run system stored procedure to drop server sp_dropserver ‘old server name' c. Run system stored procedure to drop server sp_addserver ‘new server name' d. Restart sql server services to takes change e. Again perform the step 1 to verify the updated server name. Now you can run query against sysjobs table to see the changes in originating_server field. 2. To resolve this problem by using manual method (script out) 1. Revert the server back to old name. 2. Generate script for all sql jobs and delete them. 3. Rename the server to the new name. 4. Execute the script generated by step 2. If all above solution doesn't work for you then run update command to server name in sysjobs table. UPDATE sysjobs SET originating_server = ‘New Server Name' Where originating_server = ‘old Server name' Leave a Reply Cancel Reply Author (required) Email (will not be published)(required) Website + 9 = 15 « SQL Server Profiler – Collect Workload data for Database Engine Tuning Advisor SQL SERVER - Create Database Role with simple exam