Oracle 11g Archive Mode basic operations

Source: Internet
Author: User

in the Oracle 11g , open Archive Log mode, the default archive directory is db_recovery_file_dest specified. This parameter can be specified in Pfile/spfile:

Show Parameter Db_recovery_file_dest

db_recovery_file_dest= /oracle/11g/flash_recovery_area

Change Archive mode

need to be Mount State, change the archive mode.

sql> shutdown immediate;

sql> Startup Mount

sql> alterdatabase Archivelog; / ALTER DATABASE Noarchivelog

Database altered.

sql> ALTER DATABASE open;

sql> archive log list;

[Email protected]> archive log list;

Database Log Mode Archive mode

Automatic Archival Enabled

Archive Destination Use_db_recovery_file_dest

Oldest online log sequence 53

Next log sequence to archive 55

Current log Sequence 55

Change log_archive_dest_1 parameter to change the archive log directory ( Pfile/spfile Medium Parameter db_recovery_file_dest The specified directory will not be valid )

sql> alter system setlog_archive_dest_1= ' Location=/data/oracle/log1/archive_log '; The last directory name needs to be archive_log!

System altered.

sql> archive log list;

Database Log Mode Archive Mode

Automatic Archival Enabled

Archive Destination /data/oracle/log1/archive_log

oldest online log sequence -

Next log sequence to archive -

Current log sequence -

sql> alter system archive log current;

System altered.

[Email protected]> select name Fromv$archived_log;

NAME

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

/oracle/11g/flash_recovery_area/orc

L/archivelog/2015_12_11/o1_mf_1_55_

C6nyryhs_.arc

To modify the log file naming format:

Sql> alter system setlog_archive_max_processes = 5;

Sql> alter system set log_archive_format= "Archive_%t_%s_%r.log" scope=spfile;

*************************************************************************************************************** **

sql>archive log list;
If shown as enable means that the archive was successful
or Sql>select Log_mode fromv$database;
If Archivelog, the archive has been successfully archived

********************************************************************************

Sql> Show Parameter Db_recovery

NAME TYPE VALUE
------------------------------------        -----------                      ------------------------------
Db_recovery_file_dest String/data/oracle/flash_recovery_area
Db_recovery_file_dest_size BigInteger 4231m

The size of the Db_recovery_file_dest_size parameter can be modified

Sql>alter system setdb_recovery_file_dest_size=21474836480


Oracle 11g Archive Mode basic operations

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.