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:
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:
- Connect to the Oracle database with SYSDBA privileges using SQL*Plus:
sqlplus / as sysdba
- 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:
- The database log mode is set to Archive Mode.
- Automatic archival is enabled.
- The archive destination is set to /path/to/your/archive/directory.
- The oldest online log sequence is 100.
- The next log sequence to be archived is 102.
- The current log sequence is 102.
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:
- CONNECT / AS SYSDBA: In Oracle 11g, it is a common practice to connect using
/ AS SYSDBA
for administrative tasks.
- ARCHIVE DESTINATION: Ensure you adjust the
archive destination
to the path appropriate for your setup.
- 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.
--->