Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 How Do I End Replication

Author  Topic 

hismightiness
Posting Yak Master

164 Posts

Posted - 2005-08-08 : 13:51:01
Argh! I have what up until now has been an excellent book. It Professional SQL Server 2000 Programming from Wrox. I also have the Microsoft Press SQL Server 2000 book. Both talk about how to start and use replication but neither tell you how to effectively stop it and drop the associated tables. I must not be getting my search parameters right either, because I am not getting my answer here or on Google.

I set-up a single table for replication on a host server (distributor) and was sending it to a single remote subscriber on a push subscription. However, my testing is done and I used the wizard on the host SQL Server to disable distribution. Everything appears to be fine on the host, but the subscriber still has the subscribed table and its associated merge subscription tables. I cannot drop any of them.

Can someone please assist me in dropping those tables?

- - - -
- Will -
- - - -
http://www.servicerank.com/

mblythe
Starting Member

16 Posts

Posted - 2005-08-08 : 16:21:01
Try this. If these procs execute successfully, you should be able to drop the tables at the Subscriber. If they do not execute successfully, let me know.

To delete a push subscription to a snapshot or transactional publication
1. At the Publisher on the publication database, execute sp_dropsubscription. Specify @publication and @subscriber. Specify a value of all for @article. If the Distributor cannot be accessed, specify a value of 1 for @ignore_distributor to delete the subscription without removing related objects at the Distributor.

2. At the Subscriber on the subscription database, execute sp_subscription_cleanup to remove replication metadata in the subscription database.

To delete a push subscription to a merge publication
1. At the Publisher, execute sp_dropmergesubscription, specifying @publication, @subscriber and @subscriber_db. If the Distributor cannot be accessed, specify a value of 1 for @ignore_distributor to delete the subscription without removing related objects at the Distributor.

2. At the Subscriber on the subscription database, execute sp_mergesubscription_cleanup. Specify @publisher, @publisher_db, and @publication. This removes merge metadata from the subscription database.


Michael Blythe
Technical Writer
SQL Server Replication - Microsoft
---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Go to Top of Page

hismightiness
Posting Yak Master

164 Posts

Posted - 2005-08-08 : 17:01:38
Excellent! The second one is the one which did it for me. Sorry, but my next question may be completely elementary in the SQL world, but how do I drop the MsMerge tables now? They are system objects. Should I even worry about them? I just want to be sure that I am keeping the databases as tidy as possible. :)

- - - -
- Will -
- - - -
http://www.servicerank.com/
Go to Top of Page

hismightiness
Posting Yak Master

164 Posts

Posted - 2005-08-09 : 07:56:44
EM wouldn't allow me to drop those tables, but I could with QA. I guess EM is just trying to protect the system tables. Thanks for your help!

- - - -
- Will -
- - - -
http://www.servicerank.com/
Go to Top of Page

mblythe
Starting Member

16 Posts

Posted - 2005-08-09 : 12:07:53
I'm happy to hear that worked out for you.

Michael Blythe
Technical Writer
SQL Server Replication - Microsoft
---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Go to Top of Page
   

- Advertisement -