当前位置:首页 » 数据仓库 » oracle数据库审计策略
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

oracle数据库审计策略

发布时间: 2022-07-06 14:45:49

❶ 如何修改oracle 审计策略为os级别

首先,我没有明白楼主所说的OS级别是什么级别,
oracle审计级别可以分为:
语句审计、权限审计、模式对象审计、(细粒度的审计)
三个重要参数:audit_file_dest、audit_sys_operations、audit_trail
audit_trail:
None:是默认值,不做审计;
DB:将audit trail 记录在数据库的审计相关表中,如aud$,审计的结果只有连接信息;
DB_EXTENDED:这样审计结果里面除了连接信息还包含了当时执行的具体语句;
OS:将audit trail 记录在操作系统文件中,文件名由audit_file_dest参数指定;
XML:10g里新增的。
audit_sys_operations:
对应Audit_trail=OS,默认为false,当设置为true时,所有sys用户(包括以sysdba,sysoper身份登录的用户)的操作都会被记录,audit trail不会写在aud$表中,这个很好理解,如果数据库还未启动aud$不可用,那么像conn /as sysdba这样的连接信息,只能记录在其它地方。比如文件。
audit_file_dest:Audit_trail=OS时 文件位置。
例如:
alter system set audit_trail=DB_EXTENDED scope=spfile;设置为DB_EXTENDED 。
如果您说的OS级别是指audit_trail=OS的话,记得设置另外两个参数。

❷ 怎么查看windows下的oracle是否开启审计功能

查看aud$表(或者dba_audit_trial视图)中是否有数据,如果有数据说明审计功能开启的
select * from aud$;
select * from dba_audit_trial;
查看系统开启了那些审计功能
select * from dba_priv_audit_opts;系统权限审计
select * from dba_obj_audit_opts; 对象权限审计

❸ 怎样用程序实现oracle数据库审计

1 、如何启用审计?
修改数据库的初始化参数audit_trail ,从none 修改为你需要的值。
它的可选项有很多,如下所示:
AUDIT_TRAIL = { none | os | db | db,extended | xml | xml,extended }
我们选择db 值作为该参数值。使得审计功能处于打开状态,将审计记录保存在数据库sys.aud$表中。
修改初始化参数文件spfile 中的此参数配置值
ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE sid='*';
注意,这个参数需要数据库实例重启之后才能生效。

2 、审计有哪些功能
可以审计数据库对象的DML 和DDL 操作,以及查询、执行和一些系统事件如登录和退出。
如下所示:
DDL (CREATE, ALTER & DROP of objects)
DML (INSERT UPDATE, DELETE)
SELECT
EXECUTE
SYSTEM EVENTS (LOGON, LOGOFF etc)

每个功能还有选项,如在每个会话还是每个访问中审计,是成功或不成功时审计。
完整的audit 的语法如下:
AUDIT
{ sql_statement_clause | schema_object_clause | NETWORK }
[ BY { SESSION | ACCESS } ]
[ WHENEVER [ NOT ] SUCCESSFUL ] ;

3 、如何审计某表的数据插入操作
现在的问题是找出什么应用向表插入了记录。在应用程序的逻辑上,这个表的数据只会更新,不会插入。
因此,在审计功能打开后,使用这个下列命令审计某表的插入操作。
audit insert on table_name by access;
执行成功后,此表上每一次插入操作都会被记录在sys.aud$ 表中。

4 、如何查看审计结果
可以查询dba_audit_trail 系统视图,该视图显示就是sys.aud$ 表保存的审计结果。这个表的存储空间是system ,如果你需要大量长期审计某些操作,请注意维护这张表。
一般维护方法有两个,定期执行truncate 操作和将表的存储表空间移植到一个新建的独立表空间上。

5 、如何取消审计
使用noaudit 代替audit 命令符就可, 如noaudit insert on table_name by access;

❹ oracle 审计包括哪几种,都是什么

1、什么是审计

审计(Audit)用于监视用户所执行的数据库操作,并且Oracle会将审计跟踪结果存放到OS文件(默认位置为$ ORACLE_BASE/admin/$ORACLE_SID/amp/)或数据库(存储在system表空间中的SYS.AUD$表中,可通过视图 dba_audit_trail查看)中。默认情况下审计是没有开启的。

不管你是否打开数据库的审计功能,以下这些操作系统会强制记录:用管理员权限连接Instance;启动数据库;关闭数据库。

2、和审计相关的两个主要参数

Audit_sys_operations:

默认为false,当设置为true时,所有sys用户(包括以sysdba,sysoper身份登录的用户)的操作都会被记录,audit trail不会写在aud$表中,这个很好理解,如果数据库还未启动aud$不可用,那么像conn /as sysdba这样的连接信息,只能记录在其它地方。如果是windows平台,audti trail会记录在windows的事件管理中,如果是linux/unix平台则会记录在audit_file_dest参数指定的文件中。

Audit_trail:

None:是默认值,不做审计;

DB:将audit trail 记录在数据库的审计相关表中,如aud$,审计的结果只有连接信息;

DB,Extended:这样审计结果里面除了连接信息还包含了当时执行的具体语句;

OS:将audit trail 记录在操作系统文件中,文件名由audit_file_dest参数指定;

XML:10g里新增的。

注:这两个参数是static参数,需要重新启动数据库才能生效。

3、审计级别

当开启审计功能后,可在三个级别对数据库进行审计:Statement(语句)、Privilege(权限)、object(对象)。

Statement:

