当你试图删除或者变更一个table时,出现以下错误
Server: Msg 3724, Level 16, State 2, Line 1
Cannot drop the table 'object_name' because it is being used for replication.
比较典型的情况是该table曾经用于复制,但是后来又删除了复制
处理办法:
select * from sysobjects where replinfo >'0'
sp_configure 'allow updates', 1
go
reconfigure with override
go
begin transaction
update sysobjects set replinfo = '0' where replinfo >'0'
commit transaction
go
rollback transaction
go
sp_configure 'allow updates', 0
go
Server: Msg 3724, Level 16, State 2, Line 1
Cannot drop the table 'object_name' because it is being used for replication.
比较典型的情况是该table曾经用于复制,但是后来又删除了复制
处理办法:
select * from sysobjects where replinfo >'0'
sp_configure 'allow updates', 1
go
reconfigure with override
go
begin transaction
update sysobjects set replinfo = '0' where replinfo >'0'
commit transaction
go
rollback transaction
go
sp_configure 'allow updates', 0
go
本文介绍了解决SQL Server中因复制导致无法删除表的问题。通过调整配置并更新系统表的复制信息,可以有效移除不再使用的复制设置,从而允许正常进行表的删除或变更操作。
2775

被折叠的 条评论
为什么被折叠?



