Cannot drop the database XXX because it is being used for replication
2015-03-18 10:13
686 查看
解决方法
1、Recreate a replication on this DB for the purpose dropping it. After I drop the replication, I was able to drop the DB.
2、将数据库Offline然后再删除就可以了
SQL 2000的脚本
1、Recreate a replication on this DB for the purpose dropping it. After I drop the replication, I was able to drop the DB.
2、将数据库Offline然后再删除就可以了
SQL 2000的脚本
-- Removes Replication Flag for all Tables in the Database -- using sp_MSunmarkreplinfo SET NOCOUNT ON DECLARE @tablename NVARCHAR(128) DECLARE @RC INT DECLARE curTable CURSOR FOR SELECT [name] AS tbl FROM sys.tables OPEN curTable FETCH NEXT FROM curTable INTO @tablename WHILE @@FETCH_STATUS = 0 BEGIN EXECUTE @RC = dbo.sp_MSunmarkreplinfo @tablename FETCH NEXT FROM curTable INTO @tablename END CLOSE curTable DEALLOCATE curTable GO
相关文章推荐
- Cannot drop the database ‘XXX’ because it is being used for replication.
- Cannot drop the database ‘XXX’ because it is being used for replication.
- Cannot drop the database ‘XXX’ because it is being used for replication.
- Error 3724:Cannot drop the table 'object_name' because it is being used for replication.
- Error 3724:Cannot drop the table 'object_name' because it is being used for replication.-ZT
- IIS:The process cannot access the file because it is being used by another process.
- the process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- 处理文件时遇到:The process cannot access the file because it is being used by another process.
- FileStream:The process cannot access the file because it is being used by another process
- C# The process cannot access the file because it is being used by another process
- Database 'xxx' cannot be upgraded because it is read-only or has read-only file Make the database or files writeable, and rerun recovery.
- C#使用Create创建文件后,报The Process cannot access the file because it is being used by another process的异常
- VS2010 + Sql Server Express 2008 R2 如何安装(兼谈错误:The database 'XXX' cannot be opened because it is version 661. This server support
- FileStream:The process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- 【转】IIS: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
- the process cannot access the file because it is being used by another process
- Solution: The process cannot access the file [filename] because it is being used by another process.