Wednesday, December 21, 2016

How to Create and Enable an Oracle Data Guard Broker Configuration

https://docs.oracle.com/cd/E19421-01/820-5016/fnrfv/index.html

How to Create and Enable an Oracle Data Guard Broker Configuration

To use Oracle Data Guard with Sun Cluster Geographic Edition, you need to create an Oracle Data Guard Broker configuration.
In the following example procedure, the Oracle Data Guard Broker configuration is called mysales.com. The salesdr database is a physical copy of the sales database.
  1. Create an Oracle Data Guard Broker configuration for the primary database.
    You use the dgmgrl command to create the Oracle Data Guard Broker configuration. You need to know the name of the Oracle Data Guard Broker configuration that you want to create, the name of the primary database, and the net service name through which to connect. You will need to know these properties again, when you specify the configuration to Sun Cluster Geographic Edition.

    oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> create configuration mysales.com as primary
    DGMGRL> database is sales connect identifier is sales-svc;
    
    If you find errors when you connect to the Oracle Data Guard Broker, check the ${ORACLE_HOME}/admin/sales/bdump/alert_prim_sid.log file. You can check that the configuration has been created by using the following command:

    oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> show configuration;
    Configuration
      Name:                mysales.com
      Enabled:             NO
      Protection Mode:     MaxPerformance
      Fast-Start Failover: DISABLED
      Databases:
        sales   - Primary database
    
    Current status for "mysales.com":
    DISABLED
  2. Add the standby database to the Oracle Data Guard Broker configuration.
    You need to know the name of the standby database, the net service name through which to connect, and the type of standby (physical or logical).

    oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> add database salesdr as connect identifier is 
     salesdr-svc maintained as physical;
    
  3. Configure the apply instance for the standby database.
    If the standby database is also a multi-instance Oracle RAC database, you can specify the instance on which you would prefer the transmitted archive redo logs to be applied. Before you enable the configuration, issue the following command:

    oracle$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> edit database salesdr set property PreferredApplyInstance='salesdr1';
    
  4. To verify that the Oracle Data Guard Broker configuration is working correctly, enable the configuration.

    oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> enable configuration;
    
    If you have successfully performed all steps, you can check the status of the configuration by using the following command:

    oracle$ dgmgrl sys/sysdba_password@sales-svc
    DGMGRL> show configuration;
    Configuration
      Name:                mysales.com
      Enabled:             YES
      Protection Mode:     MaxPerformance
      Fast-Start Failover: DISABLED
      Databases:
        sales   - Primary database
        salesdr - Physical standby database
    
    Current status for "mysales.com":
    SUCCESS
  5. Verify that the Oracle Data Guard Broker configuration can switch over.
    Before you add the Oracle Data Guard Broker configuration to Sun Cluster Geographic Edition, you need to verify that you can perform a switchover of the database from the primary to the standby and back again. If this switchover does not work, Sun Cluster Geographic Edition will not be able to perform this operation either.

    oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svcDGMGRL> switchover to salesdr
    Performing switchover NOW, please wait...
    Operation requires shutdown of instance "sales1" on database "sales"
    Shutting down instance "sales1"...
    ORA-01109: database not open
    
    Database dismounted.
    ORACLE instance shut down.
    Operation requires shutdown of instance "salesdr1" on database "salesdr"
    Shutting down instance "salesdr1"...
    ORA-01109: database not open
    
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "sales1" on database "sales"
    Starting instance "sales1"...
    ORACLE instance started.
    Database mounted.
    Operation requires startup of instance "salesdr1" on database "salesdr"
    Starting instance "salesdr1"...
    ORACLE instance started.
    Database mounted.
    Switchover succeeded, new primary is "salesdr"
    
    DGMGRL switchover to sales;
    Performing switchover NOW, please wait...
    Operation requires shutdown of instance "salesdr1" on database "salesdr"
    Shutting down instance "salesdr1"...
    ORA-01109: database not open
    
    Database dismounted.
    ORACLE instance shut down.
    Operation requires shutdown of instance "sales1" on database "sales"
    Shutting down instance "sales1"...
    ORA-01109: database not open
    
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "salesdr1" on database "salesdr"
    Starting instance "salesdr1"...
    ORACLE instance started.
    Database mounted.
    Operation requires startup of instance "sales1" on database "sales"
    Starting instance "sales1"...
    ORACLE instance started.
    Database mounted.
    Switchover succeeded, new primary is "sales"

1 comment:

  1. MOHEGAN CASINO AND ROUTE PRAGMATIC DRAW IN
    MOHEGAN CASINO AND 경주 출장마사지 ROUTE PRAGMATIC DRAW IN VICING 수원 출장안마 AND PRAGMATIC DRAW IN VICING 토토 사이트 AND PRAGMATIC DRAW IN VICING AND PRAGMATIC DRAW IN 세종특별자치 출장안마 VICING AND 구리 출장마사지 PRAGMATIC

    ReplyDelete