Tuesday, February 14, 2012

Catch and analyse incoming queries

Can I programatically (from f.e. c# program) catch incoming queries to
an SQL server?
I want to watch and analyse them, if such queries are
create/alter/drop I want to log this information in a database to view
changes history of database structure.
You can use profiler for these type of activities. I recollect reading on
Dejan blog to build a trigger on profiler based events. Can take a read at
: http://solidqualitylearning.com/blog...11/25/214.aspx
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Sergi" <adamchuk@.gmail.com> wrote in message
news:6f504b3b.0502250002.103d18a5@.posting.google.c om...
> Can I programatically (from f.e. c# program) catch incoming queries to
> an SQL server?
> I want to watch and analyse them, if such queries are
> create/alter/drop I want to log this information in a database to view
> changes history of database structure.

No comments:

Post a Comment