Principles and basic configurations of Oracle DataGuard

Source: Internet
Author: User

Principles and basic configurations of Oracle DataGuard
Recently, the group is working on a disaster recovery solution for the high availability of Oracle. We chose the "maximum performance" mode of DG without affecting the performance of the master database. DG is the data synchronization function provided by the Oracle database. Its basic principle is to transfer log files from the master database to the slave database and then apply these log files to the slave database, in this way, the slave database is synchronized with the master database. Mongouard provides three log transmission modes: ARCH transmission, LGWR synchronous transmission, and LGWR asynchronous transmission. Based on the preceding three log transmission modes, three data Protection modes are provided: Maximum Performance Mode and Maximum Protection Mode) and Maximum Availability Mode. The Maximum protection Mode and Maximum available Mode require that the log transmission must be in LGWR synchronous transmission Mode, and any log transmission Mode is available in the Maximum performance Mode. I will share with you the configuration process of Dataguard. 1. archive mode is enabled for the master database. alter database force logging; 3. add standby logfilealter database add standby logfile '/data/oracle/oradata/orcl/standby01.log' size 50 M; alter database add standby logfile '/data/oracle/oradata/orcl/standby02.log' size 50 M; alter database add standby logfile '/data/oracle/oradata/orcl/standby03.log' size 50 M; 4. configure log_archive_configalter system set log_archive_config =' Dg_config = (orcl, dgorcl) '; alter system set log_archive_dest_1 = 'location =/data/arch valid_for = (all_logfiles, all_roles) db_unique_name = orcl '; alter system set log_archive_dest_2 = 'service = dgorcl async valid_for = (online_logfile, primary_role) db_unique_name = dgorcl '; 5. edit the master database tnsnames. add the standby instance to DGORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521) (CONNECT_DATA = (SER VER = DEDICATED) (SERVICE_NAME = dgorcl) 6. edit the listener of the master database. ora file. Register standby statically # listener. ora Network Configuration File:/data/oracle/product/11.2.0/db_1/network/admin/listener. ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521) ADR_BASE_LISTENER =/Data/oracle SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = dgorcl) (ORACLE_HOME =/data/oracle/product/11.2.0/db_1) (SID_NAME = dgorcl ))) 7. restart the listener lsnrctl stoplsnrctl start 8. create the password file cd $ ORACLE_HOME/dbscp orapworcl orapwdgorcl 9. create the standby initialization parameter file cd $ ORACLE_HOME/dbsecho DB_NAME = dgorcl> initdgorcl. ora 10. create the directory mkdir $ ORACLE_BASE/admin/dgorclmkdir $ ORACLE_BASE/admin/d for the standby database. Gorcl/adumpmkdir $ ORACLE_BASE/admin/dgorcl/dpdumpmkdir $ ORACLE_BASE/admin/dgorcl/pfile 11. create a standby data file storage location mkdir $ ORACLE_BASE/oradata/dgorcl 12. use standby pfile to start to nomount status 12. use rman to connect to the standby database in auxiliary mode export ORACLE_SID = orclrman target/auxiliary sys @ dgorcl 13. rman creates standby database run {allocate channel c1 type disk; allocate channel c2 type disk; allocate auxiliary channel stby type disk; duplicate ta Rget database for standby from active database spfileparameter_value_convert 'orcl ', 'dgorcl' set db_unique_name = 'dgorcl 'set db_file_name_convert ='/orcl /', '/dgorcl/'set control_files ='/data/oracle/oradata/dgorcl. ctl 'set log_archive_max_processes = '5' set fal_client = 'dgorcl 'set fal_server = 'orcl' set standby_file_management = 'auto' set log_archive_config = 'dg _ config = (orcl, dgorcl) 'set log_archive_dest _ 2 = 'service = orcl async valid_for = (online_logfile, primary_role) db_unique_name = orcl ';} 14. standby database Log Recovery enable alter database recover managed standby database disconnect from session; now the configuration of Phyical recovery uard has been completed, and then the DG to ADG has been adjusted for logical recovery uard, prepare for REPORT query to share the pressure on the master database and implement read/write splitting.

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

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.