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

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.

monitor and manage the archiving process

You can use this information to monitor and manage the archiving process in your Oracle 12c database.
SQL> CONNECT / AS SYSDBA
Connected.
SQL> STARTUP
ORACLE instance started.

Total System Global Area      13148160 bytes
Fixed Size                      49152 bytes
Variable Size                12165168 bytes
Database Buffers              409600 bytes
Redo Buffers                   73728 bytes
Database mounted.
Database opened.

SQL> ARCHIVE LOG LIST;
Database log mode              Archive Mode
Automatic archival             Disabled
Archive destination            D:\oracle11g\archive
Oldest online log sequence     35
Next log sequence to archive   35
Current log sequence           38
SQL>

Notes:
  1. CONNECT / AS SYSDBA: In Oracle 11g, it is a common practice to connect using / AS SYSDBA for administrative tasks.
  2. ARCHIVE DESTINATION: Ensure you adjust the archive destination to the path appropriate for your setup.
  3. STARTUP: The STARTUP command is still valid in Oracle 11g and will start the database instance similarly.

You may need to further configure `archive log` settings using the `ALTER SYSTEM` command if necessary for enabling or modifying automatic archiving settings.
--->
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 diagrams.
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.

SEMrush Software Target 5SEMrush Software Banner 5