Transactional Replication woes!

  • Hello,

         I am fighting with Transactional replication (on Win2003 and SQL Server 2000). I set up the publication, put a copy of the database to be replicated on the subscriber, then set up the subscription. I told it not to initialize the subscriber (already has data), but when I get the replication going, it strips out the Primary Keys on the subscriber database. Is there a setting I am missing or something that I am not doing that would keep this from happening?

  • Chris,

    You might want to look under the options against each table replicated in the articles tab on the publication. There are a number of otions there that might help under snapshot.

    I have a similar problem, but because I have different indexes and RI on the subscriber I have a pre-snapshot script to rip out the RI, and a post snapshot script I run manually to put it all back again.

    It's not nice but it does get the job done.

    Rob Blackmoor

  • ChrisMoix,

    It will not replicate COMSTRAINTS, or FILEGROUPS. You can specify to replicate indexes, but not PKs

     

  • The primary keys are already there on the subscriber. What I can't figure out is why it keeps dropping the primary keys on the subscriber during the initial snapshot.

    Rob, thanks for the idea. I'll think about that. I'm also considering Merge replication. It shouldn't strip out the PKs in merge (hopefully).

     

    Chris

  • The reason is that the snapshot process actualy drops the existing tables and rebuilds them. If you want to use the structure and data that you already have then do not use snap shot.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply