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?



There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is wri..

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

Post New Answer

More SQL Server Interview Questions

What is difference between join and natural join?

0 Answers  


Let’s say the table in the database is named as TBL_Register. The fields in this table include: 1. User_Name, 2. User_Telephone, 3. Register_Date The field Register_Date stores the current date and time of the registration. Write the SQL statement that inserts the data into the table.

2 Answers   Techno Solutions,


Explain what are magic tables in sql server?

0 Answers  


What is the function of sql server agent windows service?

0 Answers  


How will you make an attribute not process? : sql server analysis services, ssas

0 Answers  






Delete duplicate rows without using rowid.

0 Answers   Nagarro,


How important do you consider cursors or while loops for a transactional database?

0 Answers  


Simple example for difference between select and cursor in sql

1 Answers  


How to delete duplicate records based on single column from a table?

0 Answers   Petranics Solutions,


How can you fetch alternate records from a table?

0 Answers  


Why union all is faster than union?

0 Answers  


How to execute stored procedure and set temp table in sql server?

0 Answers  


Categories