How To Fix Replication Job Id Mismatches

TODO:  Have you ever had a "the specified @job_id does not exist" error when trying to start a replication job?



--STEP 1 : get the data to use for the new job id
select job_id, * From msdb.dbo.sysjobs where name like '%MY-JOB-NAME%'

--STEP 2 : now get the id to use for the update 
select id, * From distribution.dbo.msmerge_agents where name like '%MY-JOB-NAME%'

--STEP 3 : use job_id obtained in STEP 1 as the GUID in this statement.  Use Id from step 2 as the WHERE clause id in this statement
update distribution.dbo.MSmerge_agents set job_id=CONVERT(binary(16), cast('A08B3687-8D56-45D1-8FB3-252ACB81A104' as uniqueidentifier)) where id=61



No notes on this topic

Add comment

  Country flag

  • Comment
  • Preview