Oracle Physical Structure (iv) archive log files

Source: Internet
Author: User

The archive log file is a truncated backup of the redo log file, and two modes of Oracle running: Archive mode and no archive mode.

1. Enable/disable archiving mode

Sql>archive log list; Query Archive mode

Sql>shutdown Immediate

Sql>startup Mount

Sql>alter database Archivelog;

Sql>alter database open;

Sql>archive log list;

Database Log Mode Archive mode

Automatic Archival Enabled

Archive Destination Use_db_recovery_file_dest

Oldest online log sequence 38

Next log sequence to archive only 40

Current log Sequence 40

This parameter Log_archive_start is true before ora10, restart is active, automatic archiving is started, ORA10 is deactivated, the database is automatically archived when archive mode is enabled

Sql>show parameter Log_archive_start; No change required

2. Configure the location of the archive file

Sql>archive log list;

Sql>show parameter db_recovery_file_dest; View the location of the archive file

NAME TYPE VALUE

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

Db_recovery_file_dest String/u01/app/oracle/flash_recovery _area

Db_recovery_file_dest_size Big Integer 2G

Sql>alter system Set

log_archive_dest= '/u01/app/oracle/oradata/ora10/' Scope=both;

Modify Archive File Error

Sql>alter system set log_archive_dest= ' Scope=both; This argument should be set to null first

Sql>alter system Set

log_archive_dest= '/u01/app/oracle/oradata/ora10/' Scope=both;

Modify successfully again

Sql>show parameter log_archive_dest; Check the location of the archive file again

Sql>host ls–l/u01/app/oracle/oradata/ora10/

Sql>alter system switch logfile; Manually switch logs to view the archive

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.