Results 1 to 8 of 8

Thread: Transactional replication

  1. #1
    Join Date
    Sep 2004
    Posts
    26

    Transactional replication

    Hi

    I am tring to implement transactional replication.

    How do i publish tables which donot have primary keys?...because transactional replication seems to publish only the tables which has a primary key.

    Thanks

    Madhukar

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    You can't publish tables without primary keys. You have to give the tables primary keys first.

  3. #3
    Join Date
    Sep 2004
    Posts
    26
    What is the best way to generate primary keys...Sequence numbers?

    Madhukar

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Any short column with fixed values.

  5. #5
    Join Date
    Feb 2003
    Posts
    1,048
    In your case, if you don't already have a key field in the data, you're probably best off adding an identity field to the table(s).

  6. #6
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    your subscriber will lose identity property if you are using identity column on your tables. Then you have to do customized replication

    refer my article
    http://databasejournal.com/features/...le.php/3483421

  7. #7
    Join Date
    Feb 2003
    Posts
    1,048
    You don't need to worry about the identity property not getting transferred to the subscriber unless you plan to write to the subscriber. If you are planning to write to the subscriber and want those new records to be replicated back to the publisher, you should consider using merge replication or transactional replication with updating subscribers.

    Otherwise, don't worry about the identity property on the subscriber.

  8. #8
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    preserving identity propery is important if you are planning to use your subscriber as your primary database when your primary server goes down. (Using replicated server as high availablity failover server)

    In that case you can use customized replication.

    If you use merge replication, replication wizard adds a GUID column on all the tables that you are replicating. Make sure you application can handle it.

    If you have insert statements without column names as shown below, your application will fail.

    insert into table1 select 'a','b','c'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •