2

I want to find out the module with which program an audit has started. So for example if an insert statement has been done with SQL developer or Toad. I have the logging of the statement in dba_fga_audit_trail But I can't seem to find the link to the audsid so I can find more info about the session.

Is it possible to create this link by joining some tables?

4

2 回答 2

3

SESSION_IDofdba_fga_audit_trail表示审计会话 ID 号。确实是会话 ID,您也可以通过查询AUDSIDv$session 表中的列来找到它。尽管如此,您应该知道v$session显示每个当前会话的会话信息,而不是过去的会话信息,因此如果您有兴趣获取过去事件的此类信息,那么您就是无法拥有它。话虽如此,有一种方法可以通过使用 Oracle 产品Audit Vault 和 Database Firewall来获取发生事件的客户端程序(fe:SQL Developer)。在审计报告中你可以相当容易地得到这类信息

于 2014-01-29T12:03:33.097 回答
0

有一种可能的方法是通过为此建立登录触发器来将审计跟踪与 ASH 联系起来。审计跟踪中的注销记录(如果 AUDIT SESSION 处于活动状态)还记录 v$Session 中的 Client_Identifier。因此,为 v$Session.Client_Identifier 提供所需的信息允许从 DBA_Audit_Trail.Client_ID 检索它。

此登录触发器执行此操作:

CREATE OR REPLACE TRIGGER Client_ID AFTER LOGON ON DATABASE
-- Put unique session identifier into client-id to have it also in DBA_AUDIT_TRAIL.Client_ID for LOGOFF-records
-- works than as missing link between Active Session History and Audit Trail
-- Peter Ramm, OSP Dresden, 2021-01-05
BEGIN
  -- Use alternative public package instead of SYS_CONTEXT to get the serial#
  sys.DBMS_SESSION.Set_Identifier('SID = '||DBMS_DEBUG_JDWP.CURRENT_SESSION_ID||', Serial# = '||DBMS_DEBUG_JDWP.CURRENT_SESSION_SERIAL);
END;
/
于 2021-01-05T11:36:29.663 回答