Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicating SQL Profiler

Status
Not open for further replies.

CaptainN64

Programmer
Oct 23, 2002
9
US
Does anyone know of a way I can more-or-less duplicate the SQL Profiler in VB.NET? (C# if necessary, but VB if possible) I need to monitor a database for incoming SQL/Transactions so I can duplicate them on another system. I can't use replication, as most of the tables get dropped/truncated/recreated fairly frequently. Any assistance would be appreciated. Thanks :)
 
If you cannot make do with triggers on the relevant tables, you should be able to start a trace which logs the incoming SQL/Transactions to a table. You can then add a trigger on this table to do what you want to do. Alternatively you could pool the table from a vb.net application.
You can generate the sql script for the trace by setting up a new trace in the profiler and then script it to an .sql file (file menu -> script).

Good luck


Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Sorry to sound like a n00b, but what does "pool the table" mean?
 
Hi agian,

"pool the table" = set up a timer and check for changes at a regular interval. I think the trigger solution is much better.

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
oh... poll the table ;) anyway, i think the trigger solution is going to work. Thanks.
 
hmmm, my mistake... good luck anyway.

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top