Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Replication without Primary Keys?

Author  Topic 

Hannibal
Starting Member

20 Posts

Posted - 2002-06-07 : 14:35:17
Just like the title says ... is this possible? Don't ask why there aren't primary keys, because I don't know. :)

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-06-07 : 14:58:09
quote:

Just like the title says ... is this possible? Don't ask why there aren't primary keys, because I don't know. :)



NO

setBasedIsTheTruepath
<O>
Go to Top of Page

jbates
Starting Member

9 Posts

Posted - 2002-08-01 : 15:18:04
I disagree. I'm using merge replication in my SQL Server 7 db. One table doesnt have any primary keys. It does have a rowguid col which has data type uniqueidentifier and default newid. But no cols are keys.

John

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-01 : 15:32:38
From Books Online, "How Merge Replication Works":
quote:
Microsoft® SQL Server™ 2000 identifies a unique column for each row in the table being replicated. This allows the row to be identified uniquely across multiple copies of the table. If the table already contains a column with the ROWGUIDCOL property that has a unique index or primary key constraint, SQL Server will use that column automatically as the row identifier for the publishing table.

Otherwise, SQL Server adds a uniqueidentifier column, titled rowguid, which has the ROWGUIDCOL property and an index, to the publishing table. Adding the rowguid column increases the size of the publishing table. The rowguid column and the index are added to the publishing table the first time the Snapshot Agent executes for the publication.
You might not have declared the GUID column as primary key, but the replication agents will use it as such. It may be just a regular unique index, but in any case, there must be some kind of unique identification for each row in order for any kind of replication to work.

Go to Top of Page

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2002-08-02 : 11:25:51
I know you're using merge, but with transactional in SQL7 as you go through the publishing wizard screens. When you get to the one where you select tables it says only tables with PKs can be published for replication at the top of the window.

Paul
Go to Top of Page
   

- Advertisement -