[오라클]리스너 파일 크기 변경
As the listener.log file grows, the DBA will want to either remove or rename this log file. If you have ever tried to remove or rename the listener.log file on Windows while the TNS listener process was running you will quickly notice that Windows holds a lock on this file and returns an error:
C:\> del C:\oracle\ora92\network\log\listener.log
C:\oracle\ora92\network\log\listener.log
The process cannot access the file because it is being used by another process.Most DBAs simply stop the TNS listener process, rename (or remove) the file, then restart the TNS listener process. This can, however, cause potention connection errors for users that are attempting to connect while the listener process is down.
Even under UNIX, problems exist when attempting to rename the listener.log file while the TNS listener process is running. Just like under Windows, the Oracle TNS listener process holds an open handle to the file. Under UNIX, you CAN remove the file, but Oracle will not re-create the file when it attempts to write to it again. The TNS listener will need to be stopped and restarted in order for it to create the new listener.log file.
Well, here is a solution for renaming (or removing) the listener.log file without having to stop and start the TNS listener process under either Windows or UNIX:
Windows
C:\> cd \oracle\ora92\network\log
C:\oracle\ora92\network\log> lsnrctl set log_status off
C:\oracle\ora92\network\log> rename listener.log listener.old
C:\oracle\ora92\network\log> lsnrctl set log_status on
UNIX
% cd /u01/app/oracle/product/9.2.0/network/log
% lsnrctl set log_status off
% mv listener.log listener.old
% lsnrctl set log_status on
'01.오라클 > 001.DB 관리' 카테고리의 다른 글
[오라클]제약조건 확인 (0) | 2013.02.26 |
---|---|
[오라클]클라이언트 IP 알아내기 (0) | 2013.02.20 |
[오라클]테이블 설계시 고려해야 될 점 (0) | 2013.02.20 |
[오라클]유용한 DBA View 조회 (0) | 2013.01.23 |
[오라클]log, trc 등 관리 정책 및 쉘 스크립트 (0) | 2012.12.19 |