Groups | Blog | Home
all groups > sql server replication > november 2005 >

sql server replication : sp_removedbreplication wrong owner in conflict table


John230873
11/20/2005 4:31:03 PM
When removing and resotring a replicated database I have an issue where a
conflict table wont remove itself as it is expecting the owner of this table
to be the same as the owner of the table it is replicating.
I have been searching the internet and have found another post that sums it
up well.

Is this a bug in the store procedure ?

I've got quite fu**ed up merge replication still sitting on one DB and I
cannot remove it. When I run sp_removedbreplication db_name I get an error
that it cannot delete conflict table. Now, as I was checking how to correct
this error, I see that sp_MSarticlecleanup is trying to delete those tables.
But the problem is, that when it tries to do this, it uses owner name of the
real table; here's an example:
I have table1 who's owner is joe. Now SQL thinks that the conflict table for
this table1 should also be owned by joe, but it's not. My case is like this:

Original table: joe.table1
Conflict table: dbo.conflict_pub_name_table1

So if you'll check the sp_MSarticlecleanup it tries to find the owner of
original table and then it tries to delete owner.conflict_table table and I
cannot change this anywhere. I also cannot delete those tables manualy as
they are marked as System tables ...
Any hintS?! Can I alter the MSarticlecleanup just for this, so I can
'hardcode' the owner of conflict tables just for this one time run? I tried
to give my self a permission to alter this stored procedure, but no luck; I
can only set EXEC permission.

Any hints greatly appreciated!

Kind regards,
Dejan
Hilary Cotter
11/21/2005 8:28:28 AM
This was supposed to have been fixed in SP 4. What sp are you running?

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

AddThis Social Bookmark Button