November 2008
M T W T F S S
« Oct   Dec »
 12
3456789
10111213141516
17181920212223
24252627282930

Configuring the Database Archiving Mode

1.Enable archiving Mode
(1)Shutdown the database.

   SHUTDOWN IMMEDIATE;

(2)Start the database in Mount state.

   STARTUP MOUNT;

(3)Set the database in Archivelog mode by using the ALTER DATABASE command.

  ALTER DATABASE ARCHIVELOG;

(4)Open the database.

  ALTER DATABASE OPEN;

(5)Take a full backup of the database.

Note:
    Setting the database in Archivelog mode dose not enable the Archiver(ARCn)processes.

2.Automatic and Manual Archiving
You can set the initialization parameter LOG_ARCHIVE_START=TRUE to enable automatic archiving.

Note:
    (1).This parameter is not used anymore in 10g.Database will use automatic archiving when you enable archiving log mode.
    (2).If the archive processes fail for any reason,after transaction activity has filled up all the redo logs,the Oracle
        Server hangs.This is a legitimate hang,because setting the database in Archivelog mode tells the Oracle server not
        to overwrite the online redo log unless it is archived.

3.Specifying Multiple ARCn Processes
You can specify up to ten ARCn processes by using the LOG_ARCHIVE_MAX_PROCESSES parameter.
You can always spawn additional archive processes,up to the limit set by LOG_ARCHIVE_MAX_PROCESSES,
or kill archive processes at any time during the instance life.

1
  ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 3;

4.Specifying the Archive Log Destination
(1)Use LOG_ARCHIVE_DEST_n and LOG_ARCHIVE_FORMAT
The LOG_ARCHIVE_DEST_n paramter define up to ten archive log destination.This paramter is valid for Enterprise Edition.

(2)LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST Parameters

Note:
The tow methods for defining archive destinations are mutually exclusive.For Oracle Enterprise Edition users,the
LOG_ARCHIVE_DEST paramter has been deprecated in favor of the LOG_ARCHIVE_DEST_n parameter.If Oracle Enterprise
Edition is not installed,or is installed,but you have to specify any LOG_ARCHIVE_DEST_n paramter,this paramter is valid.

5.Specifying Multiple Archive Log Destinations
The LOG_ARCHIVE_DEST_n paramter are dynamic paramters that can be modified at the system or session level.The destination
can be either:
1)A local file system local(LOCATION).The location specified must be valid and cannot be NFS-mounted dir.
2)A oracle Net alias for a remote detination,specified by using SERVICE keyword.Only one archive destination per remote
database can be specified.

Notes:When configuring archive log destinaiton,make sure that the path names are set according to the operating system env.

6.LOG_ARCHIVE_DEST_n options.
(1)MANDATORY
implies that archiving to this destination must complete successfully before an online redo log file can be overwritten.
(2)OPTIONAL
implies that an online redo log file can be reused even if it has not been successfully archived to this destination.This is the default.
(3)REOPEN
The REOPEN attribute defines whether archiving to a destination must be re-attempted in case of failure.If a number is specified along with the keyword REOPEN,
as in REOPEN = 600,the archiver attempts to write to this destination after the specified number of seconds following a failure.The
default is 300 seconds.There is no limit on the number of attempts made to archive to a destination.Any errors in archiving are reported
in the alert file at primary site.
If REOPEN is not specified, errors at optional destinations are recorded and ignored.No futher redo logs will be sent to these destinations.Errors at mandatory
destinations will prevent reuse of the online redo log untile the archiving is successfully.The status of an archive destination is set to ERROR whenever
archiving is unsuccessfully.

7.LOG_ARCHIVE_MIN_SUCCEED_DEST
An online redo log group can be reused only if:
– Archiving has been done to all mandatory locations
– The number of local locations archived is greater than or equal to the value of the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter.
This parameter can be used to make archiving to one or more optional destinations mandatory,but not vice versa.

8.Controlling Archiving to a Destination
An archival destination may be disabled by using the dynamic initinalization parameter:
LOG_ARCHIVE_DEST_STATE_n = (DEFER,ENABLE)

ALTER SYSTEM SET log_archive_dest_state_3 = enable;

Note:

Archiving is not performed to a destination when the state is set to DEFER.If the state of this destination is changed to ENABLE,
any missed logs must be manually archived to this destination.

9.Specifying the File Name Format
LOG_ARCHIVE_FORMAT = extension
where: extention should include the values %s or %S for log sequence number.The default value is operating system-specific.
%t:using %t to include the thread number as part of the file name.
%s:using %s to include the log sequence number
%r:using %r to include the resetlogs ID(a timestamp value represented in ub4)

Use capital letters(%T,%S,%R) to pad the file name to the left with zeroes.

1 comment to Configuring the Database Archiving Mode

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>