Manual | Automatic Archiving   «Prev  Next»
Lesson 1

Manual and Automatic Archiving Options

Up to this point we have learned to set up a database to facilitate archiving of redo log files. In this module we will learn to set up a database to provide for both
  1. manual and
  2. automatic
archiving of redo log files. By the end of this lesson you should be familiar with the following topics:
  1. Normal ARCH processing
  2. Manual archiving of redo log files
  3. Automatic archive log file options
  4. Obtaining archive log information
Also included is a brief discussion on the use of standby databases. While the Oracle8 DBA certification exam does not test you on this topic, it is an important consideration when formulating a complete backup and recovery plan. Often the cost to maintain a standby database can be justified by doing an analysis of lost revenue incurred during the recovery of your primary database.
The next lesson discusses archiving your redo log files.

The exam does not contain questions pertaining to getting the database in ARCHIVELOG mode, just questions about the differences between ARCHIVELOG mode and NOARCHIVELOG mode as well as questions about automatic and manual archiving.

Manual and automatic archiving Options for backup in Oracle 12c

Question: What are the manual and automatic archiving Options for backup in Oracle 12c?
In Oracle 12c, there are two modes for archiving redo log files: manual archiving and automatic archiving. Redo log files are crucial for database recovery, as they contain a record of changes made to the database. Archiving these redo log files ensures that you have a complete set of data to recover the database in case of a failure.
  1. Manual archiving: In manual archiving mode, you need to manually archive the redo log files using the SQL*Plus
    ALTER SYSTEM
    
    command. The database is in No Archive Log Mode, and the DBA is responsible for manually managing and archiving the redo logs. Manual archiving is not recommended for production databases, as it requires continuous monitoring and manual intervention to avoid potential data loss.
    To enable manual archiving mode, you can use the following commands:
    -- Set the database to No Archive Log Mode
    ALTER DATABASE NOARCHIVELOG;
    
    -- Archive a specific log sequence number
    ALTER SYSTEM ARCHIVE LOG sequence_number;
    
  2. Automatic archiving: In automatic archiving mode, the database automatically archives redo log files as they are filled. The database is in Archive Log Mode, and the archiving process (ARCn) takes care of archiving the redo logs to the specified destinations. This mode is recommended for production databases, as it ensures a complete set of redo logs for recovery without manual intervention.
    To enable automatic archiving mode, follow these steps:
    1. Ensure that the database is in mounted mode, but not open:
      SHUTDOWN IMMEDIATE;
      STARTUP MOUNT;
      
    2. Enable Archive Log Mode:
      ALTER DATABASE ARCHIVELOG;
      
    3. Open the database:
      ALTER DATABASE OPEN;
      
    4. Configure the archive destination(s) using the LOG_ARCHIVE_DEST_n

V$INSTANCE

By querying the V$INSTANCE view, you can determine the status of the archiver process. Run the following query:

SELECT archiver
FROM V$INSTANCE
ARCHIVE
-------
STARTED
A status of STARTED means that automatic archiving has been enabled for the database and that the ARCn process is running. If the value is STOPPED, this indicates that either manual archiving or no archiving is being performed.