Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi Guys , Just need to know if

Status
Not open for further replies.

nikhilparchure

Programmer
Oct 6, 2001
121
0
0
AU
hi Guys ,
Just need to know if a primary key is mandatory on a table while setting up replication defination for a table.
Help appreciated
Thanks in advance

Regards
Parchure Nikhil
 
We are just going through this as well, and our DBAs tell us that we don't have to necessarily have a primary key defined on each table, but there must be at least a unique index on each replicated table. Clustered or non-clustered doesn't matter; neither does ignore-duprow.

Hope this helps!

-- Jennifer
 
Thanks Jenny ,
So what bolts out is that u need either a
clustered or a non-clustered index on the replicated table.
you have said something about duplicate rows...I need more inputs on that. Any more help would be appreciated.
Say I have a table that could have duplicate entries and still that table need to be replicated.Can I replicate those tables????.
Also the fact of why we need those indexes on replicated tables defination is not so clear to me Jenny would you pls consult your DBA's and clarify this.
I have my DBA's sticking to the argument that some uniqueness is required but are not able to deliver to me the exact reason as to why it is actually required!!!
Thanks a ton

Regards
Parchure Nikhil
 
Sorry, been on extended vaca...
Some uniqueness is required; the index has to be a unique clustered or nonclustered index.

As for duplicate entries, we did extensive cleanup of our tables that had dup entries. However, there are some cases where we could still have duplicate rows, and for these tables, we added an identity column to the table, to enforce some sort of uniqueness; setting the primary key to this new field.

As for "ignore_dup_row" flag on the index, it will throw out any row that is a duplicate, (i.e. not insert it, or "fail" the update) thereby not sending it into the transaction log, nor through the rep server.

Hope this helps!

-- Jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top