0% found this document useful (0 votes)
43 views2 pages

Archive Log Mode

This document provides instructions for configuring archiving and switching log files in Oracle 8i, 9i, and 10g databases. It involves connecting as SYSDBA, checking the database log mode, switching log files, shutting down the database, updating the init.ora file with archive log destination settings, starting up the database in mount mode, enabling archiving, starting archive log process, and opening the database. Views like V$DATABASE, V$ARCHIVED_LOG, V$ARCHIVE_DEST are referenced to verify the archive log configuration and status.

Uploaded by

getbenu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Archive Log Mode

This document provides instructions for configuring archiving and switching log files in Oracle 8i, 9i, and 10g databases. It involves connecting as SYSDBA, checking the database log mode, switching log files, shutting down the database, updating the init.ora file with archive log destination settings, starting up the database in mount mode, enabling archiving, starting archive log process, and opening the database. Views like V$DATABASE, V$ARCHIVED_LOG, V$ARCHIVE_DEST are referenced to verify the archive log configuration and status.

Uploaded by

getbenu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PROCESS IN 8i

SQL> CONNECT sys AS SYSDBA


SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;
SQL> ALTER SYSTEM CHECKPOINT;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> SHUTDOWN IMMEDIATE;
CHANGE THE INIT.ORA
log_archive_start = TRUE
log_archive_dest = /rman1/arch
log_archive_format = %%$ORACLE_SID%%T%TS%S.ARC

SQL> STARTUP MOUNT;


SQL> ALTER DATABASE ARCHIVELOG;
SQL> ARCHIVE LOG START;
SQL> ARCHIVELOG LIST;
SQL> SELECT STATUS, DESTINATION FROM V$ARCHIVE_DEST;
SQL> ALTER DATABASE OPEN;

PROCESS IN 9i/10g

SQL> CONNECT sys AS SYSDBA


SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;
SQL> ALTER SYSTEM CHECKPOINT;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> SHUTDOWN IMMEDIATE;
CHANGE THE INIT.ORA
log_archive_start = TRUE
log_archive_dest_1 = 'LOCATION=/arch_dir_name'
log_archive_dest_state_1 = ENABLE
log_archive_format = %%$ORACLE_SID%%T%TS%S.ARC (FOR UNIX)
= %d_%t_%s.arc (FOR WINDOWS)

SQL> STARTUP MOUNT;


SQL> ALTER DATABASE ARCHIVELOG;
SQL> ARCHIVE LOG START;
SQL> ARCHIVELOG LIST;
SQL> SELECT STATUS, DESTINATION FROM V$ARCHIVE_DEST;
SQL> ALTER DATABASE OPEN;

V$DATABASE
Identifies whether the database is in ARCHIVELOG or NOARCHIVELOG mode and whether MANUAL (archiving
mode) has been specified.
V$ARCHIVED_LOG
Displays historical archived log information from the control file. If you use a recovery catalog, the
RC_ARCHIVED_LOG view contains similar information.
V$ARCHIVE_DEST
Describes the current instance, all archive destinations, and the current value, mode, and status of these
destinations.
V$ARCHIVE_PROCESSES
Displays information about the state of the various archive processes for an instance.
V$BACKUP_REDOLOG
Contains information about any backups of archived logs. If you use a recovery catalog, the RC_BACKUP_REDOLOG
contains similar information.
V$LOG
Displays all redo log groups for the database and indicates which need to be archived.
V$LOG_HISTORY
Contains log history information such as which logs have been archived and the SCN range for each archived log.

You might also like