欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MS SQL 2008 发布订阅配置错误总结

程序员文章站 2022-05-20 12:28:19
...

最近 在配置SQL 2008的发布订阅功能时,遇到了几个小错误,顺便归纳总结一下(以后碰到各类关于发布订阅的错误都将收录、更新到这篇文章),方便自己在以后碰到这类问题时,能够迅速解决问题。毕竟人的记忆能力有时效性,时间久了,有可能有些东西就模糊了或

      最近在配置SQL 2008的发布订阅功能时,遇到了几个小错误,顺便归纳总结一下(以后碰到各类关于发布订阅的错误都将收录、更新到这篇文章),方便自己在以后碰到这类问题时,能够迅速解决问题。毕竟人的记忆能力有时效性,时间久了,美国空间,有可能有些东西就模糊了或忘了,好记性不如烂笔头。

错误1:在数据库服务器上新建本地发布服务时报错。

 

TITLE: New Publication Wizard ------------------------------ Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online. For help, click: ?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028) For help, click: ?ProdName=Microsoft+SQL+Server&ProdVer=10.50.4000&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------

View Code

 查看具体原因,是因为安装数据库实例时,香港虚拟主机,没有选择安装Replication components,需要添加Replication components,首先找到安装光盘或安装镜像文件,挂载到光驱或拷贝到某个文件目录,例如,我这边挂载后的安装介质位于Z盘,在运行里面输入cmd命令,转到Z盘,输入下面命令:

setup.exe /q /Features=Replication /InstanceName=MSSQLSERVER /ACTION=INSTALL /IAcceptSQLServerLicenseTerms ,然后耐心等待安装完成,从网上搜索的资料看,好像下面命令start /wait X:\Servers\setup.exe /qb INSTANCENAME=MSSQLSERVER ADDLOCAL=SQL_Replication也可,不过,这条命令我还没有试验过。不保证能够顺利执行。

 

错误2:The Process could not execute ‘sp_repcmd’ on ‘xxxx’

 

MS SQL 2008 发布订阅配置错误总结

                                                       (图2)

报错的具体细节如下所示:

DESCRIPTION: Replication-Replication Transaction-Log Reader Subsystem: agent xxxxx failed. The process could not execute 'sp_replcmds' on 'xxxxxx'.

MS SQL 2008 发布订阅配置错误总结

                                           (图3) 

错误3:Replication-Replication Distribution Subsystem agent xxxxxxx failed. The process could not read file 'xxxxxxx' due to OS error 3.

 

MS SQL 2008 发布订阅配置错误总结

                                                          (图4)

查看SQL SERVER日志文件,免备案空间,发现很多类似错误:

Date 6/28/2013 10:40:01 AM

Log SQL Server (Current - 6/28/2013 10:39:00 AM)

Source spid454

Message 

Replication-Replication Distribution Subsystem: agent xxxxxxxxxx failed. The process could not read file 'xxxxxxxxxxxxxxxxxx' due to OS error 3.

 Date 6/28/2013 10:40:01 AM

Log SQL Server (Current - 6/28/2013 10:39:00 AM)

 Source spid454

 Message

 Error: 14151, Severity: 18, State: 1.