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
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
What is the difference between Normalization and De-normalization?
What is the difference between DATETIME2 and DATETIME?
Why SQL Agent is used?
Explain the difference between clustered and non-clustered index?
What is log shipping?
How to find which stored procedure is currently running in sql server?
Define a cross join?
What is a file group?
what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
Write an sql query to find first weekday of the month?
What is dirty page?
What guidelines should be followed to help minimize deadlocks?
What is the purpose of data source?
What is the use of sign function?