mysql的复制订阅_如何删除发布与复制订阅数据库 'distribuion' 的方法
之前因為從VFP數據庫中把數據導入到SQL SERVER2000中,用DTS做了發布與復制數據庫'distribution'?,現在要把它刪除,當在企業管理器中執行刪除時,提示下面的錯誤:
Error 3724: cannot drop the database 'distribution'?because it is being used for replication.
解決方法:
一、首先要備份 master 數據庫,在查詢分析器選擇 master 數據庫下操作:
sp_configure 'allow updates',1
reconfigure with override
go
update master..sysdatabases set category = 0 where name='distribution'
delete the distribution database
執行了上面的命令,就可以在企業管理器中刪除'distribution'數據庫了。
二、方法討論:
1、如果你只執行這條命令:update master..sysdatabases set category = 0 where name='distribution'
會出現錯誤:Ad hoc updates to system catalogs are not enabled. The system administrator
must reconfigure SQL Server to allow this.
所以你在必須先執行:
sp_configure 'allow updates',1
reconfigure with override
go
這條命令允許更新,上面的錯誤才能解決。
2、也可以移除,自己翻譯一下 ^_^: Make sure that you did not enable this database for replication by using the sp_helpreplicationdboption system stored procedure. Do not enable the database for replication. If it is enabled for replication, run the sp_removedbreplication stored procedure to disable replication.
IMPORTANT: Running sp_removedbreplication on a database removes all replication objects from the database. Therefore, all publications and subscriptions in the database are removed. Only members of the sysadmin fixed server role can run the sp_removedbreplication stored procedure. For more information about the sp_removedbreplication stored procedure, see the "sp_removedbreplication, Transact-SQL Reference" topic in SQL Server Books Online.
To run the sp_removedbreplication stored procedure, use the following code in which you replace dbname with the name of your database:
執行命令:?? sp_removedbreplication 'distribution'
參考英文資料:
http://www.ureader.com/message/145316.aspx
http://support.default.aspx?scid=kb;en-us;326352
總結
以上是生活随笔為你收集整理的mysql的复制订阅_如何删除发布与复制订阅数据库 'distribuion' 的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苹果13专注模式怎么关闭
- 下一篇: redis种类型对应java类型_Red