SQL Server Performance

Help me- Replicate a table without primary key

Discussion in 'Performance Tuning for SQL Server Replication' started by tuankm, Nov 18, 2004.

  1. tuankm New Member

    Hi all

    I set up a transactional replication between two server (Server A and Server B). In Server A, I have a table that do not have a privary key field (but have many date) and I want to replication (transactional replication) the table. Can you tell how I have to do ?

    Thanks in advance.
  2. Twan New Member

    you have to either find a combination of unique non null columns or add a surrogate key (i.e. identity field) or use snapshot replication for that table...

  3. tuankm New Member

    Thanks Twan, Other ideal ???

  4. tuankm New Member

    Hi, the second problem with replication is as the following:

    The objects that I want to replicate are Tables, Stored Procedure, Views and User Defined Functions. But in the process to make a replication, I do not see Views, User Defined Objects to chose. Can you tell me the reason ?

  5. Twan New Member

    replication only really copies the data, not the structure or other objects. If you wanted to replicate those then you'd need to look towards something like logshipping

    I'm not sure why MS decided to not allow replication of the actual objects, like sps, views, etc.

  6. tuankm New Member

    Thanks Twan
    MS allows replicate tables, stored procedures, but don't allow replicate views, user defined objects.
  7. Twan New Member

    when MS says that is replicates stored procedures, pretty sure that it only replicates the calling of the procedures not the actual procedure code itself...

  8. tuankm New Member

  9. satya Moderator

    Views are virtual tables and you can script them to transfer.

    Satya SKJ
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page