0

I have created an "after insert' trigger on my table in SQL Server, which works perfectly when I run an insert within SQL Server. However I use FME for bulk migration to the same table, and when I insert rows via FME, the rows are inserted, but the trigger does not fire.

Also, the database allows data inserted via FME that violates foreign key constraints. Again if I run the same insert within SQL Server, it won't allow the insert, so the FK constraints are working as they should within SQL Server.

It's as if the database just doesn't properly recognise an insert when it comes through FME.

Primary key violations, 'not null' field violations and datatype violations do prevent inserts via FME, so at least that much works.

Has anyone else experienced this with FME inserts? Any suggestions for how to fix it?

Mr Magoo
  • 37
  • 5
  • What does the documentation for the product say? It wouldn't surprise me at all if there is an option to disable trigger and FK constraints during a bulk insert - as its a common requirement. – Dale K Oct 28 '22 at 05:24
  • And if it calls the [SQL Server Bulk Insert](https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver16) internally, there are definitely options to disable triggers and FKs - in fact that may be the default. My guess is you can change these somewhere. – Dale K Oct 28 '22 at 05:40

0 Answers0