February 3, 2009 at 6:51 am
Dear All,
I have a table that has a huge number of data, this table has no primary key.
I need to create a replication that replicate this table and any new transactions applied to this table.
And so, I think I should choose either "Transactional publication" OR "Transactional publication with updatable subscriptions", but in both options it does not accept to create this replication because the source table has no primary key.
How can I solve this problem to create a good replication? :hehe:
Regards
February 3, 2009 at 7:20 am
lol...you know the answer....you'll have to add a primary key to the table
...even if nothing uses it business wise, you can add an idnetity() column, make it the primary key,a dn you'd be good to go.
If your table has a clustered index, I'd leave it wherever it is, and not let it put a Clustered index on the new identity(0 column, since it doesn't help with any searches agaisnt that table.
Lowell
February 3, 2009 at 7:21 am
You really need to have a primary key for replication to work, otherwise the rep-agent would not know what rows need updating.
So my suggestion would be to add primary key, is there a reason you do not have one?
February 3, 2009 at 7:22 am
obarahmeh (2/3/2009)
Dear All,I have a table that has a huge number of data, this table has no primary key.
I need to create a replication that replicate this table and any new transactions applied to this table.
Without a primary key, the nly replication method you can use is snapshot, which copies the entire table every time it runs. There is no way to d transactional replication without a primary key.
Why can't you add a pk to the table?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply