怎样手工删除数据库里的Merge Replication信息
2004-12-15 16:53
441 查看
1. The best way is to run sp_removedbreplication.
2. After you run sp_removedbreplication, you may run the following
script in your restored database. This script will generate the drop
commands for replication related system tables, views, stored procedures
and triggers. You may check the generated output first to make sure it
does not drop your own user object, and then run the output to drop
these information.
set nocount on
Select 'drop table ' + name from sysobjects
where name like '%conflict%' and type='u'
Select 'drop table ' + name from sysobjects
where name like 'MSMerge%' and type='u'
Select 'drop trigger ' + name from sysobjects
where type = 'tr' and status < 0 and category = 2
Select 'drop proc ' + name from sysobjects
where name like 'sp_%' and type ='p' and category = 2
Select 'drop proc ' + name from sysobjects
where name like 'sel_%' and type ='p' and category = 2
Select 'drop view ' + name from sysobjects
where name like 'tsvw%' and type ='v' and category = 2
Select 'drop view ' + name from sysobjects
where name like 'ctsv%' and type ='v' and category = 2
3. (optional step) you may use the steps in the following article to
make sure your user objects are no longer marked as being used in
replication (by change the replinfo column of the sysobjects to 0. This
steps is only needed if the replinfo column is not 0):
http://support.microsoft.com?id=326352
4. (optional step) check the steps in the following article to make sure
no columns are being marked as replicated:
http://support.microsoft.com?id=811899
2. After you run sp_removedbreplication, you may run the following
script in your restored database. This script will generate the drop
commands for replication related system tables, views, stored procedures
and triggers. You may check the generated output first to make sure it
does not drop your own user object, and then run the output to drop
these information.
set nocount on
Select 'drop table ' + name from sysobjects
where name like '%conflict%' and type='u'
Select 'drop table ' + name from sysobjects
where name like 'MSMerge%' and type='u'
Select 'drop trigger ' + name from sysobjects
where type = 'tr' and status < 0 and category = 2
Select 'drop proc ' + name from sysobjects
where name like 'sp_%' and type ='p' and category = 2
Select 'drop proc ' + name from sysobjects
where name like 'sel_%' and type ='p' and category = 2
Select 'drop view ' + name from sysobjects
where name like 'tsvw%' and type ='v' and category = 2
Select 'drop view ' + name from sysobjects
where name like 'ctsv%' and type ='v' and category = 2
3. (optional step) you may use the steps in the following article to
make sure your user objects are no longer marked as being used in
replication (by change the replinfo column of the sysobjects to 0. This
steps is only needed if the replinfo column is not 0):
http://support.microsoft.com?id=326352
4. (optional step) check the steps in the following article to make sure
no columns are being marked as replicated:
http://support.microsoft.com?id=811899
相关文章推荐
- 怎样手工删除里的MergeReplication信息
- 怎样删除数据字典中不存在的表信息
- 灌入大量数据后手工采集统计信息的重要性
- 删除数据库里重复的记录
- 怎样删除软件残留在添加或删除程序中的信息?
- 拥有AES-XTS 256位硬加密和秘钥删除,企业数据安全性会怎样?
- 002--第一次成功删除之后,后续的删除会脏数据读取到第一次的记录信息id
- 删除信息[置顶] Java中怎样实现批量删除操作(Java对数据库进行事务处理)?
- delete-----magento后台数据信息删除----------
- 怎样删除一条信息
- SQL删除数据库里所有表的外键,同时删除所有用户表
- oracle 怎样快速删除一个表中全部的数据
- 请教各位高人,怎样打印一个数据表的信息
- CAD 图纸上的实体的扩展数据不能记数据库中的ID 因为数据库数据删除时,ID也被删除,这样就找不到该实体的信息了
- (十九)计算应用程序所有的缓存信息和删除应用程序的所有缓存数据
- 手工WINHEX数据恢复NTFS卷中误删除的文件
- Oracle中怎样查询、删除一张表中的重复数据
- 怎样删除数据库中重复的信息,只保留一条
- [转载]怎样高效删除Oracle数据库中的反双数据
- 怎样删除c3、c4重复的数据但要留下其中任意一条