Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Sending data from MS SQL Server do PostgreSQL server using CLR triggers RE: Sending data from MS SQL Server do PostgreSQL server using CLR triggers

  • Gosh... don't do this with a trigger. If the destination can't be reached for some reason, your source system is dead. Also, the scope of the INSERTED and DELETED tables in the trigger is that they won't be available directly and you'll need to make copies of them in some sort of an array. You're begging for this process to be slow and VERY memory intensive.

    My recommendation would be to have the trigger (and NOT a (bleaaahhh!!!!) generic trigger, for the same reasons) write the data to a permanent staging table and have a job do the transfer once a minute.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)