[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1684
  • Last Modified:

Replication without Primary Key?

I need to do replication (from sql 2000 server to sql 2005 server) on a table that doesn't have a primary key/unique Id.  However, the table is a third party system table used by a program that I don't have any control over.  Is there a way to replicate without adding an id column to the table?  I'm afraid that if I add a column, it is going to cause problems with the program.  Thanks!
0
CMCONE
Asked:
CMCONE
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
no, that is not possible.
you will need to "replicate" on a copy of the table (and do the changes to that table some other way), or "replicate" without the sql server replication.
0
 
CMCONEAuthor Commented:
Is there a way to create a view on the table and add the id to the view?  Grasping at straws with that, I know.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Is there a way to create a view on the table and add the id to the view?
that would mean, generate on-the-fly a primary key value, which would potentially change every time you run the query...

no, you need to have this primary key column persistent somehow...
0
 
Maxi84Commented:
You could create a new table that replicates the structure of the 3rd party table + a primary key.  Insert the data from your 3rd party system into that table and then writie some logic that periodically compares the data in your table against the 3rd party data, and do inserts/updates/deletes as needed.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now