|Oracle® Database Administrator's Guide
11g Release 1 (11.1)
|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 "Specifying 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 "Specifying 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
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 mounted but not 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 invokes. The default is two 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 runtime overhead of invoking additional ARCn processes, you can set the
LOG_ARCHIVE_MAX_PROCESSES initialization parameter to specify up to ten ARCn processes to be started at instance startup. The
LOG_ARCHIVE_MAX_PROCESSES parameter is dynamic, and can be changed using the
ALTER SYSTEM statement. The database must be mounted but not open. The following statement increases (or decreases) the number of ARCn processes currently running:
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=3;