Configure the archiving mode of Oracle9i)

Source: Internet
Author: User

1. Differences between the archive log mode and the non-archive log Mode
In non-archive mode, only cold backup can be performed, and only full backup can be performed during recovery. data during the last full backup to system error cannot be recovered.
Archive mode supports hot backup, Incremental backup, and partial recovery.
You can use archive log list to check whether the archive mode is not the archive mode when the archive mode is in the status.

2. Configure the database archive Mode

Change non-archive mode to archive mode:
1) SQL> shutdown normal/immediate;
2) SQL> Start Mount;
3) SQL> alter database archivelog;
4) SQL> alter database open;

5) SQL> make a full backup because the backup logs generated in non-archive log mode are no longer available in archive mode. This step is not very important!
Change archive mode to non-archive mode:
1) SQL> shutdown normal/immediate;
2) SQL> Start Mount;
3) SQL> alter database noarchivelog;
4) SQL> alter database open;

3. Enable automatic archiving: log_archive_start = true
In archive mode, the log file group cannot be overwritten. When the log file is full, if no manual archiving is performed, the system suspends until the archiving is complete.
At this time, you can only read but not write.
Close and restart the archiving log process during running
SQL> archive log stop
SQL> archive log start

4. manual archiving: log_archive_start = false
Archive Current Log File
SQL> alter system archive log current;
Archive log files numbered 052
SQL> alter system archive log sequence 052;
Archive all log files
SQL> alter system archive log all;
Change the log archiving target
SQL> alter system archive log current to '& path ';

5. Archive mode and non-archive Mode Conversion

The inverse process in step 1.

6. Configure multiple archiving processes
Q: When do I need to use multiple archiving processes?
A: If the archiving process consumes a lot of time, you can start multiple archiving processes. This is a dynamic parameter and can be modified dynamically using alter system.
SQL> alter system set log_archive_max_processes = 10;
Up to 10 archiving processes can be specified in Oracle9i
Dynamic Performance view related to the archiving process
V $ bgprocess, V $ archive_processes

 

7. Configure archiving targets, multiple archiving targets, remote archiving targets, and archiving log formats
Archive target log_archive_dest_n
Local archiving target:
SQL> log_archive_dest_1 = "location = D:/Oracle/archivedlog ";
Target of remote Archiving:
SQL> log_archive_dest_2 = "service = standby_db1 ";
Force archiving target. If an error occurs, retry in 600 seconds:
SQL> alter system set log_archive_dest_4 = "location = E:/Oracle/archivedlog mandatory reopen= 600 ";
Optional archiving target. If an error occurs, discard the archive:
SQL> alter system set log_archive_dest_3 = "location = E:/Oracle/archivedlog optional ";

Archiving target status: Close archiving target and open archiving target
Close archive Target 1
SQL> alter system set log_archive_dest_state_1 = defer
Open archive Target 2
SQL> alter system set log_archive_dest_state_2 = Enable

Archived log format
Log_archive_format

8. Obtain archived log information
V $ archvied_log
V $ archvie_dest
V $ log_history
V $ Database
V $ archive_processes

Archive log list;

 

10 Gb uses db_recovery_file_dest as the storage location for archiving logs.
SQL> show parameter db_recovery

Name type value
Db_recovery_file_dest string/home/Oracle/ora10g/flash_reco
Very_area/
Db_recovery_file_dest_size big integer 20g

You can modify the size of the db_recovery_file_dest_size parameter.
Alter system set db_recovery_file_dest_size = 21474836480

Related English document Website:
Http://www.adp-gmbh.ch/ora/ SQL /alter_system.html
Http://www.itk.ilstu.edu/docs/Oracle/server.101/b10759/statements_2013.htm

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.