Archivelog

Oracle

Check the Database in an Archive Log Mode or Not

ARCHIVE LOG LIST

Changing the Archiving Mode

SHUTDOWN IMMEDIATE

STARTUP MOUNT

ALTER DATABASE ARCHIVELOG

ALTER DATABASE OPEN

Automatic and Manual Archiving

SHOW PARAMETER DB_RECOVERY_FILE_DEST;

Automatic and Manual Archiving

Automatic Archiving:

ALTER SYSTEM SET LOG_ARCHIVE_START=TRUE SCOPE=SPFILE;

STARTUP FORCE;

Manual Archiving:

ALTER SYSTEM SET LOG_ARCHIVE_START=FALSE SCOPE=SPFILE;

STARTUP FORCE;

Stop or Start Additional Archive Processes

ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=4 SCOPE=SPFILE;

STARTUP FORCE;

Manually Archiving Online Redo Log Files

ALTER SYSTEM ARCHIVE LOG CURRENT;

Specify Multiple Archive Log Destinations

Use LOG_ARCHIVE_DEST_ n to specify up to ten archival destinations, which can be on a:

Local Disk

Remote Location

ALTER SYSTEM SET LOG_ARCHIVE_DEST_1=”LOCATION=C:\oracle\product\10.2.0\

icelog_dba12\Location_1″ SCOPE=SPFILE;

STARTUP FORCE;

LOG_ARCHIVE_DEST_n Options

ALTER SYSTEM SET LOG_ARCHIVE_DEST_2=”LOCATION=C:\oracle\product\10.2.0\

icelog_dba12\Location_2 MANDATORY REOPEN” SCOPE=SPFILE;

ALTER SYSTEM SET LOG_ARCHIVE_DEST_3=”LOCATION=C:\oracle\product\10.2.0\

icelog_dba12\Location_2 OPTIONAL REOPEN=200″ SCOPE=SPFILE;

STARTUP FORCE;

Default REOPEN is 300 seconds.

Specifying a Minimum Number of Local Destinations

ALTER SYSTEM SET LOG_ARCHIVE_MIN_SUCCEED_DEST=2 SCOPE=SPFILE;

Controlling Archiving to a Destination

Archiving to a destination can be disabling

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER;

Archiving to a destination can be enabling

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=enable;

Dynamic Views

V$ARCHIVED_LOG: Displays archived log information from the control file;
V$ARCHIVE_DEST: For the Current instance, describes all archive log destinations, the current value and status

SELECT destination, binding,status

   FROM v$archive_dest;

V$LOG_HISTORY: Contains log file information from the control file.
V$ARCHIVE_PROCESSES: Provides information about the state of the various ARCH processes for the instance.

SELECT * FROM v$archive_processes;

Leave a Reply

Your email address will not be published.