zoukankan      html  css  js  c++  java
  • Oracle 11g 在audit_file_dest目录下产生大量的aud文件

    一、adump目录数据暴增现象

    发现某台数据库服务器的根目录的使用率在暴涨,发现Oracle数据库的adump目录,每秒生成一个dump文件。数据库并未开通审计外部记录。为什么adump目录会生成那么多的dump文件?

    抽取其中的某个adump文件,文件内容如下:

    可以看到,某进程用sysdba登录

    二、adump目录相关说明

    从网上找到关于sysdba或者sysoper与adump目录的关系:

    每次sysdba或者sysoper权限登录都会写入一个audit trail文件或者在现有的trail文件后面添加登录信息。而这个并不受audit_trail参数限制,audit_trail是显示是否启用审计和审计内容存储的具体位置

    有关audit_sys_operations参数:
    AUDIT_SYS_OPERATIONS enables or disables the auditing of top-level operations, which are SQL statements directly issued by users when connecting with SYSDBA or SYSOPER privileges. (SQL statements run from within PL/SQL procedures or functions are not considered top-level.) The audit records are written to the operating system's audit trail. The audit records will be written in XML format if the AUDIT_TRAIL initialization parameter is set to xml or xml, extended.
    On UNIX platforms, if the AUDIT_SYSLOG_LEVEL parameter has also been set, then it overrides the AUDIT_TRAIL parameter and SYS audit records are written to the system audit log using the SYSLOG utility.
    该参数默认为false,但是sysdba和sysoper登录还是会记录audit到相应的audit trail文件的,只是不记录之后sysdba操作的信息,而如果设置true,还会记录之后sysdba或者sysoper操作记录到audit trail中。
    可以关闭审计,但是sysdba或者sysoper登录记录audit trail却无法禁掉。

    三、禁止以sqlplus "/as sysdba"登陆的方法
    禁止一般的oracle用户以sqlplus "/as sysdba"登陆
    在TNS配置目录,找到sqlnet.ora,添加SQLNET.AUTHENTICATION_SERVICES = (NONE)
    [oracle@wanliu-jx-db-218 admin]$ cat sqlnet.ora
    # sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    ADR_BASE = /u01/app/oracle
    SQLNET.AUTHENTICATION_SERVICES = (NONE)
    在使用sqlplus / as sysdba 登录,就会报错了 
     
    最后找到了使用sqlplus / as sysdba登录数据库的脚本,此脚本是一个锁监控脚本,每秒执行一次,这就怪不得,adump的dump文件,每秒生成一个了。
    将脚本登录使用普通用户,这样adump下面就不再生成dump文件了。 

    整理自:https://blog.csdn.net/zhaoyangjian724/article/details/50637409

  • 相关阅读:
    VirtualBox 安装增强工具Guest Additions 【转载】
    全面认识计算机启动过程【转载】
    Linux下使用mke2fsk格式化虚拟磁盘分区的方法
    什么是posix
    bochs默认没有pci的
    剑指offer中二进制中1的个数
    原码、补码、反码的概念
    初识hadoop
    chord原理的解读
    深度学习概述:从感知机到深度网络
  • 原文地址:https://www.cnblogs.com/xibuhaohao/p/9962707.html
Copyright © 2011-2022 走看看