Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-10-11 : 11:23:08
|
| cathal writes "Hello,I have to write an application that can detect when data changes in sql server, and react to these events. Ideally I'd like to avoid having to add triggers etc. to any objects, and would rather there was some api call/com object that would let me monitor databases/tables.Some potential solutions I've thought about were:(a)Utilising triggers and using sp_OACreate to instantiate a bespoke object, and use it to raise events/do work (suspect his is the easiest way, but would prefer to avoid it)(a)Using performance monitor counters to trigger these events (is there any way to configure these for particular databases and tables)(b) parsing the transaction logs use DBCC (c) working out how sql trace works and copying it...I'm interested in any suggestions/advice that anyone may have, as I'm confused as to where to begin.Regards,Cathal" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-10-11 : 11:28:16
|
| Triggers are going to be the easiest and probably the best way to do what you want. Even if you could get Perfmon counters, you'd be dealing with an event AFTER it happened. Parsing the log is WAY TOO MUCH work, and using the DBCC techniques to do it are really not practical. SQL Trace/Profiler might be possible, but again, the deed will be done by the time Profiler learns about it. Triggers are going to be much easier.What exactly does your app have to react to, and specifically how does it need to respond (send a page, email, alert???) Do you really need to have any COM in there? And if a short delay is acceptable, what about using the triggers to populate a queue and have a scheduled job process it (not necessarily MSMQ either)? |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-10-11 : 12:18:26
|
| Maybe you need something along the lines of Log Explorer from http://www.lumigent.comI'm no way associated with those folks, but they make some really neat monitoring tools.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
|
|
|
|
|