成都创新互联网站制作重庆分公司

oracle如何审计 oracle审计文件可以删除吗

oracle监控工具能审计吗

能。

创新互联公司-专业网站定制、快速模板网站建设、高性价比遵义网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式遵义网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖遵义地区。费用合理售后完善,十余年实体公司更值得信赖。

经查询oracle监控工具可知,oracle监控工具能审计。

Oracle最强大的监控工具就是EMEnterpriseManager企业管理器。可通过em来使用web界面监控、管理、维护Oracle数据库。

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

1、什么是审计

审计(Audit)用于监视用户所执行的数据库操作,并且Oracle会将审计跟踪结果存放到OS文件(默认位置为$ ORACLE_BASE/admin/$ORACLE_SID/adump/)或数据库(存储在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关键字指定对象的相关操作,如aduit 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中开启审计功能

sqlplus "/ as sysdba"

show parameter audit

alter system set audit_sys_operations=TRUE scope=spfile;

alter system set audit_trail=DB scope=spfile;

shutdown immediate;

startup force;

Oracle 11g起audit是自动开启的。我很烦这个审计开启,审计日志半个月10G,烦烦烦。我一把都关闭Oracle的审计功能,提高Oracle的空闲率。

oracle audit,如何审计ORACLE日志

据我所知,要审计alter、trace文件,没有办法,但是楼主可以开启sql trace,然后使用tkprof查看跟踪文件。

查看alert,trace等ORACLE日志,只要把这些个日志文件打开看就知道了,要是审计干什么。审计是记录数据库的操作,但是alert,trace等文件也是记录数据库的操作信息和运行信息。

应该没有必要吧

oracle数据库的审计功能

二、审计可以分为3类。

或者说,可以从3种角度去启用审计。

1、语句审计(Statement Auditing)。

对预先指定的某些SQL语句进行审计。这里从SQL语句的角度出发,进行指定。审计只关心执行的语句。

例如,audit CREATE TABLE;命令,就表明对"create table"语句的执行进行记录。 不管这语句是否是针对某个对象的操作

2、权限审计(Privilege Auditing)

对涉及某些权限的操作进行审计。这里强调“涉及权限”

例如,audit CREATE TABLE;命令,又可以表明对涉及“CREATE TABLE”权限的操作进行审计。

所以说,在这种命令的情况下,既产生一个语句审计,又产生了一个权限审计。

有时候“语句审计”和“权限审计”的相互重复的。这一点可以后面证明。

3、对象审计(Object Auditing)。 记录作用在指定对象上的操作。

如何关闭Oracle11g数据库的审计功能?

在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),\x0d\x0aoracle11gR2的官方文档上写的是错的,当上说default是none,而且是审计到DB级别的,这样就会\x0d\x0a往aud$表里记录统计信息。\x0d\x0a \x0d\x0a1.如果审计不是必须的,可以关掉审计功能;\x0d\x0a\x0d\x0aSQL show parameter audit_trail;\x0d\x0a\x0d\x0aNAME TYPE VALUE\x0d\x0a------------------------------------ ----------- ------------------------------\x0d\x0aaudit_trail string DB\x0d\x0a\x0d\x0aSQL alter system set audit_trail=none scope=spfile;\x0d\x0aSQL shut immediate;\x0d\x0aSQLstartup\x0d\x0a2.删除已有的审计信息\x0d\x0a可以直接truncate表aud$,\x0d\x0atruncate table SYS.AUD$;\x0d\x0a\x0d\x0a3.或者将aud$表移到另外一个表空间下,以减少system表空间的压力和被撑爆的风险。\x0d\x0a \x0d\x0a附:11g中有关audit_trail参数的设置说明:\x0d\x0aAUDIT_TRAIL\x0d\x0aProperty Description\x0d\x0aParameter type String\x0d\x0aSyntaxAUDIT_TRAIL = { none | os | db [, extended] | xml [, extended] }\x0d\x0aDefault valuenone\x0d\x0aModifiable No\x0d\x0aBasic No\x0d\x0aAUDIT_TRAIL enables or disables database auditing.\x0d\x0aValues:\x0d\x0anone\x0d\x0aDisables standard auditing. This value is the default if the AUDIT_TRAIL parameter was not set \x0d\x0ain the initialization parameter file or if you created the database using a method other than \x0d\x0aDatabase Configuration Assistant. If you created the database using Database Configuration \x0d\x0aAssistant, then the default is db.\x0d\x0aos\x0d\x0aDirects all audit records to an operating system file. Oracle recommends that you use the os \x0d\x0asetting, particularly if you are using an ultra-secure database configuration.\x0d\x0adb\x0d\x0aDirects audit records to the database audit trail (the SYS.AUD$ table), except for records \x0d\x0athat are always written to the operating system audit trail. Use this setting for a general \x0d\x0adatabase for manageability.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, then Oracle Database \x0d\x0ainternally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0adb, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=db, and also populates the SQL bind and SQL text CLOB-type \x0d\x0acolumns of the SYS.AUD$ table, when available. These two columns are populated only when this \x0d\x0aparameter is specified.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, extended, then Oracle \x0d\x0aDatabase internally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0axml\x0d\x0aWrites to the operating system audit record file in XML format. Records all elements of the \x0d\x0aAuditRecord node except Sql_Text and Sql_Bind to the operating system XML audit file.\x0d\x0axml, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=xml, and populates the SQL bind and SQL text CLOB-type columns\x0d\x0a of the SYS.AUD$ table, wherever possible. These columns are populated only when this parameter \x0d\x0ais specified.\x0d\x0aYou can use the SQL AUDIT statement to set auditing options regardless of the setting of this \x0d\x0aparameter.


网站栏目:oracle如何审计 oracle审计文件可以删除吗
标题来源:http://cxhlcq.com/article/hihjio.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部