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
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
Can I work with several databases simultaneously? : sql server management studio
What is sql azure database?
Can truncate be rolled back?
How to get the query of a table in sql server?
how to take backup bcp out for a column in table in sql server?
What is conditional split?
You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?
What is cte (common table expression)?
Is it safe to delete log files?
What command would you use to create an index?
What is msdb database? : SQL Server Architecture
How to create new table with "create table" statements?
How to bind a view to the schema of the underlying tables?
What are the purposes of floor and sign functions?