Groups | Blog | Home
all groups > sql server replication > september 2003 >

sql server replication : sp_removedbreplication


Chris
9/12/2003 2:13:15 PM
I have been trying to remove replication from a SQL2000
db with sp_removedbreplication 'TimeMatters5'. When I do
it gives me an error message.

Cannot drop the
table 'tm5user.conflict_TimeMatters5_Tutor_webhist',
because it does not exist in the system catalog.

Shouldn't 'tm5user.conflict_TimeMatters5_Tutor_webhist'
be 'dbo.conflict_TimeMatters5_Tutor_webhist'

Any help/suggestions?

Thanks,
Hilary Cotter
9/15/2003 4:59:35 AM
Yes it should be.

When I run into problems like this I normally build a
table called tm5user.conflict_TimeMatters5_Tutor_webhist,
typically by doing a select into.

Then I continue to try to drop the publication.

[quoted text, click to view]
Chris
9/15/2003 10:12:02 AM
Thanks. I did a couple of conflict tables and it seems to
be working.

Could you please help on writing a t-sql that changes all
conflict tables to the tm5user. Otherwise I will be
typing for a week.

I am going to start a new post about this also.

Thanks again for the help,
Chris


[quoted text, click to view]
Kestas
9/18/2003 4:55:12 PM
Sounds like a workaround, but not a solution :)

Generally I would say that it is quite problematic to create/drop merge
publication with articles owned "not by dbo user". Various problems occur in
the process of adding additional articles, deleting existing publications,
etc. That happens because of some "bugs" (or we could call it
"incompleteness") in system stored procedures related to replication.

In my case I had to create merge replication which was publishing tables
owned not by dbo on SQL Server 2000 SP3. To be able to create replication,
add articles afterwards and drop publication I had to fix 3 system stored
procedures. Target of fixes was correct handling of table owners (fully
qualified references were added), because system procedures were unable to
locate objects only by name. Here are those procedures:

sp_addmergearticle
sp_MSarticlecleanup
sp_MSgettablecontents

Of course changing system stored procedures does not sound as a best option,
but as a software developer I can say that there are bugs in those stored
procedures :) For example following excerpt of code is quite funny :)

Excerpt from MS SQL Server SP3 stored procedure sp_MSarticlecleanup:
/*
** We are not owner_qualifed this conflict table because it is created by
snapshot agent */
select @qualified_name = QUOTENAME(@ownername) + '.' +
QUOTENAME(@conflict_table)


Regards,
Kestas


[quoted text, click to view]

AddThis Social Bookmark Button