暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
用户登陆登出审计.pdf
451
2页
1次
2022-06-10
免费下载
2022/2/14 上午10:03
Document 2509211.1
https://support.oracle.com/epmos/faces/DocContentDisplay?_adf.ctrl-state=teik0vr73_955&id=2509211.1
1/2
Copyright (c) 2022, Oracle. All rights reserved. Oracle Confidential.
How To Audit Of User Login & Logoff of Database by Unified Auditing (Doc ID 2509211.1)
Modified: Feb 22, 2019 Type: HOWTO
In this Document
Goal
Solution
Supplementary information:
References
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.
GOAL
How to audit of user login and logoff actions with the Unified Auditing.
SOLUTION
You can use Unified auditing to audit login and logoff actions by "CREATE AUDIT POLICY".
In the following example, the connect/disconnect command is audited for only test01 user.
--Sample User definition:
create user test01 identified by ****;
grant create session to test01;
--Audit setting:
create audit policy connection_policy actions logon,logoff WHEN
'SYS_CONTEXT(''USERENV'',''SESSION_USER'')=''TEST01''' evaluate per session;
audit policy connection_policy;
--Try to logon and logoff:
connect test01
disconnect
--Confirm the audit information:
connect / as sysdba
select to_char(event_timestamp, 'DD/MM/YYYY HH24:MI:SS.FF3'), action_name
from unified_audit_trail where dbusername='TEST01' order by 1;
SQL> --Sample User definition:
SQL> create user test01 identified by ******;
User created.
SQL> grant create session to test01;
Grant succeeded.
SQL>
SQL> --Audit setting:
SQL> create audit policy connection_policy actions logon,logoff WHEN
2022/2/14 上午10:03
Document 2509211.1
https://support.oracle.com/epmos/faces/DocContentDisplay?_adf.ctrl-state=teik0vr73_955&id=2509211.1
2/2
'SYS_CONTEXT(''USERENV'',''SESSION_USER'')=''TEST01''' evaluate per session;
Audit policy created.
SQL> audit policy connection_policy;
Audit succeeded.
SQL>
SQL> --Try to logon and logoff:
SQL> connect test01
Connected.
SQL> disconnect
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
SQL> --Confirm the audit information:
SQL> connect / as sysdba
Connected.
SQL> select to_char(event_timestamp, 'DD/MM/YYYY HH24:MI:SS.FF3'), action_name
2 from unified_audit_trail where dbusername='TEST01' order by 1;
TO_CHAR(EVENT_TIMESTAMP
-----------------------
ACTION_NAME
----------------------------------------------------------------
19/02/2019 16:34:17.409
LOGON
19/02/2019 16:34:17.440
LOGOFF
Supplementary information:
Drop audit settings
noaudit policy connection_policy;
drop audit policy connection_policy;
REFERENCES
NOTE:2509205.1 - How To Audit Of User Login & Logoff of Database by Standard Auditing
NOTE:1567006.1 - How To Enable The New Unified Auditing In 12c ?
Didn't find what you are looking for?
of 2
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。