Archive Log List Command
- We will start this simulation at the Windows command prompt. Type in the command to start Server Manager.
- The next step is to connect to your database.
- Now that you are connected, go ahead and type in the ARCHIVE LOG LIST command.
- You can see that the results are similiar to those shown in the lesson.
I need the commands to find the Oracle archive logs on my database.
Question: Is there a standard place to locate the
archive redo logs directory?
Answer: The archived redo logs will be in the flash recovery area in the ARCHIVELOG directory.
The following commands can be used to locate the Oracle archive logs:
- Issue the archive log list command:
SQL> archive log list
- Issue the show parameter command:
SQL> show parameter db_recovery_file_dest
- Query the v$archive_dest view:
SQL> select dest_name, status, destination from v$archive_dest;
Note In a RAC database, the settings must remain consistent across all instances.
To enable archivelog mode:
1. Shut down the database first:
# srvctl stop database -d RONDB -o immediate
2. Mount the first instance either from the SQL*Plus prompt or by using the srvctl command, as follows:
SQL> startup mount;
# srvctl start database -d RONDB -o mount
Unlike pre-11gR2, you do not need to off/on the cluster_database parameter to switch between the archive/ noarchive modes.
1. Switch the database mode to archivelog and start the database using the following examples:
SQL> alter database archivelog;
SQL> alter database open;
2. To start the rest of the instance, use one of the following examples:
# srvctl start database -d RONDB
# srvctl start instance -d RONDB -I RONDB2
Once the preceding settings are made, connect to SQL*Plus and verify the database log mode and recovery
parameters using the following commands:
SQL> SELECT log_mode FROM v$database;
SQL > archive log list
The outcome should be similar to the following:
SYS @RONDB1 >archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 10
Next log sequence to archive 12
Current log sequence 12
From the preceding output, you can see that the database log mode is in Archive Mode now, and the archivelog location is set to Flash Recovery Area.