Instructions for setting Oracle archive Mode

Source: Internet
Author: User

Commands for setting Oracle archive mode: 1. log on to the database as sysdba 2. archive log list; view database and archive information; 3. Shut down the database normally, such as using shutdown immediate; 4. Start the database by loading. startup mount; 5. Set the database to archive mode. alter database archivelog; 6. Open the database. alter database open; 7. Use archive log list to verify database and archive information. 8. Back up all data files and control files, because backup in non-archive mode is no longer available, this core backup is the start point of backup in archive mode. Manual log archiving: alter system archvice log current; before ORACLE 9I, you need to set the process to start the automatic archiving mode: alter system archive log start; this mode will expire after the database is restarted. Therefore, you can configure it to the dynamic parameter table: alter system set log_archive_start = true scope = spfile; show parameter log_archive_start if the log generation frequency and speed are fast, it is very likely that the redo log group has not been round-robin once, but the ARC process has not archived the data of the redo log file to the archive file. In this case, you can consider adding the number of ARC background processes: alter system set log_archive_max_processes = 3; (by default, this number is 2) You can modify the log_archive_dest_n parameter in the parameter file. To control the physical hard disks and directories written in the archive log file, where n = 1 to 10. Oracle8i supports defining up to five archived log files. oracle9i and 10 Gb can define 10 archived log files, that is, 10 identical archived log files can be written to different locations at the same time. Specify the storage location of archived logs: (3 groups of archived logs are specified in the example) alter system set log_archive_dest_1 = "location =/home/oracle/disk01/offlinelog/mandatory" scope = spfile; alter system set log_archive_dest_2 = "location =/home/oracle/disk02/offlinelog" scope = spfile; alter system set log_archive_dest_3 = "location =/home/oracle/disk03/offlinelog" scope = spfile; mandatory: indicates that chongzuo log files in this directory are mandatory, namely: the corresponding chongzuo log file cannot be reused before the archive log file in this directory is successfully written. Optional: indicates that the archive log files under this directory are optional. That is, the corresponding chongzuo log files can be reused even if they are not successfully written. By default, it is optional. log_archive_min_succeed_dest. This parameter specifies the number of groups of archived logs required to ensure the validity of the file. (Number of successfully archived log groups) show parameter log_archive_min_succeed_destalter system set log_archive_min_succeed_dest = 2. If the disk of the archived log group is damaged as required, the database will be suspended as required, therefore, if you need to ignore this problem and keep the database running, you can close writing to the group of log files: alter system set log_archive_dest_state_1 = defer; after setting this value, this path is not archived. If this path is set to ENABLE later, all the lost archive files must be restored manually.

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.