Oracle arhivelog mode

Source: Internet
Author: User

Before oracle arhivelog mode Backup recovery, let's take a look at the role of archive: 1. when a media fault occurs, it can be restored (whether online or offline, to the specified time point, and to the end of the log file (until cancel. back up data when the database is online. when the tablespace (non-system) is offline due to a media fault, the rest of the database is available, because how to change the tablespace to restore the archive mode when the database is opened: 1. shut down the database shutdown immediate2. start to mount startup mount3.alter database archivelog; 4. alter database open Note: After changing to archivelog mode, remember to back up the entire database. The previous backup will not be valid because it is a backup of noarchivelog. Since archiving is enabled automatically after 10 Gb, the following parameters are not described: SQL> show parameter log_archive_max_processes -- you can specify up to 10 name type values ---------------------------------- -------------------------- log_archive_max_processes integer 2 SQL>! Ps-elf | grep ora_arc | grep-v grep 0 S oracle 8962 1 0 75 0-1273970-Apr23? 00:00:00 ora_arc0_skyread0 S oracle 8964 1 0 75 0-1273971-Apr23? 00:00:00 ora_arcw.skyread the parameter arc0 and arc1LOG_ARCHIVE_START corresponding to the two processes have been canceled after 10 Gb. If it is true in the previous version, log_archive_max_processes will be automatically started. If it is false, the instance does not automatically start the arcN process. LOG_ARCHIVE_DEST_n parameter: A maximum of 10 archive targets can be defined. If the backup targets are not specified, flashback_recovery_area will be used as the archive directory. LOG_ARCHIVE_DEST_n is a dynamic parameter, modifications can be made at the system level and session level. 1. add location2. remote target to the local LOCATION specified by the service. For example: log_archive_dest_1 string LOCATION =/database/oradata/archlog_archive_dest_2 string SERVICE = standby_db1. Note: local archive settings must be set, remote archiving Optional options: 1. MANDATORY indicates that the online redo log file can be overwritten only after archiving to the target is completed successfully. 2. OPTIONAL indicates that online redo log files can be reused even if they are not archived to this target. This is the default setting. REOPEN attribute 1. The REOPEN attribute defines whether to rearchive to the target when a fault occurs. If a value is specified for the keyword REOPEN, such as REOPEN = 600, the archive program will try to write data to the target after the specified time (in seconds) in case of a fault. Default Value: 300 seconds. There is no limit on the number of attempts to archive to the target. All errors in the archive will be reported in the alarm file of the primary site. 2. If REOPEN is not specified, errors on the optional targets will be recorded and ignored. Log_archive_min_succeed_dest specifies the minimum number of LOG_ARCHIVE_DEST_STATE_n files that are successfully archived to the target. By default, the archiving target is in the ENABLE State, indicating that the Oracle server can use this target, if you want to suspend the use of this target location, you can set it to DEFER. If you want to change it back to enable, You need to manually archive the missing logs to the location LOG_ARCHIVE_FORMAT % s log serial number, % t thread number. In addition, after 10 Gb, r % is added. After resetlogs ID is used to introduce the relevant parameters, you can see the following view: V $ ARCHIVED_LOGV $ region $ LOG_HISTORYV $ DATABASEV $ ARCHIVE_PROCESSESV $ RECOVERY_LOGx $ K, personally, it is easy to confuse. Record alter system archive log all; -- archive all Unarchived LOG files, but do not include the CURRENT one. Do not switch to alter system archive log current; -- ARCHIVE all non-archive log files, including the CURRENT, and switch the LOG to alter system archive log current noswitch; -- same as above, but the LOG is not switched

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.