all groups > sql server replication > december 2004 >
You're in the

sql server replication

group:

Can't get rid of distribution db


Can't get rid of distribution db RML51
12/7/2004 2:55:15 PM
sql server replication:
I have a separate server that is used as the distributor. We have our
production replication using a db called DistributorProd on this server
(this was built several weeks ago). I was doing some testing, so I created a
second db called DistributorTest on this server. After I was done testing, I
used the Wizard to remove the test replication. For some reason the
DistributorTest db is still there and I can't delete it. It says that it's
being used by replication. Any ideas on how to get rid of this? Is it
possible that my PROD replication is somehow now using both the
DistributorProd and DistributorTest dbs?

Thanks

Re: Can't get rid of distribution db Mario Splivalo
12/7/2004 11:41:05 PM
[quoted text, click to view]

I presume you tried 'stop publishing' wizzard from the Replication menu?

Mike
--
"I can do it quick. I can do it cheap. I can do it well. Pick any two."

Mario Splivalo
Can't get rid of distribution db Paul Ibison
12/8/2004 4:26:17 AM
Try
exec sp_removedbreplication 'dbname'
go
exec sp_dboption 'dbname, 'published', 'FALSE'
go
exec sp_dboption 'dbname, 'merge publish', 'FALSE'
go
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Re: Can't get rid of distribution db Paul Ibison
12/8/2004 6:01:54 AM
OK - it looks like I misunderstood - perhaps these
databases are distribution databases? What happend if you
run sp_helpdistributor - do you get back both rows?
If this is the right track and you right-click the
replication monitor and select properties, it sould be
possible to delete the extra distribution database from
here.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Re: Can't get rid of distribution db RML51
12/8/2004 7:34:46 AM
Thanks but it didn't work.

I tried running this on the publishing server, but the dbs I used for the
test no longer exist. I had deleted them after I ran the "Disable Publishing
and Distribution Wizard" and when I was through testing.
BTW - it was a Transactional replication test.

I think I need to reset something on the distribution server. I've looked
through BOL, but haven't found anything yet.

[quoted text, click to view]

Re: Can't get rid of distribution db RML51
12/8/2004 8:19:25 AM
sp_helpdistributor only returns one row.

On the distribution server, when I right-click/properties on the Replication
Monitor it only shows the DistributionProd db. The DistributionTest db that
I want to delete doesn't appear.

[quoted text, click to view]

Re: Can't get rid of distribution db RML51
12/8/2004 10:09:23 AM
Well I found this on another forum and it worked.

First, I made a backup of Northwind and restored it to my DistributorTest
db.
Then I could delete the DistributionTest db.

[quoted text, click to view]

Re: Can't get rid of distribution db josemuller
12/8/2004 12:39:06 PM
You could have updated master..sysdtabases directly:
update master..sysdtabases
set category = 0
where [name] = <defunctdbname>
and category = 1

BTW, you must enable updates to system databases for this to work.


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