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 / 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 |
Can a unique index be created on a column, which contains null?
how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration
Tell me what is fill factor?
how to find number of columns in a table in sql server 2000 and 2005 also
How to use user defined functions in expressions?
What is the command to change the recovery model?
What are security principals used in sql server 2005?
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas
What is use of except clause?
What is an sql server agent?
How to assign null values to variables or columns?
What is a natural primary key?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)