无法删除Oracle链接服务器?

时间:2015-12-03 23:04:11

标签: sql-server sql-server-2014

我想在SQL Server 2014中删除oracle链接服务器。但是,以下语句

EXEC master.dbo.sp_serveroption @server=N'LinkedSvr1', @optname=N'dist', @optvalue=N'false'
EXEC master.dbo.sp_dropserver @server=N'LinkedSvr1', @droplogins='droplogins'

返回

Msg 20582, Level 16, State 1, Procedure sp_MSrepl_check_server, Line 34
Cannot drop server 'LinkedSvr1' because it is used as a Publisher in replication.

更新 我在运行exec sp_dropdistpublisher '...'后删除了链接服务器。但是,它显示错误

Msg 21749, Level 16, State 1, Procedure sp_dropdistpublisher, Line 337
The Publisher was dropped at the Distributor, but information on the Publisher '....' was not dropped. Connect to the Oracle Publisher with SQL*PLUS and drop the replication administrative user.

1 个答案:

答案 0 :(得分:1)

@optname=N'dist'是启用或禁用分发服务器的选项。根据错误消息,此服务器是发布服务器,因此请尝试此操作:

EXEC master.dbo.sp_serveroption @server=N'LinkedSvr1', @optname=N'pub', @optvalue=N'false'