Oracle Archive Log file)

Source: Internet
Author: User

Show parameter recover -- view the path for storing archived log files

Alter database archive -- change the database to archive Mode

Archive log list/SQL> select name, log_mode from v $ database; view the current status of the database

Modify the path of an archived Log File

[Oracle @ localhost 2010_06_07] $ mkdir/home/oracle/yow./ archive

[Oracle @ localhost 2010_06_07] $ exit

Exit

SQL> alter system set log_archive_dest_1 = 'location =/home/oracle/yow./ archive 'scope = both;

System altered.

SQL> archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination/home/oracle/yow./ archive

Oldest online log sequence 40

Next log sequence to archive 43

Current log sequence 43

 

Recover principle:

In media recover, we are most concerned with the start and end of recover. So how does oracle determine where to start?

When the database is normally shut down, the scn of the control file and the scn of the data file should be consistent. If they are inconsistent, the system prompts that the database needs to be restored.

Note the following two views:

The content in V $ datafile_header comes from the header of the data file.

The content in V $ datafile comes from the control file.

The values of the checkpoint_change # Fields of the two views must be consistent. If not, the system prompts that recover is required during open.

Then, v $ datafile_header can determine the starting SCN value of application Redo, while v $ datafile can determine the ending SCN value of application redo)

If you are interested, please try it out!

In addition, the reason why oracle can locate the block starting from the log during recover is that the redo sequence and block of the log are recorded at the checkpoint of the datafile header.

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.