oracle11g creating a DG using Dgbroker

Source: Internet
Author: User

1. Environment:

A. Host environment: centos6.5

B. Software Environment: Oracle

C. Host information:

dg1: (Database Sid:atest)


2. Prerequisite work (master and slave must be set):

A. Turn off the firewall:/etc/init.d/iptables stop

B. Close Selinux:setenforce 0

View status: Getenforce (off State: Permissive)

3.3. Main Library Settings:

A. Set the main library Db_unique_name:

set db_unique_name='patest' scope=spfile;

B. Setting the main library to force logging:

ALTER DATABASE force logging;

Check the status (Yes is mandatory):

Select  from V$database;

C. Setting Standy_file_management:

set standby_file_management ='AUTO';

D. Create Standbylog:

ALTER DATABASE add standby logfile Group One  '/u01/app/oracle/oradata/atest/standbylog/ Standby11.log' size 50m;
ALTER DATABASE add standby logfile Group  '/u01/app/oracle/oradata/atest/standbylog/standby12.log ' size 50m;
ALTER DATABASE add standby logfile Group  "/u01/app/oracle/oradata/atest/standbylog/standby13.log ' size 50m;
ALTER DATABASE add standby logfile Group  '/u01/app/oracle/oradata/atest/standbylog/standby14.log ' size 50m;

E. Open archive (Simple not detailed):

set log_archive_dest_1='location=/u01/app/oracle/oradata/atest/archivelog' ; ALTER DATABASE archivelog;

F. Turn on Dgbroker:

Set Dg_broker_start=true;

G. Transfer pfile and password files:

from 192.168. 100.52:/u01/app/oracle/product/11.2. 0/db1/dbs/

H. Setting up monitoring: ATEST,PATEST,PATEST_DGMGRL

Sid_list_listener =(Sid_list=(Sid_desc=(Global_dbname=atest) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) (Sid_desc=(Global_dbname=patest) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) (Sid_desc=(Global_dbname=PATEST_DGMGRL) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) ) LISTENER=(Description_list=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) ) (DESCRIPTION=(ADDRESS= (PROTOCOL = IPC) (KEY =EXTPROC1521)) )) Adr_base_listener=/u01/app/oracle

I. Setting Tnsnames.ora

Atest =(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) ) Patest=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) ) SATest=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) )

4. Prepare the Library settings:


Sid_list_listener =(Sid_list=(Sid_desc=(Global_dbname=atest) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) (Sid_desc=(Global_dbname=satest) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) (Sid_desc=(Global_dbname=SATEST_DGMGRL) (Oracle_home=/u01/app/oracle/product/11.2.0/db1) (Sid_name=atest)) ) LISTENER=(Description_list=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) ) (DESCRIPTION=(ADDRESS= (PROTOCOL = IPC) (KEY =EXTPROC1521)) )) Adr_base_listener=/u01/app/oracle

B. Setting Tnsnames.ora

Atest =(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) ) SATest=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) ) Patest=(DESCRIPTION=(ADDRESS= (PROTOCOL = TCP) (HOST = (PORT =1521)) (Connect_data=(SERVER=dedicated) (Service_Name=atest)) )

5. Back up the main library:

A.rman Target/

B.backup database;

6. Clone the master Library on the standby:

A. Modifying the Db_unique_name=satest on the standby pfile

B. Start the database to Nomount:

Startup Nomount

  C. Landing Rman:

Rman target sys/123456@patest auxiliary sys/123456@satest

D. Start cloning:

 for  from active database;

7. Set Dgbroker:

A. Login DGMGRL:

DGMGRL sys/123456@patest

B. Set the main library:

 as  is  is patest;

C. Adding a Standby library:

 as  is  as physical;

D. Enable the configuration file:

Enable configuration

E. View Dgbroker configuration:

' SATest '  'patest'statusreport ' SATest ';

F. View the DG Status of the database:

SELECT Group#,dbid,archived,status fromV$standby_log;SelectDest_id,valid_type,valid_role,valid_now fromv$archive_dest;Selectprocess,status,group#,thread#,sequence# fromv$managed_standby ORDER by process,group#,thread#,sequence#;Selectname,value,time_computed fromv$dataguard_stats;SelectTimestamp,facility,dest_id,message_num,error_code,message fromv$dataguard_status order by timestamp;SelectRecid,archived,applied fromV$archived_log;

8.DG Step-by-step check:

1 . Check the password file 2 . Check the network 3 . Check the parameter file 4 . Check the firewall or SELinux 5. If none of the above problems, can only indicate the DG Environment is a problem, need to re-build DG (re-transfer data files to the main library, resynchronization)


oracle11g creating a DG using Dgbroker

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: 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.