SQL server auditing

Hi,

I need help in filtering the SQL DB Audit logs that were being generated. For a single select statement that is being run, SQL Server DB audit mechanisim is generating large amounts of logs for various system operations. I examined the logs and found that these rows have object id starting like -% and schema column referencing to 'sys'.

Now my question is how to filter these columns, so that only necessary information can be logged?

Thanks in advance for your thoughts

Cheers

Bhanu

August 23rd, 2015 12:30am

Hi All,

Never mind- Found the answer

i just used the below Query with WHERE ([object_id]>=(1)) and it worked

USE [master]
GO

/****** Object:  Audit [IDI_AUDIT_ALL_DB]    Script Date: 23/08/2015 4:38:27 p.m. ******/
CREATE SERVER AUDIT [IDI_AUDIT_ALL_DB]
TO FILE 
(	FILEPATH = N'C:\backup\audit\'
	,MAXSIZE = 2 MB
	,MAX_ROLLOVER_FILES = 2
	,RESERVE_DISK_SPACE = OFF
)
WITH
(	QUEUE_DELAY = 1000
	,ON_FAILURE = CONTINUE
	,AUDIT_GUID = 'c81fe88c-8009-4f89-a83d-33b7479d416a'
)
WHERE ([object_id]>=(1))
ALTER SERVER AUDIT [IDI_AUDIT_ALL_DB] WITH (STATE = ON)
GO

Ta

Bhanu


  • Edited by bhanu_nz 2 hours 27 minutes ago
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2015 12:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics