Database Administration (MOSC)

MOSC Banner

Audit all SQL statements on syslog

edited Apr 7, 2017 8:51AM in Database Administration (MOSC) 9 commentsAnswered

Hello,

We want to audit all sql statements of all users, and send the audit to syslog. We want to see on the syslog the user's sql statements.

Problem is that if, an unprivileged user run an statement such as:

> select * from p2

On the syslog we get an audit entry like this one, which does not show the SQL statement:

Oct 28 12:09:41 labodb Oracle Audit[2634]: LENGTH: "246" SESSIONID:[6] "577067" ENTRYID:[2] "66" STATEMENT:[2] "73" USERID:[5] "FORTI" USERHOST:[4] "cafe" TERMINAL:[7] "unknown" ACTION:[1] "3" RETURNCODE:[1] "0" OBJ$CREATOR:[5] "FORTI" OBJ$NAME:[2] "P2" OS$USERID:[7] "nicolas" DBID:[10] "1387787559"

We would like to see the SQL statement, isntead of the statement ID.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center