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

How do you use a subquery to find records that exist in one table and do not exist in another?

737


What is difference between primary key and foreign key?

645


What is transaction server implicit?

689


what is memory-optimized nonclustered indexes

727


Explain a checkpoint?

757






What is resource governor in sql server?

721


How to create “dependant” parameter “make, model, year”

105


How to run sql server 2005 books online on your local system?

707


What is dynamic cursor in SQL SERVER?

740


What is a data source or ds? : sql server analysis services, ssas

754


What is query processing?

692


What is normalization of database?

763


What are the advantages of using a stored procedure?

708


How to get a list of columns in a view using the "sp_columns" stored procedure?

787


What are the common performance issues in sql server?

659