“逐个会话审核创建会话”与“通过访问审核创建会话”?

发布于 2024-10-16 17:13:36 字数 853 浏览 2 评论 0原文

当我通过以下方式启用创建会话的审核时:

audit create session by session;

然后我查询以下内容:

select * from dba_priv_audit_opts;

结果是:

USERNAME | PROXY_NAME | AUDIT_OPTION   | SUCCESS   | FAILURE  |
...............................................................
 -       | -          | CREATE SESSION | BY ACCESS | BY ACCESS|

但是,当我通过以下方式启用创建会话的审核时:

 audit create session by access;

然后我查询如下:

select * from dba_priv_audit_opts;

结果是一样的:

USERNAME | PROXY_NAME | AUDIT_OPTION   | SUCCESS   | FAILURE  |
...............................................................
 -       | -          | CREATE SESSION | BY ACCESS | BY ACCESS|

为什么?你有什么想法吗?

When I enabling auditing for create session by the following way:

audit create session by session;

Then I am querying the following:

select * from dba_priv_audit_opts;

The result is:

USERNAME | PROXY_NAME | AUDIT_OPTION   | SUCCESS   | FAILURE  |
...............................................................
 -       | -          | CREATE SESSION | BY ACCESS | BY ACCESS|

But, when I enabling auditing for create session by the following way:

 audit create session by access;

Then I am querying the following:

select * from dba_priv_audit_opts;

The result is the same:

USERNAME | PROXY_NAME | AUDIT_OPTION   | SUCCESS   | FAILURE  |
...............................................................
 -       | -          | CREATE SESSION | BY ACCESS | BY ACCESS|

Why? Do you have any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骄傲 2024-10-23 17:13:36

11gR2 及更高版本:

按会话< /code>被有效禁用,并且所有审核都是在每次访问时完成的。

11gR1 及以下版本:

BY SESSIONBY ACCESS是当你指定BY SESSION时Oracle会尝试将多个审计条目合并为一个记录会话和审核的操作何时匹配。

它只适用于 DDL 以外的 SQL 语句,来自上面的链接:

如果您指定审计数据定义语言 (DDL) 语句的语句选项或系统权限,则无论您指定 BY SESSION 子句还是 BY ACCESS 子句,数据库都会自动按访问进行审计。

由于CREATE SESSION是一条DDL语句,Oracle通过访问来审计该语句。

11gR2 and above:

BY SESSION is effectively disabled and all auditing is done per access.

11gR1 and below:

The difference between BY SESSION and BY ACCESS is that when you specify BY SESSION Oracle will try to merge multiple audit entries into one record when the session and the action audited match.

It only works for SQL statements other than DDL though, From the above link:

If you specify statement options or system privileges that audit data definition language (DDL) statements, then the database automatically audits by access regardless of whether you specify the BY SESSION clause or BY ACCESS clause.

Since CREATE SESSION is a DDL statement Oracle audits this statement by access.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文