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
Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?
Why normalization is used?
Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture
What is mapping schema?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
What is federation member?
What is Lock table in SQL?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
How do I find information about the install locations for the various instances running on a computer?
What is table valued function and scalar valued functions?
Write an sql query to find first weekday of the month?
Explain differences between web edition and business edition?
Explain primary key?
What is subquery? Explain the properties of a subquery?
Explain table valued parameters in sql server? Why tvp used?