none
SqlBulkCopy issue with replication RRS feed

  • Question

  • I have a transaction replication between two servers running on SQL Server 2008 R2. When I insert rows into a table on the publisher everything is OK. When I insert rows into a table on the subscriber I'm getting the follwing error:

    Cannot bulk copy into a table "TABLE_NAME" that is enabled for immediate-updating subscriptions

    rom the following link: BulkCopy it looks as if the problem is related to the fact the we have to set FIRE_TRIGGERS on. I've tried to use SqlBulkCopy like this:

    SqlBulkCopy(ConnectionString, SqlBulkCopyOptions.FireTriggers)

    but I'm still getting the same error. What should I do?





    Tsahi Bar

    • Moved by Barry Wang Monday, October 27, 2014 8:22 AM
    Sunday, October 26, 2014 8:12 AM

All replies

  • Well there's very little code there but that is correct to enable triggers.

    I think you're best asking the question on a sql server specific forum.

    Sunday, October 26, 2014 10:53 AM