检查测试环境时发现监听的日志已经达到了2G多
/oracle/app/oracle10g/network/log$pwd
/oracle/app/oracle10g/network/log
/oracle/app/oracle10g/network/log$ls -l
total 5354960
-rw-r----- 1 oracle dba 7038212 Apr 09 2009 ca561dev.log
-rw-r----- 1 oracle dba 19200754 Jul 20 2009 ca561view.log
-rw-r----- 1 oracle dba 2711325868 Oct 22 19:09 listener.log
-rw-r----- 1 oracle dba 3797786 Oct 22 12:27 sqlnet.log
SQL> select 2711325868/1024/1024/1024 G from dual;
G
----------
2.52511898
-- 清除监听日志
/oracle/app/oracle10g/network/log$cp /dev/null listener.log
-- 查看监听日志大小
/oracle/app/oracle10g/network/log$ls -l
total 58872
-rw-r----- 1 oracle dba 7038212 Apr 09 2009 ca561dev.log
-rw-r----- 1 oracle dba 19200754 Jul 20 2009 ca561view.log
-rw-r----- 1 oracle dba 0 Oct 22 19:10 listener.log
-rw-r----- 1 oracle dba 3797786 Oct 22 12:27 sqlnet.log
--登录后退出,测试监听是否正常工作
/oracle/app/oracle10g/network/log$sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Oct 22 19:10:21 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
/oracle/app/oracle10g/network/log$ls -l
total 58880
-rw-r----- 1 oracle dba 7038212 Apr 09 2009 ca561dev.log
-rw-r----- 1 oracle dba 19200754 Jul 20 2009 ca561view.log
-rw-r----- 1 oracle dba 172 Oct 22 19:10 listener.log
-rw-r----- 1 oracle dba 3797786 Oct 22 12:27 sqlnet.log
--查看listener.log,看到listener.log里已经有日志了,说明监听正常工作。
/oracle/app/oracle10g/network/log$more listener.log
22-OCT-2010 19:10:23 * (CONNECT_DATA=(SID=ca561dev)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.0.1.41)
(PORT=3216)) * establish * ca561dev * 0