Groups | Blog | Home
all groups > sql server replication > january 2006 >

sql server replication : Replication errors - vicious circle


TahoePete
1/19/2006 5:27:03 PM
When I try to create a transactional publication, when I select the table I
want to replicate, I get the error "This table cannot be published because it
does not have a primary key column. Primary key columns are required for all
tables in transactional publications".

Then When I try to make the necessary changes to the table, such as adding a
column for the primary key, I get the error "Unable to modify table. Cannot
drop the table "tablename" because it is being used for replication."

I have never successfully replicated this table or any other. I can find no
evidence of any publications to remove.

I'm stuck!
TahoePete
1/19/2006 6:53:02 PM
Just answered my own question after reading thru a ton of posts on this forum.

"run sp_removedbreplication on each database..."

Thanks Paul Ibison!



[quoted text, click to view]
Hilary Cotter
1/19/2006 10:01:38 PM
Issue the following statements

sp_MSunmarkreplinfo 'ProblemTableName'

Then you need to update the colstat column

sp_configure 'allow updates', 1
go
reconfigure with override
go
UPDATE syscolumns
SET colstat = colstat & ~4096
WHERE colstat & 4096 <>0
go
sp_configure 'allow updates', 2
go
reconfigure with override
go


--
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]

TahoePete
1/20/2006 9:34:03 AM
I receive the error "ad hoc updates to system catalogues are not allowed"
from the update command.

[quoted text, click to view]
Hilary Cotter
2/1/2006 4:12:05 AM
I'm not sure what is wrong here - this command should enable this

sp_configure 'allow updates', 1
go
reconfigure with override
go


--
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