Manual | Automatic Archiving   «Prev  Next»
Lesson 5How to obtain archive log information
ObjectiveRetrieve archive log information.

How to obtain Archive Log Information

There are several ways to determine the current archival state of your database. We have seen several of these in earlier lessons. For the best single summary of your archival state, use the archive log list command in server manager. Following are two examples of output from this command. The first example is a database in archivelog mode with automatic archiving disabled:

Use archive log list command in SQL * Plus to obtain archive log information

Question: How do I use the archive log list command in SQL * Plus to obtain archive log information from an Oracle 12c database?
In SQL*Plus, you can use the ARCHIVE LOG LIST command to obtain archive log information from an Oracle 12c database. This command displays the current archiving mode, archive destination, and other related information.
To use the ARCHIVE LOG LIST command, follow these steps:
  1. Connect to the Oracle database with SYSDBA privileges using SQL*Plus:
    sqlplus / as sysdba
    

  2. Run the ARCHIVE LOG LIST command:
    ARCHIVE LOG LIST;
    

The output will show information about the archiving mode and the archive destination. Here is an example of the output:
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /path/to/your/archive/directory
Oldest online log sequence     100
Next log sequence to archive   102
Current log sequence           102

In this example, the output indicates that:
  1. The database log mode is set to Archive Mode.
  2. Automatic archival is enabled.
  3. The archive destination is set to /path/to/your/archive/directory.
  4. The oldest online log sequence is 100.
  5. The next log sequence to be archived is 102.
  6. The current log sequence is 102.

You can use this information to monitor and manage the archiving process in your Oracle 12c database.
archivelog mode disabled
archivelog mode disabled

Let us review the information contained in this image.
Archive log list entry Description Our database value
Database log mode Current mode of the database Archive Mode
Automatic archival Whether ARCH is running Disabled
Archive destination Where the archived log files will go d:\oracle8\archive
Oldest online log sequence The sequence number of the oldest online redo log file 35
Next log sequence to archive Next redo log file to be archived; displayed only when in archivelog mode 38
Current log sequence Which log file we are currently writing to 38
The next is an example of a database in archivelog mode with automatic archiving enabled and the archive log destination directory as d:\oracle8\archive.
automatic archiving enabled
automatic archiving enabled

Other sources of information include various dynamic data dictionary views contained within the following Slide Show.
1) The V$ARCHIVE_DEST view displays the archive log destination, current value. mode and status for the current instance.
2) The V$LOG_HISTORY view displays log file information from the control file.
3) The V$DATABASE view displays the current state of database archiving.

The next lesson is about standby databases.