Archivelog | Noarchivelog   «Prev  Next»
Lesson 6Setting up archivelog mode
Objective Configure archivelog mode.

Configure archivelog mode

You can configure your database for archivelog mode by modifying the init.ora file parameters LOG_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT. On our example system we would change init.ora to nclude the following:
The LOG_ARCHIVE_FORMAT parameter has the following options to name your archive log files:
  1. %s or %S will include the log sequence number as part of the name. Using %S will cause the number to be fixed length padded to the left with zeros.
  2. %t or %T will include the thread number as part of the name.

Duplexing archive log Files

We maintain multiple copies of the control file and redo logs to minimize media failure problems. We can do the same for our archive log files. This is called duplexed archive log files. Duplexing our archive log files allows us to maintain two copies of each archive log file. To do this we must modify the init.ora parameters LOG_ARCHIVE_DUPLEX_DEST and LOG_ARCHIVE_MIN_SUCCEES_DEST. This second parameter will indicate how many archive log destinations must succeed, either 1 or 2. So on our system, we will enter the following in our init.ora file:

Enabling archiving

After specifying the locations of our archive files, we must change the mode of the database to allow archiving to occur. Please shutdown the database and do a complete backup in case anything unfortunate happens. The typical process is defined in the following simulation:

Enabling archivelog mode

  1. First we want to modify the init.ora file to provide for duplexed archivelog mode files. We've already opened the init.ora file for you, so enter the following commands in the space we've created for you:
  2. Choose Save from the file menu.
  3. Now close the initorc1.ora file by clicking on the X in the upper right corner.
  4. Now bring up Server Manager and mount the database in order to read information from the control and init.ora files. To do this, first type svrmgrat the DOS prompt and hit the return key.
  5. Now enter connect internal at the DOS prompt and hit the return key.
  6. Now you are queried for a password. Since there is no echo and the cursor doesn't move on-screen when you type in your password, just click in the space after "Password:" for the purposes of this simulation and we'll move you to the next screen.
  7. Mount the database by typing startup mount after the DOS prompt.
  8. The database has mounted. Now enable archiving in order to update information in the control files by entering alter database archivelog; at the DOS prompt. When you're done, hit the return key.
  9. Open the database by entering alter database open; and hitting the return key.
  10. Now shut down the database by entering shutdown normal at the DOS prompt and hitting the return key.
  11. At this point you would normally do a complete backup of your database, but that's beyond the scope of this particular course so we'll stop here. Performing a complete database backup will be covered in detail in the second course in this series. This is the end of the simulation.
It is important to note that after the mode of the database has changed from noarchivelog to archivelog mode, you must backup the database, init.ora, and control files. This is because your previous backup is no longer valid. The backup that you just performed is now the current backup and can restore the database. You can scrap all your previous backups.
The next lesson is the module wrap-up.