There is a trigger defined for INSERT operations on a
table, in an OLTP system. The trigger is written to
instantiate a COM object and pass the newly insterted rows
to it for some custom processing. What do you think of this
implementation? Can this be implemented better?

Answer Posted / swapna

Instantiating COM objects is a time consuming process and
since you are doing it from within a trigger, it slows down
the data insertion process. Same is the case with sending
emails from triggers.


This scenario can be better implemented by logging all the
necessary data into a separate table, and have a job which
periodically checks this table and does the needful.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of database indexes?

519


Why variables called the most powerful component of ssis?

587


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

512


What is difference between oltp and olap?

565


What is a trace frag? Where do we use it?

669






What is an etl file?

518


What are the advantages of the mirroring?

559


What is linked report?

87


What is openrowset sql server?

511


What is difference between unique and primary key?

473


Find nth lowest salary or get nth lowest salary?

584


can any body tell me how to know the password of current user in sql server

1569


do views contain data ?

574


What are the reporting services components?

92


Explain “row_number()” in sql server with an example?

513