SQL Server Replication question

  • we have two databases A and B (which are identical in terms of having data, but B has extra indexes) . They both are in replication where A is the publisher and B is the subscriber.

    I have an ETL that loads data into table XYZ that is under replication. I only do an insert / update in the database A for this table but strangely replication is running a DELETE statement. I am not able to figure out why that can happen? Any information would be useful..

    Thanks in Advance.

  • What kind of replication , can you share the logs?

    Jayanth Kurup[/url]

  • Jayanth Thanks for the quick reply... Transactional replication it is. I don't have the logs to share.. any other thoughts or places I can look at?

  • you can start here

    https://support.microsoft.com/en-us/kb/238254

    Jayanth Kurup[/url]

  • Jayanth_Kurup (10/26/2015)


    you can start here

    https://support.microsoft.com/en-us/kb/238254%5B/quote%5D

    Thanks Jayanth, this is a great place to start with. Now that I understand a little what is happening, any idea how this can be fixed so that it will only update but not issue DELETE / INSERT statements?

  • Also as the article says, if you update a unique index column it will create this sort of issue. But Ideally in this scenario I am just doing an Update for the other columns based on the primary key of that table.

  • the solution is provided in the reference section of the above link , proceed with caution.

    https://support.microsoft.com/en-us/kb/302341

    Jayanth Kurup[/url]

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

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