Transactional replication, table ownership and primary key generation

  • Hi,

    I'm fairly new to replication and had a few questions that I couldn't seem to find the answer to.

    1. When I replicate a non-dbo owned table, it replicates as a dbo owned table. Is there anyway for it to automatically keep ownership? (Other than manually setting it up in the 'Article defaults')

    2. Whenever I publish new articles to a subscriber, the newly created table is omitting the primary key. Is there an option I'm missing or must I manually create the new primary key on each table for the subscriber?

    Thanks in advance.

  • This was removed by the editor as SPAM

  • Execute a CREATE TABLE script at the subscriber to create tables exactly how they exist in production.

    On the Snapshot tab for each article, select 'Delete all data in the existing table'. This executes a truncate command at the subscriber for each table, NOT a DROP TABLE  statement. When the Drop table option is used, replication creates the table without any Primary Key or FK, or Identity properties...

    Regards,

    ChrisB MCDBA OCP MyDatabaseAdmin.com

    Chris Becker bcsdata.net

  • Thanks Chris.

    Is this perhaps changed in SQL 2005? Also, does anyone know of a website that lists changes made to replication in the new version?

  • hi Aryan,

    I also have the same problem. But in snapshot tab i selected "Delete data in existing table", still the primary keys are getting deleted in subscriber database tables. In Snapshot tab i tried selecting "Include Referntial Integrity" option. Still the problem is same. I am also helpless

  • hi Aryan,

    I also have the same problem. But in snapshot tab i selected "Delete data in existing table", still the primary keys are getting deleted in subscriber database tables. In Snapshot tab i tried selecting "Include Referntial Integrity" option. Still the problem is same. I am also helpless

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

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