cancel
Showing results for 
Search instead for 
Did you mean: 

Auditing To File with compression on

JimDiaz
Participant
982

SQLA 17.0.10.6160

I'm implementing database auditing to file with the commands:

SET OPTION PUBLIC.auditing = 'Off';
SET OPTION PUBLIC.audit_log = 'FILE(filename_prefix=AuditLog;max_size=10485760;num_files=100;compressed=On)';
CALL sa_disable_auditing_type( 'all' );
CALL sa_enable_auditing_type( 'connect' );
CALL sa_enable_auditing_type( 'connectFailed' );
CALL sa_enable_auditing_type( 'DDL' );
CALL sa_enable_auditing_type( 'options' );
CALL sa_enable_auditing_type( 'permissionDenied' );
CALL sa_enable_auditing_type( 'xp_cmdshell' );

No audit file is created after I issue

SET OPTION PUBLIC.auditing = 'On';

Without the compressed=On it works as desired. I've tried all variations I can think of compression=True, etc

Thanks for the help

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Product and Topic Expert
Product and Topic Expert

With this statement, I am getting an error -1684 Trace target option 'compressed' conflicts with option 'flush_on_write'. If you add flush_on_write=Off, does the auditing start working?

As an aside, you are also disabling 'all' logging.

JimDiaz
Participant
0 Kudos

That did the trick thanks very much

JimDiaz
Participant
0 Kudos

regarding the disabling of all logging I set this before I set specific logging with sa_enable_auditing_type('xxx') so I am sure of which types are enabled.