How to display archived Oracle logs

Source: Internet
Author: User

The Oracle Database contains multiple log files. The following describes how to view Oracle archive logs in detail. If you are interested in Oracle archive logs, take a look.

Display archived log information

1. Use the archive log list command to display the LOG operation mode, archiving location, and the LOG serial number to be archived automatically.

2. display the log Operation Mode

SELECT name, log_mode FROM v $ database;

3. Displays Oracle archive log information.

Col name format a46
Select name, swquence #, first_change # FROM v $ archived_log;

Name indicates the Name of the Oracle archived log file, and sequence # indicates the log serial number corresponding to the archived log, and firs_change # indicates the starting SCN value of the archived log.

4. archive log files are required for media recovery. Therefore, you must accurately locate the storage location of archived logs. You can query the dynamic performance view v $ archive_dest to obtain the directory where the archived logs are located.

SELECT destination FROM v $ archive dest;

5. Display log history information

SELECT * FROM v $ loghist;

THREAD # is used to identify the redo THREAD number, SEQUNCE # is used to identify the log serial number, FIRST_CHANGE # is used to identify the start SCN value corresponding to the log serial number, FIRST_TIME is used to identify the occurrence time of the start SCN. SWICTH_CHANGE # The SCN value used to identify log switching.

6. display the archived process information.

During log switching, the ARCH process automatically copies the redo log content to the Oracle archive log. To speed up archiving, multiple ARCH processes should be enabled. query the dynamic performance view V $ ARCHIVE_PROCESSES to display information about all archiving processes!

SELECT * FROM v $ archive_processes;

Porcess identifies the ARCH process number, status identifies the status of the ARCH process (ACTIVE: ACTIVE, STOPPED: not started), and log_sequence identifies the log serial number that is being archived, state is used to identify the working status of the ARCH process.

Default ORACLE user and password

Implementation of oracle multi-column subquery

Oracle multi-Table query instance

How to query Oracle user session information

Permission management for Oracle Super Users

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.