按语句来审计,比如audit table 会审计数据库中所有的create table,drop table,truncate table语句,alter session by cmy会审计cmy用户所有的数据库连接。

Privilege:

按权限来审计,当用户使用了该权限则被审计,如执行grant select any table to a,当执行了audit select any table语句后,当用户a 访问了用户b的表时(如select * from b.t)会用到select any table权限,故会被审计。注意用户是自己表的所有者,所以用户访问自己的表不会被审计。

Object:

按对象审计,只审计on关键字指定对象的相关操作,如ait alter,delete,drop,insert on cmy.t by scott; 这里会对cmy用户的t表进行审计,但同时使用了by子句,所以只会对scott用户发起的操作进行审计。注意Oracle没有提供对schema中所有对象的审计功能,只能一个一个对象审计,对于后面创建的对象,Oracle则提供on default子句来实现自动审计,比如执行audit drop on default by access;后,对于随后创建的对象的drop操作都会审计。但这个default会对之后创建的所有数据库对象有效,似乎没办法指定只对某个用户创建的对象有效,想比 trigger可以对schema的DDL进行“审计”,这个功能稍显不足。

❺ oracle数据库的审计功能

二、审计可以分为3类。
或者说,可以从3种角度去启用审计。
1、语句审计(Statement Auditing)。
对预先指定的某些SQL语句进行审计。这里从SQL语句的角度出发,进行指定。审计只关心执行的语句。
例如,audit CREATE TABLE;命令,就表明对"create table"语句的执行进行记录。 不管这语句是否是针对某个对象的操作
2、权限审计(Privilege Auditing)
对涉及某些权限的操作进行审计。这里强调“涉及权限”
例如,audit CREATE TABLE;命令,又可以表明对涉及“CREATE TABLE”权限的操作进行审计。
所以说,在这种命令的情况下,既产生一个语句审计,又产生了一个权限审计。
有时候“语句审计”和“权限审计”的相互重复的。这一点可以后面证明。
3、对象审计(Object Auditing)。 记录作用在指定对象上的操作。

❻ oracle数据库开了DB_EXTENDED级别审计,也设置了审计规则,为什么查看不到审计记录

索引存放在dba_indexes(user_indexes)实例中所有的索引dba_indexes用户自己的索引user_indexes

❼ oracle数据库审计什么时候进行

给你两个地址去看看,估计对你会有帮助的!http://hi..com/songdeyouxiang/blog/item/631641dacb915c6ed1164e37.html
http://www.itpub.net/thread-447205-1-1.html

❽ 如何开启和关闭oracle数据库中的审计功能

在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),
oracle11gr2的官方文档上写的是错的,当上说default是none,而且是审计到db级别的,这样就会
往aud$表里记录统计信息。
1.如果审计不是必须的,可以关掉审计功能;
sql>
show
parameter
audit_trail;
name
type
value
------------------------------------
-----------
------------------------------
audit_trail
string
db
sql>
alter
system
set
audit_trail=none
scope=spfile;
sql>
shut
immediate;
sql>startup
2.删除已有的审计信息
可以直接truncate表aud$,
truncate
table
sys.aud$;
3.或者将aud$表移到另外一个表空间下,以减少system表空间的压力和被撑爆的风险。
附:11g中有关audit_trail参数的设置说明:
audit_trail
property
description
parameter
type
string
syntax
audit_trail
=
{
none
|
os
|
db
[,
extended]
|
xml
[,
extended]
}
default
value
none
modifiable
no
basic
no
audit_trail
enables
or
disables
database
auditing.
values:
none
disables
standard
auditing.
this
value
is
the
default
if
the
audit_trail
parameter
was
not
set
in
the
initialization
parameter
file
or
if
you
created
the
database
using
a
method
other
than
database
configuration
assistant.
if
you
created
the
database
using
database
configuration
assistant,
then
the
default
is
db.
os
directs
all
audit
records
to
an
operating
system
file.
oracle
recommends
that
you
use
the
os
setting,
particularly
if
you
are
using
an
ultra-secure
database
configuration.
db
directs
audit
records
to
the
database
audit
trail
(the
sys.aud$
table),
except
for
records
that
are
always
written
to
the
operating
system
audit
trail.
use
this
setting
for
a
general
database
for
manageability.
if
the
database
was
started
in
read-only
mode
with
audit_trail
set
to
db,
then
oracle
database
internally
sets
audit_trail
to
os.
check
the
alert
log
for
details.
db,
extended
performs
all
actions
of
audit_trail=db,
and
also
populates
the
sql
bind
and
sql
text
clob-type
columns
of
the
sys.aud$
table,
when
available.
these
two
columns
are
populated
only
when
this
parameter
is
specified.
if
the
database
was
started
in
read-only
mode
with
audit_trail
set
to
db,
extended,
then
oracle
database
internally
sets
audit_trail
to
os.
check
the
alert
log
for
details.
xml
writes
to
the
operating
system
audit
record
file
in
xml
format.
records
all
elements
of
the
auditrecord
node
except
sql_text
and
sql_bind
to
the
operating
system
xml
audit
file.
xml,
extended
performs
all
actions
of
audit_trail=xml,
and
populates
the
sql
bind
and
sql
text
clob-type
columns
of
the
sys.aud$
table,
wherever
possible.
these
columns
are
populated
only
when
this
parameter
is
specified.
you
can
use
the
sql
audit
statement
to
set
auditing
options
regardless
of
the
setting
of
this
parameter.