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
How many joins in sql server?
What is the difference between NOROW and LOCKROW?
How to rebuild all indexes on a single table?
List out the difference between union and union all in sql server?
What is checkpoint in sql server?
What is isolation levels?
Explain how you can configure a running aggregate in SSRS?
How to drop an existing schema in ms sql server?
What is TDS(Tabular Data Stream) Gateway?
Explain what is raid and what are different types of raid levels?
What is logon trigger?
Why use “nolock” in sql server?
What is attribute? : sql server analysis services, ssas
Can we take the full database backup in log shipping?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?