Archiving Redo log   «Prev  Next»
Lesson 2 Archivelog mode
Objective Turn on archivelog mode for your database.

Archivelog mode (Turn on)

Archivelog mode is a special mode of database operation that requires a copy to be made of each redo log file before it can be reused. If you want to recover all changes to your database in the event of a loss, you need to run your database in archivelog mode and you need to archive your log files.
To place a database into archivelog mode, follow these steps:
  1. Shut down the database.
  2. Back up the database.
  3. Mount the database (using the STARTUP MOUNT command).
  4. Issue the ALTER DATABASE ARCHIVE LOG command to enable archivelog mode.
  5. Open the database (using the ALTER DATABASE OPEN command).
The commands listed in the above steps should be issued from SQL * Plus. If you are using Oracle's Enterprise Manager software, you have the option of using Instance Manager for steps 3-5. The following simulation shows you how:
  1. After you've shut down and backed up your database, it's time to put it into archivelog mode. To use Instance Manager, start by logging on as SYSDBA. Enter SYSTEM for the username, MANAGER for the password, and COIN for the service. Then click the Connect as drop-down list box.
  2. ClickConnect_asButton
  3. Username
  4. SYSTEM
  5. Enter SYSTEM in the Username box.
  6. Password
  7. MANAGER
  8. Enter MANAGER in the Password box.
  9. Service,
  10. COIN
  11. Enter COIN in the Service box and click the Connect as drop down box.
  1. The drop-down list will give you the choice between a normal connection and connecting as either SYSDBA or SYSOPER. Click SYSDBA to select it.
  2. ClickSYSDBA
  3. Now that all your connection information has been entered, go ahead and click OK to connect.
  4. ClickOK
  1. This is Instance Manager's opening screen. Click the Database icon to check the current status of the database.
  2. ClickDatabaseIcon
  1. As you can see, the database is currently shut down. It needs to be mounted to change the archivelog mode, so click the Mounted radio button to select that state.
  2. ClickMountedRadioButton
  3. Now, click the Apply button to apply your change and mount the database.
  4. ClickApplyButton
  1. Here, Instance Manager is asking you where it should look for the database initialization parameters. Normally, you would need to browse and find your initialization file. For this simulation, just accept the default choice by clicking OK.
  2. ClickOK
  3. While Instance Manager mounts the instance, this progress window will display. Click anywhere in the image to advance past this window.
  4. ClickAnywhere

  1. Finally, Instance Manager will display this confirmation dialog. Press OK to continue.
  2. ClickOK
  3. The instance is now mounted. To place it into archivelog mode, click the Database drop-down menu.
  4. clickDatabaseOnTopMenu
  5. error
  6. Try clicking Database on the top menu.

enable Archivelog Mode
It is important to understand that placing a database into archivelog mode ensures that Oracle will not overwrite a redo log file until it has been copied to the archive log destination. Once you place a database into archivelog mode, you have to choose between either manually archiving your redo logs or having Oracle do that for you. You'll learn how to make that choice later in this module. In the next lesson, you will specify the directory to which Oracle archives log files.

Archivelog Mode - Exercise

Take this matching exercise to test your knowledge of the steps necessary to place a database into archivelog mode.
Archivelog Mode - Exercise