I am using DB Audit on SQL Server 2005, I want to know where I can see the sql queries that the users are running against a database...for example "update table a where column = 1", I do not want to see the number of updates but the actual sql query. Does this tool not have this feature. If it does can you point it out step by step..

: I am using DB Audit on SQL Server 2005, I want to know where I can see the : sql queries that the users are running against a database...for example : "update table a where column = 1", I do not want to see the : number of updates but the actual sql query. Does this tool not have this : feature. If it does can you point it out step by step..

Thu Nov 30, 2006 6:28 pm

sam2006

Joined: 30 Nov 2006Posts: 7

Re: SQL Queries

1. The text of the SQL Queries report only shows Drop table

Create table, Alter table sql statements. It does not

show any update, delete, insert statements. 2. The Tools/User Activity tool only shows the

users connection information, it does not show any

sql query statements. 3. The select * from db_audit.sys_audit_trail also does

not show any update, insert or delete statements.

Am I am missing something here or is there some feature that I need to turn on to make this work OR Is it that this tool DB Audit does not support this feature. I have been been trying for the past two days to see how this tool performs and I simply cannot find out where to locate the update, delete, insert statements. I have written several sql scripts that I ran on SQL Server 2005, so that I can test to see if DB Audit captured any of them But it only capture the Drop, Create and Alter sql statements and it recorded the number of inserts, delets and update made to a table, BUT not the actual update, delete or insert sql statement. Any other suggestions...

: 1. The text of the SQL Queries report only shows Drop table : Create table, Alter table sql statements. It does not : show any update, delete, insert statements.

It only means that you are not auditing them. Please enable auditing for these operations in the System Audit/Set Audit Options. If you are not sure which options to enable, enable them all. If you have any filters, please remove.

: 2. The Tools/User Activity tool only shows the : users connection information, it does not show any : sql query statements.

Go to the second level, expand the connection to see actual activities. again if you don't get them it means you are not auditing them. You only can see what's being audited.

: 3. The select * from db_audit.sys_audit_trail also does

: not show any update, insert or delete statements.

Same here

: Am I am missing something here or is there some feature that : I need to turn on to make this work OR Is it that this : tool DB Audit does not support this feature. I have been : been trying for the past two days to see how this : tool performs and I simply cannot find out where to locate : the update, delete, insert statements. I have written several : sql scripts that I ran on SQL Server 2005, so that I can test : to see if DB Audit captured any of them But it only capture : the Drop, Create and Alter sql statements and it recorded : the number of inserts, delets and update made to a table, BUT : not the actual update, delete or insert sql statement. : Any other suggestions...

Fri Dec 01, 2006 8:36 am

sam2006

Joined: 30 Nov 2006Posts: 7

Re: SQL Queries

I have selected all of the "Operation options" in System Audit/Set Audit Options. Once again after running the sql script I only see the Create, Alter and Drop commands,and NOT any of the other update, insert or delete sql statements. Any other suggestions?

: It only means that you are not auditing them. Please enable auditing for : these operations in the System Audit/Set Audit Options. If you are not : sure which options to enable, enable them all. If you have any filters, : please remove.

: Go to the second level, expand the connection to see actual activities. again : if you don't get them it means you are not auditing them. You only can see : what's being audited.

: Same here

Fri Dec 01, 2006 8:54 am

sam2006

Joined: 30 Nov 2006Posts: 7

Re: SQL Queries

: I have selected all of the "Operation options" in System Audit/Set : Audit Options. Once again after running the sql script I only see the : Create, Alter and Drop commands,and NOT any of the other update, insert or : delete sql statements. Any other suggestions?