Rename the Oracle listener log file without renaming

Source: Internet
Author: User
Tags oracle materialized view

The following describes how to rename an Oracle listener log file without renaming it. It is helpful for you to learn about the Oracle listener log file.

Oracle listener log file (usually called listener. log) is a plain text file whose size keeps increasing. On a production Oracle Server, DBA checks the file daily, such as checking whether the listener has an abnormal stop, whether there is a malicious attack connection or not. When the file is very large, it may be slow to open and browse the file content.

At this time, you may want to back up the current log file and recreate a new log file. However, Oracle listeners cannot delete the log file during runtime, therefore, only the listener is stopped.

After the listener is renamed, start the listener again. A new listener log file will be automatically created when the listener is started, but the client connection will be disconnected. This article introduces a method without stopping the listener, rename the listener log file.

On Windows:

C: \> cd \ oracle \ ora92 \ network \ log # Switch to the directory where the listener log file is located

C: \ oracle \ ora92 \ network \ log> lsnrctl set log_status off # temporarily offline the listener log File

C: \ oracle \ ora92 \ network \ log> rename listener. log listener. old # rename the log file and add the date

C: \ oracle \ ora92 \ network \ log> lsnrctl set log_status on # Bring the listener log file online and a new log file will be created automatically.

On Linux/Unix platforms:

 
 
  1. % cd /u01/app/oracle/product/9.2.0/network/log  
  2.  
  3. % lsnrctl set log_status off  
  4.  
  5. % mv listener.log listener.old  
  6.  
  7. % lsnrctl set log_status on  

After the name is renamed, you can copy listener. old to the DBA's work computer for in-depth analysis. In case of hacker attacks, you can also retain the file as evidence.
 

Oracle Log File Management

Oracle Password File Management

Oracle reads and writes system files

Entire Process of creating Oracle Materialized View

ORACLE instance creation process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.