Oracle listener日志删除

检查测试环境时发现监听的日志已经达到了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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值