Answered by:
Run Program after table uptade

Question
-
hi
I have a monitoring tool that collects data from a server. these data are stored in a table.
how can I run a function that calls an external program after an insert or update event on a table in my database?Wednesday, September 18, 2013 7:09 AM
Answers
-
It would be great if you can think of some ASYNCHRONOUS method rather than a synchronous(whenever a change happen, then the external call using TRIGGER or something). You can use SQL Agent Job to call the external function(CLR assembly) to do the job for all the records accumulated for the period defined. This way you can eliminate nay performance issues with synchronous method.
I wont suggest to go ahead with TRIGGER at all for its performance impact which will be huge for monitoring tools.
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
- Edited by SQLZealots Wednesday, September 18, 2013 7:20 AM edit
- Proposed as answer by SimpleSQL Wednesday, September 18, 2013 8:23 AM
- Marked as answer by Allen Li - MSFT Thursday, September 26, 2013 1:23 PM
Wednesday, September 18, 2013 7:17 AM -
- Proposed as answer by SimpleSQL Wednesday, September 18, 2013 8:24 AM
- Marked as answer by Allen Li - MSFT Thursday, September 26, 2013 1:23 PM
Wednesday, September 18, 2013 7:22 AM
All replies
-
-
It would be great if you can think of some ASYNCHRONOUS method rather than a synchronous(whenever a change happen, then the external call using TRIGGER or something). You can use SQL Agent Job to call the external function(CLR assembly) to do the job for all the records accumulated for the period defined. This way you can eliminate nay performance issues with synchronous method.
I wont suggest to go ahead with TRIGGER at all for its performance impact which will be huge for monitoring tools.
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
- Edited by SQLZealots Wednesday, September 18, 2013 7:20 AM edit
- Proposed as answer by SimpleSQL Wednesday, September 18, 2013 8:23 AM
- Marked as answer by Allen Li - MSFT Thursday, September 26, 2013 1:23 PM
Wednesday, September 18, 2013 7:17 AM -
- Edited by Dinesh Kumar Rajendran Wednesday, September 18, 2013 7:22 AM
Wednesday, September 18, 2013 7:17 AM -
- Proposed as answer by SimpleSQL Wednesday, September 18, 2013 8:24 AM
- Marked as answer by Allen Li - MSFT Thursday, September 26, 2013 1:23 PM
Wednesday, September 18, 2013 7:22 AM