Deleting Replication Databases 
Author Message
 Deleting Replication Databases
Why do I get the SQL-DMO error 'This database cannot be
deleted, it is being used for replication' when I have
deleted all publications and subscriptions associated with
the database?


Sat, 28 Feb 2004 18:41:33 GMT
 Deleting Replication Databases

Have you specified to not replicate the database as well ?

Check sp_dboption.

--
Tony Rogerson SQL Server MVP
Torver Computer Consultants Ltd
http://www.sql-server.co.uk


Quote:
> Why do I get the SQL-DMO error 'This database cannot be
> deleted, it is being used for replication' when I have
> deleted all publications and subscriptions associated with
> the database?



Sat, 28 Feb 2004 19:08:06 GMT
 Deleting Replication Databases
Tony,

This is set to False and the same error. Is this database
stored in a system table somewhere, flagged for
replication?

Quote:
>-----Original Message-----
>Have you specified to not replicate the database as well ?

>Check sp_dboption.

>--
>Tony Rogerson SQL Server MVP
>Torver Computer Consultants Ltd
>http://www.sql-server.co.uk



>> Why do I get the SQL-DMO error 'This database cannot be
>> deleted, it is being used for replication' when I have
>> deleted all publications and subscriptions associated
with
>> the database?

>.



Sat, 28 Feb 2004 19:39:37 GMT
 Deleting Replication Databases
When you run sp_dboption 'yourdb' what does it return ?

--
Tony Rogerson SQL Server MVP
Torver Computer Consultants Ltd
http://www.sql-server.co.uk


Quote:
> Tony,

> This is set to False and the same error. Is this database
> stored in a system table somewhere, flagged for
> replication?

> >-----Original Message-----
> >Have you specified to not replicate the database as well ?

> >Check sp_dboption.

> >--
> >Tony Rogerson SQL Server MVP
> >Torver Computer Consultants Ltd
> >http://www.sql-server.co.uk



> >> Why do I get the SQL-DMO error 'This database cannot be
> >> deleted, it is being used for replication' when I have
> >> deleted all publications and subscriptions associated
> with
> >> the database?

> >.



Sat, 28 Feb 2004 20:05:09 GMT
 Deleting Replication Databases
I run the following to completely clear out any trace of replication:

On the old subscriber database/machine:
    DELETE MSreplication_subscriptions
    DELETE MSsubscription_agents
    DELETE MSsubscription_properties

and then on the publishing machine

-- Disabling the replication database
use master




Quote:
> Why do I get the SQL-DMO error 'This database cannot be
> deleted, it is being used for replication' when I have
> deleted all publications and subscriptions associated with
> the database?



Sat, 06 Mar 2004 05:26:31 GMT
 Deleting Replication Databases
I've managed to find a 'cheat'!! If you take the database offline it allows you to delete it. If anyone can explain to me why this works it would be good to know....

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 07 Mar 2004 18:59:51 GMT
 Deleting Replication Databases
Because an offline database has had everything disabled which allows you to
bypass all of the normal checks and just delete it.

--
Please post ALL replies to the newsgroups unless specifically directed
otherwise.
Mike Hotek
SQL Server MVP
http://www.mssqlserver.com
"Aim high. you can never achieve more than you aspire to." Al Ries



Sat, 13 Mar 2004 22:44:42 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Deleting the replication stuff left in the unpublished database

2. Deleted Synchonized Database on SQL Server 2000 - Still see the Merge/Transact items under Replication Monitor

3. Deleting records from a recordset without deleting from the database

4. instead of delete trigger delete data from table using execute and temporary table for deleted

5. SQL delete query deletes but does not delete

6. Records deleted during replication

7. Publisher Deletes merge Replication

8. Merge replication deleting records on subscriber after sync

9. Access2k- #Deleted# in Field Display for Merge Replication Tables

10. Cannot delete table published for replication

11. delete table from replication

12. Records getting deleted in merge replication on Synchronization after applying S


 
Powered by phpBB® Forum Software