Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement Archive Mode in Oracle 11g

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to implement the archiving mode of Oracle 11g. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

In Oracle 11g, when archive log mode is enabled, the default archive directory is specified as db_recovery_file_dest. This parameter can be specified in pfile/spfile:

Show parameter db_recovery_file_dest

Db_recovery_file_dest=/oracle/11g/flash_recovery_area

Change the archive mode

The archiving mode needs to be changed in the mount state.

SQL > shutdown immediate

SQL > startup mount

SQL > alterdatabase archivelog; / alterdatabase noarchivelog

Database altered.

SQL > alter database open

SQL > archive log list

Sys@ORCL > 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 the log_archive_dest_1 parameter to change the archive log directory (the directory specified by parameter db_recovery_file_dest in pfile/spfile will be invalid)

The last directory name of SQL > alter system setlog_archive_dest_1='location=/data/oracle/log1/archive_log'; 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 26

Next log sequence to archive 28

Current log sequence 28

SQL > alter system archive log current

System altered.

Sys@ORCL > select name fromv$archived_log

NAME

-

/ oracle/11g/flash_recovery_area/ORC

L/archivelog/2015_12_11/o1_mf_1_55_

C6nyryhs_.arc

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 it is displayed as ENABLE, it means that the archive was successful.

Or SQL > select log_mode fromv$database

If ARCHIVELOG, the archive has been successful.

*

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

You can modify the size of the db_recovery_file_dest_size parameter

SQL > alter system setdb_recovery_file_dest_size=21474836480

This is the end of the article on "how to implement the archiving mode of Oracle 11g". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report