问题现象:

登陆数据库失败,报无可用空间
oracle@urp1vsmdb1:~> sqlplus "/as sysdba";
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Aug 5 14:29:03 2011
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-09817: Write to audit file failed.
Linux-x86_64 Error: 28: No space left on device
ORA-01075: you are currently logged on
 
处理步骤:
1,检查相关文件系统空间,发现安装数据库的/opt 文件系统已被占满
urp1vsmdb1:/etc # df -lh
Filesystem             Size Used Avail Use% Mounted on
/dev/sda2              9.9G 412M 9.0G   5% /
udev                   7.9G 184K 7.8G   1% /dev
/dev/sda10              30G 3.7G   25G 13% /home
/dev/sda9              9.9G 151M 9.3G   2% /log
/dev/sda5               55G   52G     0 100% /opt
/dev/sda8              5.0G 139M 4.6G   3% /tmp
/dev/sda6              5.0G 2.2G 2.6G 47% /usr
/dev/sda7              5.0G 264M 4.5G   6% /var
tmpfs                  8.0G 4.7G 3.4G 59% /dev/shm
urp1vsmdb1:/etc # su - oracle
 
2,使用均分法依次逐层检查opt 下相关目录,发现/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener/alert竟然达到37G之多,
检查该目录下面全部都是.xml的日志文件,是记录监听器相关日志的。
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener> du -sh alert/
37G      alert/
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener> cd alert
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener/alert> ls
log_1000.xml log_1261.xml log_1521.xml log_1782.xml log_2041.xml log_2301.xml log_2562.xml log_2822.xml log_3082.xml log_3342.xml log_3602.xml log_490.xml 
 
3,将其进行删除,但发现日志增长迅速,几分种后就已经增长到了几百兆;
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener/alert> rm *.*
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener> du -sh alert
590M     alert
4,问题聚焦在如何停止监听器日志上,以下为关闭监听器日志详细步骤:
1)   oracle用户登陆数据库,进入监听器
oracle@urp1vsmdb1:/home/oracle
lsnrctl
 
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 05-AUG-2011 15:18:41
 
Copyright (c) 1991, 2008, Oracle. All rights reserved.
 
Welcome to LSNRCTL, type "help" for information.
2)   检查监听器日志状态,发现为放开状态
LSNRCTL> show log_status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to ON
The command completed successfully
3)   将监听器日志关闭
LSNRCTL> set log_status off
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to OFF
The command completed successfully
4)   保存配置
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Saved LISTENER configuration parameters.
Listener Parameter File    /opt/oracle/product/11g/db/network/admin/listener.ora
Old Parameter File    /opt/oracle/product/11g/db/network/admin/listener.bak
The command completed successfully
5)   验证日志是否已关闭,是否修改成功
LSNRCTL> show log_status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> quit
6)   检查 lisenter配置文件验证是否更新:
该配置文件为$ORACLE_HOME/network/admin/listener.ora ,文件中包含"LOGGING_LISTENER = OFF"
则表示更新成功;若文件中没有,则在文件末尾添加 "LOGGING_LISTENER = OFF"。
oracle@urp1vsmdb1:/opt/oracle/diag/tnslsnr/urp1vsmdb1/listener>
vi /oracle/product/11g/db/network/admin/listener.ora
以下为修改后的监听器文件内容:
# listener.ora Network Configuration File: /opt/oracle/product/11g/db/network/admin/listener.ora
# Generated by Oracle configuration tools.
 
LISTENER =
 (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = urp1vsmdb1)(PORT = 1521))
    )
 )
 
SID_LIST_LISTENER =
        (SID_LIST =
        (SID_DESC =
         (GLOBAL_DBNAME = uivr)
        (ORACLE_HOME = /opt/oracle/product/11g/db)
        (SID_NAME = uivr)
        )
        )
 
#----ADDED BY TNSLSNR 05-AUG-2011 15:20:14---
LOGGING_LISTENER = OFF
#--------------------------------------------