Replication problem with foreign keys


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Replication problem with foreign keys

  1. #1
    Rimvis Guest

    Replication problem with foreign keys


    Hi, I have a problem with replication.
    I've made a merge replication. Replicating table has two foreign keys from
    other tables. Constraints on the diagram has option "Enforce relationship
    for replication" checked OFF. Replication snapshot has property "Include
    declared referential integrity" checked OFF.
    However, when I create publication, I get the message:

    -----------
    ...
    This publication contains references to primary keys outside the publication.

    The following tables are outside the publication, but contain primary keys
    that are referenced from inside the publication:
    <... two referenced tables goes here ...>
    Although you can change existing data in the referencing tables, you will
    not be able to add rows to those tables. If you want to add rows to the referencing
    tables, include the referenced tables as articles in the publication.
    ...
    -----------

    What's wrong? I want to replicate data in ONLY ONE table.


  2. #2
    Jason hawryluk Guest

    Re: Replication problem with foreign keys

    Are your primary key fields marked as not for replicaton?

    jason

    "Rimvis" <gurskis@ras.lt> a écrit dans le message news:
    3c96dc40$1@10.1.10.29...
    >
    > Hi, I have a problem with replication.
    > I've made a merge replication. Replicating table has two foreign keys from
    > other tables. Constraints on the diagram has option "Enforce relationship
    > for replication" checked OFF. Replication snapshot has property "Include
    > declared referential integrity" checked OFF.
    > However, when I create publication, I get the message:
    >
    > -----------
    > ..
    > This publication contains references to primary keys outside the

    publication.
    >
    > The following tables are outside the publication, but contain primary keys
    > that are referenced from inside the publication:
    > <... two referenced tables goes here ...>
    > Although you can change existing data in the referencing tables, you will
    > not be able to add rows to those tables. If you want to add rows to the

    referencing
    > tables, include the referenced tables as articles in the publication.
    > ..
    > -----------
    >
    > What's wrong? I want to replicate data in ONLY ONE table.
    >




  3. #3
    Rimvis Guest

    Re: Replication problem with foreign keys


    "Jason hawryluk" <jh@3gcomm.fr> wrote:
    >Are your primary key fields marked as not for replicaton?
    >
    >jason
    >


    nope ) I'll try this...

  4. #4
    Rimvis Guest

    Re: Replication problem with foreign keys


    "Jason hawryluk" <jh@3gcomm.fr> wrote:
    >Are your primary key fields marked as not for replicaton?
    >
    >jason


    I've tried this. Thats not the case.
    My table for replication has UID field as primary key. Related table identity
    type doesn't affect replication on other tables, I think.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center