症状

假设你有 Microsoft SQL Server 2008 R2、SQL Server 2012 或 SQL Server 2014 事务复制环境。 环境中有多个 SQL Server 分发实例。 在这种情况下,可能会发生访问冲突,并且 SQL Server 复制分发代理崩溃。 此外,还会生成一个小转储文件。

SQL Server 的每个新的累积更新均包含以前的累积更新中包含的所有修补程序和所有安全修补程序。 查看 SQL Server 的最新累积更新:

SQL Server 2008 R2 Service Pack 1 的修补程序更新程序包此问题的修复程序在 SQL Server 2008 R2 Service Pack 1 的修补程序更新包中首次发布。

状态

Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。

更多信息

应用修补程序后,将以下脚本添加到分发代理作业:DECLARE @JobID BINARY(16)DECLARE @AgentID intDECLARE @command varchar(max)DECLARE JobCur CURSOR FOR SELECT Job.job_id, Agent.id FROM msdb.dbo.sysjobs AS Job INNER JOIN msdb.dbo.syscategories AS Cat ON Job.category_id = Cat.category_id INNER JOIN msdb.dbo.sysjobsteps AS Steps ON Job.job_id = Steps.job_id INNER JOIN distribution.dbo.MSdistribution_agents AS Agent ON Job.job_id = Agent.job_id WHERE Job.name like '%Put Text Mask To Identify Your Publisher DB Jobs Here%' AND Cat.name = 'REPL-Distribution' GROUP BY Job.job_id, Agent.id HAVING COUNT(step_id) = 3OPEN JobCurFETCH NEXT FROM JobCur INTO @JobID, @AgentIDWHILE @@FETCH_STATUS = 0 BEGIN IF (@JobID is not NULL) BEGIN set @command = N'if (select top 1 runstatus from MSdistribution_history where agent_id = ' + convert(varchar, @AgentID)+ N' order by timestamp desc) = 5 raiserror(''Agent was scheduled for retry. Performing restart now'',16,1)' EXEC msdb.dbo.sp_add_jobstep @job_id=@JobID, @database_name=N'distribution', @step_name=N'Check for retry', @step_id=4, @on_fail_action=4, @on_fail_step_id=1, @command=@command EXEC msdb.dbo.sp_update_jobstep @job_id=@JobID, @step_id=2, @on_success_action=4, @on_success_step_id=4 END FETCH NEXT FROM JobCur INTO @JobID, @AgentID;ENDCLOSE JobCur;DEALLOCATE JobCur;GO

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×