Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help!--deleting a database on replication

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all. I am having trouble deleting a database through EM. I created this database by restoring a backup of a database from another server which happened to be set for replication. I was using this for a test database. Now, I want to delete it. However, it says that it can't be deleted because it is "published for replication".

So, with my infinite wisdom (or lack thereof), I decided I would add replication to the server then remove it. Then I thought I would be able to delete the database. Wrong... I tried that and when I Disable Publishing (i.e. remove replication), I get a 'invalid object name "syssubscriptions"'. Now, at this point, I have a database I can't delete and a server setup for replication. I would like to remove both!

Any ideas at all? Your help is greatly appreciated.

Thanks,

Steve S
sms@hmbnet.com
 
I figured out the answer. I added the table "syssubscriptions" to the database. This was not simple to do because system tables cannot be copied. I created the T-sql statement by 1) creating a test database and making it a publication database. 2) I actually edited the sysobjects table and make the syspublication row look as similiar to a user table. I then was able to script the table. 3) Then, I ran the script on the database I was trying to remove from publication. 4) Then, I tried to actually remove it from publication, but then I needed to add the "sysarticles" tables. I repeated steps 1-4 to do this. Finally, I was able to remove it from publication, and then delete it!

I sure hate to modify system tables, but I knew of no other alternative!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top