资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

oracle怎么打开审计,如何查看oracle数据库审计是否开启

oracle audit,如何审计ORACLE日志

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

创新互联公司主营阎良网站建设的网络公司,主营网站建设方案,app软件开发公司,阎良h5微信小程序开发搭建,阎良网站营销推广欢迎阎良等地区企业咨询

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

应该没有必要吧

在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数据库中的审计功能

二、审计可以分为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.

如何开启数据库里某USER所有表的审计

您好,不知道你的数据库是什么?

Oracle的审计是放到AUD$表里面,需要sys权限。

查询审计:

select * from sys.aud$;

select returncode, action#, userid, userhost, terminal,timestamp from aud$。

SYS.AUD$ 是唯一保留审计结果的表。其它的都是视图。

STMT_AUDIT_OPTION_MAP 包含有关审计选项类型代码的信息由SQL.BSQ 脚本在CREATEDATABASE 的时候创建

AUDIT_ACTIONS 包含对审计跟踪动作类型代码的说明

ALL_DEF_AUDIT_OPTS 包含默认对象审计选项。当创建对象时将应用这些选项

DBA_STMT_AUDIT_OPTS 描述由用户设置的跨系统的当前系统审计选项

DBA_PRIV_AUDIT_OPTS 描述由用户正在审计的跨系统的当前系统权限

DBA_OBJ_AUDIT_OPTS 描述在所有对象上的审计选项

USER_OBJ_AUDIT_OPTS USER 视图描述当前用户拥有的所有对象上的审计选项

以下是审计记录

DBA_AUDIT_TRAIL 列出所有审计跟踪条目

USER_AUDIT_TRAIL USER视图显示与当前用户有关的审计跟踪条目

DBA_AUDIT_OBJECT 包含系统中所有对象的审计跟踪记录

USER_AUDIT_ OBJECT USER 视图列出一些审计跟踪记录而这些记录涉及当前用户可以访问的对象的语句

DBA_AUDIT_SESSION 列出涉及CONNECT 和DISCONNECT 的所有审计跟踪记录

USER_AUDIT_ SESSION USER视图列出涉及当前用户的CONNECT 和DISCONNECT 的所有审计跟踪记录

DBA_AUDIT_STATEMENT 列出涉及数据库全部的GRANT REVOKE AUDIT NOAUDIT 和ALTER SYSTEM 语句的审计跟踪记录

USER_ AUDIT_ STATEMENT 对于USER 视图来说这些语句应是用户发布的

DBA_AUDIT_EXISTS 列出BY AUDIT NOT EXISTS 产生的审计跟踪条目

下面的视图用于细粒度审计

DBA_AUDIT_POLICIES 显示系统上的所有审计策略

DBA_FGA_AUDIT_TRAIL 列出基于值的审计的审计跟踪记录。


当前文章:oracle怎么打开审计,如何查看oracle数据库审计是否开启
标题链接:http://cdkjz.cn/article/hsjsep.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220