Logging Oracle Database Link Activity

A database link is a one-way connection between two databases.  Starting with Oracle version 11.2.0.3, database session information now reports additional information for those sessions involving database links.  As often database links are created between databases of different security profiles; it is important to log session activity that includes the details of the database link.

DBLINK_INFO returns the source of a database link.  Specifically, it returns a string of the form –

SOURCE_GLOBAL_NAME=dblink_src_global_name

DBLINK_NAME=dblink_name

SOURCE_AUDIT_SESSIONID=dblink_src_audit_sessionid

where:

  • dblink_src_global_name is the unique global name of the source database
  • dblink_name is the name of the database link on the source database
  • dblink_src_audit_sessionid is the audit session ID of the session on the source database that initiated the connection to the remote database using dblink_name

You can verify DBLINK_INFO –

  • Oracle 12c provides a DBLINK_INFO column in SYS.UNIFIED_AUDIT_TRAIL.
  • SELECT SYS_CONTEXT('USERENV','DBLINK_INFO') FROM DUAL

If you have questions, please contact us at mailto:info@integrigy.com

Reference

 Share this post

Subscribe to RSS

Add us to your favorite news reader.

Follow on Twitter

Get the latest updates.