Sunday, March 16, 2008

Procedure to Resize Listener Log File

The following procedure details how to resize the listener log file. In this procedure we

perform the following


- Set the listener process to stop logging to the listener log file.

- Rename the listener.log file to a new name.

- Set the listener process to start logging to the listener log file.


The listener process will create a new log file , this will allow you to archive off the

old listerner log file which can often help resolve file system space issues where

the listener log file has grown to an unmanageable size.


Unix



# lsnrctl set Log_status off
# mv listener.log to listener.log.old
# lsnrctl set Log_Status on


Windows


C:> lsnrctl set Log_status off
C:> move listener.log to listener.log.old
C:> lsnrctl set Log_Status on


Example


C:oracleproduct9inetworklog>lsnrctl set log_status off

LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 16-MAR-2008 21:51:
18

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
LISTENER parameter "log_status" set to OFF
The command completed successfully

C:oracleproduct9inetworklog>move listener.log listener.log.old

C:oracleproduct9inetworklog>lsnrctl set log_status on

LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 16-MAR-2008 21:53:
10

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
LISTENER parameter "log_status" set to ON
The command completed successfully




Note: It is important not to rename or delete the listener log file without setting the

"log_status" to off. In the event that you rename or delete the listener log file

without setting the listener log_status to off , the listener will stop logging to the

listener log file. To resolve such an issue where the listener is no longer logging to

the listener log file set the log_status to off , and then set the log_status to on.


e.g.


# lsnrctl set Log_status off
# lsnrctl set Log_Status on





No comments: