Oracle archive mode and Related Parameters

Source: Internet
Author: User

Oracle starts archive mode and related parameters, which involve the following parameters: log_archive_min_succeed_dest dynamic parameter log_archive_dest_state _ parameter

Log_archive_format log_archive_dest_1

1. Enable archive Mode

SQL> show user

USER is "SYS"

SQL> archive loglist

Database Log mode non-archive Mode

Disable automatic archiving

Archiving end point USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 32

Current Log sequence 36

SQL> shutdown immediate;


 

SQL> startup mount; Enabling archive mode requires mounting.

The ORACLE routine has been started.

Total System Global Area 431038464 bytes

Fixed Size 1375088 bytes

Variable Size 327156880 bytes

Database Buffers 96468992 bytes

Redo Buffers 6037504 bytes

The database has been loaded.

SQL> alter database archivelog;

The database has been changed.

SQL> alter database open;

The database has been changed.

SQL> archive loglist;

Database Log mode archiving Mode

Enable automatic archiving

Archiving end point USE_DB_RECOVERY_FILE_DEST --- after archiving is enabled, the default archiving location is the flash back area.

Oldest online log sequence 32

Next archive log sequence 36

Current Log sequence 36

SQL> show parameter log_archive_max_process

NAME TYPE VALUE

-----------------------------------------------------------------------------

Log_archive_max_processes integer 4

SQL> show parameter log_archive_dest _

NAME TYPE VALUE

-----------------------------------------------------------------

Log_archive_dest_1 string

Log_archive_dest_10 string

Log_archive_dest_state_13 string enable

 

2. Specify the directory for storing archived logs

 

SQL> alter system set log_archive_dest_1 = "location = d: \ disk1 \ offlinelog \ mandatory"; if it is RAC, you can specify it as the flash back area and go to the instance alter system set log_archive_dest_1 = 'location = USE_DB_RECOVERY_FILE_DEST 'sid = '*'

The system has been changed.

SQL> show parameter log_archive_dest_1

NAME TYPE VALUE

-----------------------------------------------------------------------------

Log_archive_dest_1 string location = d: \ disk1 \ offlinelog \ mandatory

 

SQL> alter system set log_archive_dest_2 = "location = d: \ disk2 \ offlinelog \";

The system has been changed.

SQL> show parameter log_archive_dest_2

NAME TYPE VALUE

----------------------------------------------------------------------------

Log_archive_dest_2 string location = d: \ disk2 \ offlinelog \

SQL> alter system set log_archive_dest_3 = "location = d: \ disk3 \ offlinelog \ optional ";

The system has been changed.

SQL> alter system setlog_archive_dest_4 = "location = d: \ disk4 \ offlinelog \ optional ";

The system has been changed.

SQL> alter system setlog_archive_dest_5 = "location = d: \ disk5 \ offlinelog \ mandatory ";

The system has been changed.

Several parameters for setting the archive directory:

 

Optional the archive log files in this directory are optional. Mandatory is mandatory and must be archived. ORACLE does not specify OPTIONAL by default.

SQL> showparameter log_archive_dest _

NAME TYPE VALUE

-----------------------------------------------------------------------------

Log_archive_dest_1 string location = d: \ disk1 \ offlinelog \ mandatory

Log_archive_dest_2 string location = d: \ disk2 \ offlinelog \

Log_archive_dest_3 string location = d: \ disk3 \ offlinelog \ optional

Log_archive_dest_4 string location = d: \ disk4 \ offlinelog \ optional

Log_archive_dest_5 string location = d: \ disk5 \ offlinelog \ mandatory

Log_archive_dest_6 string

 

SQL> col destination for a30

SQL> select destination, binding, target, status from v $ archive_dest;

DESTINATION BINDING TARGET STATUS

-------------------------------------------------------

D: \ disk1 \ offlinelog \ MANDATORY PRIMARY VALID

D: \ disk2 \ offlinelog \ optional primary valid: OPTIONAL is not specified when you set the parameter. ORACLE defaults to this parameter value.

D: \ disk3 \ offlinelog \ OPTIONAL PRIMARY VALID

D: \ disk4 \ offlinelog \ OPTIONAL PRIMARY VALID

D: \ disk5 \ offlinelog \ MANDATORY PRIMARY VALID

OPTIONAL PRIMARY INACTIVE

OPTIONAL PRIMARY INACTIVE

Query generated archived log names-default command format

SQL> select name, blocks from v $ archived_log;

NAME BLOCKS

Bytes ------------------------------------------------------------------------------------------

/U01/app/oracle/flash_recovery_area/BYS001/archivelog/2013_06_08/o1_mf_1_12_8v63 762

######################################## ######################################## ########

For more details, please continue to read the highlights on the next page:

Oracle 11g rac modify archive Mode

Oracle manual full recovery case (archive Mode)

Oracle manual recovery case (non-archive Mode)

Instructions for setting Oracle archive Mode

Backup script in Oracle 10g archive Mode

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.