Groups | Blog | Home
all groups > sql server replication > december 2006 >

sql server replication : drop replication


Q. John Chen
12/12/2006 3:41:43 PM
Here was my problem.

I have a database with replication. All I need to do was restore the
database from a backup (totally different data from another server).
The restore process was messed up because I was not aware there is
replication in place. So the database status is always loading. I have
to use sp_removedb and then restore the db.

But the publication is still there (with a push subscription). Can not
do anything with Enterprise manager either. So I did a
sp_dropReplication but I later noticed that I have to do
sp_dropsubscription first.

Now I am stuck:

I can not drop the subscription (complaining error 20026 can not find
publication)
and I can not create publication either (compaling there is already a
subscriptin)

Anyone just tell how to get rid of this and I can start over.

Thanks

John
prakashcn NO[at]SPAM hotmail.com
12/13/2006 12:58:54 AM

Hey

If u hav droped the publication already dont wory forget it
and continue.

The other way is in the publication DB u hav some tables
which keep tracks of the subcription info just clear that
rows also. or just drop the subscription DB also

And other thing what u hav done is u hav droped the DB
If the DB is droped then automatically publication is deleted
and related information tables are also deleted which holds
the subscription information

I really dont know what is stoping u to continue to restore DB
from the backup and dont get panic and start the
restore process

-Cheers - Prax


[quoted text, click to view]
Q. John Chen
12/13/2006 7:15:47 AM
Hi,

The MS document says to do sp_dropReplication AFTER
sp_dropSubscription.

I dropped publication first so the subscriptions became orphant.

I fixed it by manaully deleting entry in distribution..MSsubscriptions
table. After that I was able to re-create publication and then the
subscription.

Thanks

John

[quoted text, click to view]
AddThis Social Bookmark Button