Sunday, February 19, 2012

How to stop replication of a database?

When trying to drop a test database I get an error can't delete because it
is being usefor replication. But in the replication monitor there is no
publisher. I removed it. How can I stop this db from being used for
replication and then drop it?
Thks for any help
RD
Hi,
To remove replication, you can use Disable Publishing and Distribution
Wizard in SQL Server Enterprise Manager.
The Disable Publishing and Distribution Wizard in enterprise manager is
written to handle
this situation, and will remove all the replication settings.
To get to the wizard:
- Right click on the Replication folder in the server tree (or any child
node of the Replication folder)
- Select Disable Publishing and Distribution
- Go ahead in clicking next in the Wizard
After the removal, you could try dropping your database
Thanks
Hari
SQL Server MVP
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>
|||Try sp_removedbreplication. See SQL Server Books Online for more
information. Also use sp_dboption to mark the database as not published, if
needed.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>
|||Thanks to you both
RD
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>

No comments:

Post a Comment