Enabling ARCHIVELOG Mode for Media Failure Protection

Previous
Previous
Next
Next

This section describes how to turn on ARCHIVELOG mode so that your database is fully protected not only against operating system and Oracle instance failure, but also against media (disk) failure. The following topics are covered:

Viewing the Current ARCHIVELOG Mode Setting

To view the current ARCHIVELOG mode setting:

  1. Access the Database Home Page.

    See "Accessing the Database Home Page" for instructions.

  2. Examine the Usage Monitor.

    Description of usage_monitor.gif follows
    Description of the illustration usage_monitor.gif


    Note:

    If the Usage Monitor does not appear on the Database Home Page, click the Customize link near the upper right-hand corner of the page, and then enable the Usage Monitor.

    The Log Archiving mode is displayed in the last line of the Usage Monitor. In this example, the text Log Archiving: Off indicates that ARCHIVELOG mode is turned off.


    Note:

    Click the Log Archiving: {On|Off} link to view a page that provides details on the online redo logs.

Turning on ARCHIVELOG Mode

Turning on ARCHIVELOG mode is a one-time operation. After it is turned on, it remains on until you turn it off. (You turn off ARCHIVELOG mode by setting NOARCHIVELOG mode.) Restarting the database does not change the ARCHIVELOG mode setting.

To turn on ARCHIVELOG mode:

  1. Using SQL Command Line, log in to the database and connect as SYSDBA, as described in "Logging In and Connecting to the Database as SYSDBA".

  2. At the SQL Command Line prompt, enter the following command:

    SHUTDOWN IMMEDIATE
    
    

    If the command is successful, it displays the following output.

    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    
    
  3. At the SQL Command Line prompt, enter the following command:

    STARTUP MOUNT
    
    

    If the command is successful, it displays the following output. (System global area sizes will vary depending on the amount of physical memory in your Oracle Database XE host computer.)

    ORACLE instance started.
     
    Total System Global Area  599785472 bytes
    Fixed Size                  1220804 bytes
    Variable Size             180358972 bytes
    Database Buffers          415236096 bytes
    Redo Buffers                2969600 bytes
    Database mounted.
    
    
  4. Enter the following command:

    ALTER DATABASE ARCHIVELOG;
    
    

    If the command is successful, it displays the following output:

    Database altered.
    
    
  5. Enter the following command:

    ALTER DATABASE OPEN;
    
    

    If the command is successful, it displays the following output:

    Database altered.
    
    
  6. Exit SQL Command Line by entering the following command:

    EXIT
    
    

The database is now running with the new ARCHIVELOG mode setting.


Note:

To turn off ARCHIVELOG mode (that is, to set NOARCHIVELOG mode), follow the previous steps, but enter the following command in Step 4:
ALTER DATABASE NOARCHIVELOG;


Caution:

When you change the ARCHIVELOG mode setting for your database, all of your existing backups become unusable. You must immediately perform a backup after changing the ARCHIVELOG mode, as described in "Backing Up the Database".