Transactional Replication-Using Articles not Published

  • Hi ALL,

    I have set up Transactional Replication from server 1 to server 2. It runs fine. Now I want to delete records from server 1 on articles replicated. The delete t-sql contains articles which are not replicated. So how does replication work under the hood ?

    I want the records to be deleted even on server 2

    How does it work. Will replication give me an error about the article not published or will the log reader agent pick the records to delete and delete them on server 2.

    Thanks,

  • Hi Suri,

    Even though, your t-sql contains objects which are not replicated, the records will be deleted from the subscriber.

    For example, if your t-sql command is:

    delete a

    from dbo.tbArticle a

    inner join dbo.tbTable t

    on a.col = t.col

    Under the hood, on the subscriber individual rows would be deleted using primary key as follows:

    delete from dbo.tbArticle where pk_col = @id

    Regards,

    Suresh

  • Thank you

Viewing 3 posts - 1 through 2 (of 2 total)

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