Groups | Blog | Home
all groups > sql server (alternate) > september 2003 >

sql server (alternate) : log all queries



Marco Dieckhoff
9/5/2003 9:50:31 AM

Hi!

In order to debug a program written for us I'd like to log all
queries to a database/a specific table in MS SQL Server 2000.

Are there any options to get a logging like this and how do I
enable it?

--
Marco Dieckhoff
icq# 22243433
Anith Sen
9/5/2003 5:11:13 PM
Not exactly. One clumsy option, is to turn on the profiler to track the
SELECT statements & dumb them into an ASCII file. On large databases with
heavy transactions, this may not be worth it though.

--
- Anith
( Please reply to newsgroups only )

Simon Hayes
9/5/2003 7:19:24 PM
[quoted text, click to view]

You can use Profiler, and set a filter for the tables/databases that you're
interested in. You can either run the trace from the Profiler GUI, or by
creating a server-side trace with the sp_trace% procs. There is plenty of
information on this in Books Online.

Simon

Tom Kitta
9/8/2003 4:29:21 PM
Hello,

How about writing a trigger attached to the table in question for
select/update/delete operations that will record data to some audit table?

TK


[quoted text, click to view]

John Bell
9/8/2003 7:04:21 PM
Select triggers are not in SQL 2000!!

If you access your tables by stored procedure then you can implement an
auditing function.

John

[quoted text, click to view]

AddThis Social Bookmark Button