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)
 Add Primary Keys

Author  Topic 

jrockfl
Posting Yak Master

223 Posts

Posted - 2006-05-23 : 15:07:02
I would like to setup transactional replication on a database, but none of the tables have primary keys defined. Each table does appear to have an IDENTITY column with auto increment.

If I just go in and set this column as the primary key, would it "break" anything??

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-05-23 : 15:16:55
It probably will not break anything. Things will break if ever someone manually adds data to the identity column and it violates the PK (uniqueness).

Tara Kizer
aka tduggan
Go to Top of Page

jrockfl
Posting Yak Master

223 Posts

Posted - 2006-05-23 : 16:14:51
Thanks Tara. I just noticed on two of the tables that I had planned on replication, that the create date was today. So it looks like after the accounting department "posts" the previous days data, the tables are dropped and recreated...so there goes my key!
Go to Top of Page
   

- Advertisement -