Groups | Blog | Home
all groups > sql server replication > august 2004 >

sql server replication : Replication removed but server says otherwise


Hussein Abd-Rabbo
8/26/2004 1:52:29 PM
I've got a big and urgent problem...

I need to alter some tables in a database. I had those
tables replicated. I removed the replication to make
thoses changes.

All the objects created by the replication are still
there, and the fields added in the tables also. When I
want to change a clustered index, It says :

- Unable to delete index 'PK_rel_cfp_sar'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL
Server]Cannot alter the table 'rel_cfp_sar' because it is
being published for replication.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
drop constraint. See previous errors.

The problem is, there is no more replication active!!

I've even removed the server as a distributor. Rebooted
the server, nothing works!!

What can I do? HELP ME!!!

Thanks in advance, Hussein.
Hussein
8/26/2004 6:23:03 PM
Thanks Paul writing me back, but it didn't worked.

The problem is at the publisher, I've disabled the server to be a Publisher
or Distributor. So it's very weird. The fields added in the tables for the
replication are still there, and I can't remove them. I can't change the
indexes either.

I've tried the two SP who told me, it says "The command(s) completed
successfully." and "1 row(s) affected", but still can't do anything...

Do you have another idea?

Thanks, Hussein

[quoted text, click to view]
Paul Ibison
8/26/2004 11:17:59 PM
Hussein,

Running sp_removedbreplication can be used to remove all traces of
replication in the subscriber database, but obviously must only be done if
this database is not also configured as a publisher.

If sp_removedbreplication can't be used, there is a stored procedure to do
this called sp_MSunmarkreplinfo which takes a tablename as a parameter.
Alternatively, setting replinfo to 0 in sysobjects for the particular table
should do it.

HTH,
Paul Ibison

Hussein Abd-Rabbo
8/27/2004 5:17:52 AM
The value is set to 1 for the table.
I also have many strored procedures who have a value of
512.

Hussein

[quoted text, click to view]
Hilary Cotter
8/27/2004 8:26:57 AM
also try to run

sp_msforeachtable 'sp_MSunmarkreplinfo ''?'''

in your publication database.

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


[quoted text, click to view]

Paul Ibison
8/27/2004 10:26:27 AM
This is very strange. Can you query replinfo in sysobjects for the problem
table and tell me the value.
TIA,
Paul Ibison

Paul Ibison
8/27/2004 1:32:38 PM
Hussein - OK set it to zero for the problem table and then you should be
able to change the table schema.
HTH,
Paul Ibison


[quoted text, click to view]

AddThis Social Bookmark Button