See Oracle database for archiving mode

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
  [1]
  1.select name,log_mode from v$database;
  NAME LOG_MODE
  ------------------ ------------------------
  QUERY NOARCHIVELOG
  2 using ARCHIVE LOG LIST command
  Database log mode No Archive Mode
  Automatic archival Disabled
  Archive destination /data/oracle/product/10.2.0/db_1//dbs/arch
  Oldest online log sequence 739
  Current log sequence 741

What is the Oracle Archive Mode

  Oracle database of the online redo log, the log is a record of the changes made to the database, such as insert, delete, update data, each of these operations will be recorded in the online redo log. General database must have at least 2 of the online redo log group. When an online redo log group was filled with, will be a log switch occurs, then the online redo log group 2 become used log, when the online redo log group 2 to write full time, and a log switch occurs, to write online redo log group 1, then.
  If the database is in a non archive mode, online log will be discarded. But when switching in archive mode, when a log switch occurs, the switched log file. For example, in the use of the online redo log 1, when 1 to write full time, a log switch occurs, began to write online redo log 2, then the online redo log 1 content will be copied to another specified directory. This directory is called the archive directory, copy files called archived redo log.
  For disaster recovery can database archiving mode.
  The difference between the 1 archive log mode and non archive log mode
  Do not cold backup archive mode only, and the recovery can only do a full backup. During a recent full backup to the system error data could not be restored.
  Archive mode can do backup, and can do incremental backup, can be part of the recovery.
  ARCHIVE LOG LIST can see the current mode is archive mode or non archive mode.

The configuration database archiving mode

  1 the change in non archive mode to archive mode:
  1)SQL> conn / As SYSDBA (connected to the database as DBA)
  2)SQL> shutdown immediate; (close the database immediately)
  3)SQL> Startup mount (start the instance and load the database, but not open)
  4)SQL> alter database archivelog; (alter database archivelog)
  5)SQL> alter database open; (open database)
  6)SQL> alter system archive log start; (enable automatic archiving)
  7)SQL> Exit (exit)
  Do a full backup, because produce non archive log mode for backup log archive mode is not available. This step is not very important!
  2 change the archive mode to the non Archive Mode:
  1)SQL>SHUTDOWN NORMAL/IMMEDIATE;
  2)SQL>STARTUP MOUNT;
  3)SQL>ALTER DATABASE NOARCHIVELOG;
  4)SQL>ALTER DATABASE OPEN;
  3 enable automatic Archive: LOG_ARCHIVE_START=TRUE
  Archive mode, log files were not allowed to be covered (Rewriting), when the log file is filled, if there is no manual filing, then the system will hang, know the filing done.
  This can only be read but not written.
  Shut down and restart the archived log during the operation process
  SQL>ARCHIVE LOG STOP
  SQL>ARCHIVE LOG START
  4 manual Archive: LOG_ARCHIVE_START=FALSE
  Archive the current log file
  SQL>ALTER SYSTEM ARCHIVE LOG CURRENT;
  Archived log file sequence number is 052
  SQL>ALTER SYSTEM ARCHIVE LOG SEQUENCE 052;
  Archive all log files
  SQL>ALTER SYSTEM ARCHIVE LOG ALL;
  Change the archive log target
  SQL>ALTER SYSTEM ARCHIVE LOG CURRENT TO '&PATH';
  Conversion of 5 archive mode and non Archive Mode
  The inverse process of fourth step.
  6 to configure multiple archive process
  When the Q: needs to use multiple archive process?
  A: will consume a lot of time if the archiving process, then you can start multiple archive process, this is a dynamic parameters can be modified by ALTER, SYSTEM dynamic.
  SQL>ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=10;
  Oracle9i can specify up to 10 archive process
  Dynamic performance views associated with the archiving process
  v$bgprocess,v$archive_processes
  7 configuration file, multi file object, remote archive, archive log format
  File LOG_ARCHIVE_DEST_n
  The local archive target:
  SQL>LOG_ARCHIVE_DEST_1 = "LOCATION=D:ORACLEARCHIVEDLOG";
  Remote archiving object:
  SQL>LOG_ARCHIVE_DEST_2 = "SERVICE=STANDBY_DB1";
  Mandatory filing target, if you make a mistake, after 600 seconds again:
  SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_4 = "LOCATION=E:ORACLEARCHIVEDLOG MANDATORY REOPEN=600";
  An optional file object, if wrong, give up Archive:
  SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_3 = "LOCATION=E:ORACLEARCHIVEDLOG OPTIONAL";
  Target state: close the file archiving and open archiving object
  Close the file object 1
  SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1 = DEFER
  Open the file object 2
  SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2 = ENABLE
  Archive log format
  LOG_ARCHIVE_FORMAT
  8 access to archived log information
  V$ARCHIVED_LOG
  V$ARCHIVE_DEST
  V$LOG_HISTORY
  V$DATABASE
  V$ARCHIVE_PROCESSES
  ARCHIVE LOG LIST;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Sabrina at December 09, 2013 - 8:23 PM