|Lesson 5||Automatic archive log options|
|Objective||Set up automatic archiving of the redo log files.|
Automatic archive log Options
You probably will not bother with the mundane task of manually backing up online redo log files, opting instead to have the
instance back up the online redo log files independent of the DBA. This reduces the chance for error and also reduces the chance that your redo log files will fill up. So let's look at how to set up automatic archiving of your online redo log files.
Start automatic archiving
Most Oracle installations set up the database to archive log files automatically. It is a relatively simple process and makes your life much easier. To start automatic archiving do the following:
- Open the database in archivelog mode
- Enable the
ARCH process with the following command:
SVRMGR>alter system archive log
start to ‘e:\oracle8\archive’;
ARCH process archives your redo log files as they fill up. If you bring the database down, you must restart the
ARCH process each time you start an instance. By default
ARCH is disabled.
If you want
ARCH at the start of the instance
ARCH to automatically start each time your instance starts, you must modify the LOG_ARCHIVE_START parameter in the init.ora file. Our system would be set up as:
This will allow
ARCH to start each time the instance starts up.
Disabling automatic archiving
If for some reason you choose to stop your system from automatically archiving, enter the following command:
SVRMGR>alter system archive log stop
You must be very careful when doing this. Even though you have stopped the
ARCH process from archiving, you have not changed the state of the database from archive mode to noarchive mode.
The instance will expect that you will be manually archiving your redo log files, so you run the danger of filling up your redo logs, thereby making the system hang. You must set the database back to
noarchive log mode and make sure that the LOG_ARCHIVE_START parameter in the init.ora file is set to FALSE.
The next lesson shows how to obtain archive log information.