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

I have a table EMP in which the values will be like this EmpId Ename Sal DeptId 11 Ram 10000 10 11 Ram 10000 10 22 Raj 20000 20 22 Raj 20000 20 33 Anil 15000 30 33 Anil 15000 30 I want to delete only duplicate Rows. After Delete I want the output like this EmpId Ename Sal DeptId 11 Ram 10000 10 22 Raj 20000 20 33 Anil 15000 30

13 Answers   DELL,


what is difference between primary key and Unique

8 Answers  


What are secondary xml indexes?

0 Answers  


Define full outer join?

0 Answers  


Difference between LEN() and DATALENGTH() in sql server ?

0 Answers   HCL,






What is ms sql server service broker?

0 Answers  


Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?

2 Answers  


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

0 Answers  


whate is advantages of sql server 2000

0 Answers  


What is Index ? Explain its Types?

2 Answers   ADP,


What is the order in which the SQL query is executed? list them in order.

5 Answers   CarrizalSoft Technologies, CTS, Oracle,


4 Please write a querry to find repeated numbers in the following table. Table Name: Table1 Field1 10 15 20 15 10

7 Answers  


Categories