troubleshooting Question

Wrong Extended_Timestamp in xml audit file

Avatar of Raf
Raf asked on
XMLOracle Database
3 Comments1 Solution7 ViewsLast Modified:
Hi,
I started using the Oracle Audit Trail in XML format (Oracle 11.2.0.4.0 EE on Windows):

EXEC DBMS_FGA.ADD_POLICY(object_schema=>'TAB_IMM',object_name=>'DOC',policy_name=>'POL_DOC',audit_column=>NULL,handler_schema=>NULL,handler_module=>NULL,enable=>TRUE,statement_types=>'INSERT,UPDATE,DELETE',audit_trail=>DBMS_FGA.XML,audit_column_opts=>DBMS_FGA.ANY_COLUMNS);

But my Problem is the wrong timestamp in the xml files:

-<AuditRecord>
<Audit_Type>1</Audit_Type>
<Session_Id>54381498</Session_Id>
<StatementId>1</StatementId>
<EntryId>1</EntryId>
<Extended_Timestamp>2021-05-28T11:36:07.229000Z</Extended_Timestamp>
<DB_User>TAB_IMM</DB_User>
<OS_User>COR\OC</OS_User>
<Userhost>COR\SRV</Userhost>
<OS_Process>10612:5484</OS_Process>
<Terminal>SRV</Terminal>
<Instance_Number>0</Instance_Number>
<Action>100</Action>
<TransactionId>0000000000000000</TransactionId>
<Returncode>0</Returncode>
<Comment_Text>Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.1.2.3)(PORT=62071))</Comment_Text>
<Priv_Used>5</Priv_Used>
<DBID>1745994699</DBID>
</AuditRecord>
The Timestamp in this xml file is set at 11:36 but in my timezone it should be 13:36.
The Timestamp in V$XML_AUDIT_TRAIL is correct (right time)

SELECT db_user, extended_timestamp, action FROM v$xml_audit_trail WHERE db_user='TAB_IMM' ORDER BY extended_timestamp DESC;

DB_USER      EXTENDED_TIMESTAMP                      ACTION
TAB_IMM      05/28/2021 13:36:07,945000 +02:00        100

Do you know how to set the correct Extended_Timestamp for the xml format?

Thanks in advance!
Raf
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros