Monday, February 20, 2012

Logging Sql queries

In SQLServer 2000, I am sure there was a way that you configure the
database to log to a file each query that gets run against it.
However, I cannot seen to find where to set this up in Enterprise
Manager."Mystery Man" <PromisedOyster@.hotmail.com> wrote in message
news:87c81238.0405130309.7c0013fb@.posting.google.c om...
> In SQLServer 2000, I am sure there was a way that you configure the
> database to log to a file each query that gets run against it.
> However, I cannot seen to find where to set this up in Enterprise
> Manager.

I don't know any way to do exactly what you want, but there are options:

If you're going through ODBC, you can enable ODBC logging.
You can also enable profiler to capture all the traffic.

Another option is to invest in
http://www.lumigent.com/products/le_sql/le_sql.htm|||Mystery Man (PromisedOyster@.hotmail.com) writes:
> In SQLServer 2000, I am sure there was a way that you configure the
> database to log to a file each query that gets run against it.
> However, I cannot seen to find where to set this up in Enterprise
> Manager.

The Profiler is the tool you should use. Or at least where you should
start looking. If you are seriously into log everything which happens
on the server, you should set up a server-side trace with help of
the sp_trace procedures.

Furthermore, if you cannot accept anything to be unlogged because the
trace file fills up the disk, set the C2-autiding configuration option,
which throttles the server in this situation.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment