|Oracle® Database Administrator's Guide
11g Release 2 (11.2)
|PDF · Mobi · ePub|
This section describes how to set the archiving mode of the database and how to control the archiving process. The following topics are discussed:
See Also:your Oracle operating system specific documentation for additional information on controlling archiving modes
You set the initial archiving mode as part of database creation in the
CREATE DATABASE statement. Usually, you can use the default of
NOARCHIVELOG mode at database creation because there is no need to archive the redo information generated by that process. After creating the database, decide whether to change the initial archiving mode.
If you specify
ARCHIVELOG mode, you must have initialization parameters set that specify the destinations for the archived redo log files (see "Setting Initialization Parameters for Archive Destinations").
To change the archiving mode of the database, use the
ALTER DATABASE statement with the
NOARCHIVELOG clause. To change the archiving mode, you must be connected to the database with administrator privileges (
The following steps switch the database archiving mode from
Shut down the database instance.
An open database must first be closed and any associated instances shut down before you can switch the database archiving mode. You cannot change the mode from
NOARCHIVELOG if any datafiles need media recovery.
Back up the database.
Before making any major change to a database, always back up the database to protect against any problems. This will be your final backup of the database in
NOARCHIVELOG mode and can be used if something goes wrong during the change to
ARCHIVELOG mode. See Oracle Database Backup and Recovery User's Guide for information about taking database backups.
Edit the initialization parameter file to include the initialization parameters that specify the destinations for the archived redo log files (see "Setting Initialization Parameters for Archive Destinations").
Start a new instance and mount, but do not open, the database.
To enable or disable archiving, the database must be mounted but not open.
ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
Shut down the database.
Back up the database.
Changing the database archiving mode updates the control file. After changing the database archiving mode, you must back up all of your database files and control file. Any previous backup is no longer usable because it was taken in
See Also:Oracle Real Application Clusters Administration and Deployment Guide for more information about switching the archiving mode when using Real Application Clusters
As mentioned in "Running a Database in ARCHIVELOG Mode", for convenience and efficiency, automatic archiving is usually best. However, you can configure your database for manual archiving only. To operate your database in manual archiving mode, follow the procedure described in "Changing the Database Archiving Mode", but replace the
DATABASE statement in step 5 with the following statement:
ALTER DATABASE ARCHIVELOG MANUAL;
When you operate your database in manual
ARCHIVELOG mode, you must archive inactive groups of filled redo log files or your database operation can be temporarily suspended. To archive a filled redo log group manually, connect with administrator privileges. Ensure that the database is either mounted or open. Use the
ALTER SYSTEM statement with the
ARCHIVE LOG clause to manually archive filled redo log files. The following statement archives all unarchived log files:
ALTER SYSTEM ARCHIVE LOG ALL;
When you use manual archiving mode, you cannot specify any standby databases in the archiving destinations.
Even when automatic archiving is enabled, you can use manual archiving for such actions as rearchiving an inactive group of filled redo log members to another location. In this case, it is possible for the instance to reuse the redo log group before you have finished manually archiving, and thereby overwrite the files. If this happens, the database writes an error message to the alert log.
LOG_ARCHIVE_MAX_PROCESSES initialization parameter specifies the number of ARCn processes that the database initially starts. The default is four processes. There is usually no need specify this initialization parameter or to change its default value, because the database starts additional archiver processes (ARCn) as needed to ensure that the automatic processing of filled redo log files does not fall behind.
However, to avoid any run-time overhead of starting additional ARCn processes, you can set the
LOG_ARCHIVE_MAX_PROCESSES initialization parameter to specify that up to 30 ARCn processes be started at instance startup. The
LOG_ARCHIVE_MAX_PROCESSES parameter is dynamic, so you can change it using the
ALTER SYSTEM statement.
The following statement configures the database to start six ARCn processes upon startup:
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=6;
The statement also has an immediate effect on the currently running instance. It increases or decreases the current number of running ARCn processes to six.