Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » Oracle

Oracle Exadata ADG & GDS

Oracle Maximum Availability Architecture (MAA) is Oracle's best practices blueprint based on proven Oracle high availability technologies, expert recommendations and customer experiences. The goal of MAA is to achieve optimal high availability for Oracle customers at the lowest cost and complexity.


下图为Exadata + ADG +ZLDRA的最佳实践,主备库通过ADG实时数据同步,备份通过ZDLRA来实现。

对于这种架构,很多人可能会有疑问,如果主库切换时,客户端是不是得重新配置,是不是要中断很长时间。实际上我们可以有两种方法来实现在客户端无需任何更改的情况下自动连接,对业务几乎没任何影响。第一种就是通过GDS来实现,这个复杂点。第二种通过role-based service来实现,这个很简单,这个也是本文要讲的。

A.通过GDS

就是配置好ADG后,使用Global Database Service,把相关的主备库的服务加进去,实现服务路由的自动切换。

B.通过role-based service

在主备库上,配置连接生产、灾备的service,然后启动这些基于角色的服务。最后在连接数据库时把主备库的SCAN地址都放进去。

On primary:
[oracle@vmOraLinux6 ~]$ srvctl add service -d ora11gR2 -s prim_db -l PRIMARY -e SESSION -m BASIC -w 10 -z 10
On standby:
[oracle@vmOraLinux6 ~]$ srvctl add service -d sby11gR2 -s prim_db -l PRIMARY -e SESSION -m BASIC -w 10 -z 10
On primary:
[oracle@vmOraLinux6 admin]$ srvctl start service -d ora11gR2 -s prim_db

On primary:
[oracle@vmOraLinux6 ~]$ srvctl add service -d ora11gR2 -s stby_db -l PHYSICAL_STANDBY -e SESSION -m BASIC -w 10 -z 10
On standby:
[oracle@vmOraLinux6 ~]$ srvctl add service -d sby11gR2 -s stby_db -l PHYSICAL_STANDBY -e SESSION -m BASIC -w 10 -z 10
On standby:
[oracle@vmOraLinux6 ~]$ srvctl start service -d sby11gR2 -s stby_db /***********************************************************************
If you get below error when trying to start the service on standby:
PRCD-1084 : Failed to start service stby_db
PRCR-1079 : Failed to start resource ora.sby11gR2.stby_db.svc
CRS-5017: The resource action "ora.sby11gR2.stby_db.svc start" encountered the following error:
ORA-44317: database open read-only
ORA-06512: at "SYS.DBMS_SERVICE", line 478
ORA-06512: at "SYS.DBMS_SERVICE", line 229
ORA-06512: at line 1

Then as workaroud, follow below steps:
 
a. Start the service on primary instead:
[oracle@vmOraLinux6 ~]$ srvctl start service -d ora11gR2 -s stby_db 

b. Perform a few log switches on primary and allow standby to catch up. 

c. Now, the service should start on standby:
[oracle@vmOraLinux6 ~]$ srvctl start service -d sby11gR2 -s stby_db

d. Stop the service on primary:
[oracle@vmOraLinux6 ~]$ srvctl stop service -d ora11gR2 -s stby_db
*************************************************************************/
PRIM_DB =
  (DESCRIPTION =
     (ADDRESS_LIST =
       (FAILOVER = ON)
       (LOAD_BALANCE = OFF)
       (ADDRESS = (PROTOCOL = TCP)(HOST = primary.oracle.com)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = standby.oracle.com)(PORT = 1521))
     )
     (CONNECT_DATA =
       (SERVICE_NAME = prim_db)
     )
  )

STBY_DB =
  (DESCRIPTION =
     (ADDRESS_LIST =
       (FAILOVER = ON)
       (LOAD_BALANCE = OFF)
       (ADDRESS = (PROTOCOL = TCP)(HOST = primary.oracle.com)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = standby.oracle.com)(PORT = 1521))
     )
    (CONNECT_DATA =
       (SERVICE_NAME = stby_db)
    )
  )



Reference

http://www.oracle.com/technetwork/database/features/availability/maa-096107.html

How To Configure Client Failover For Data Guard Connections Using Database Services (Doc ID 1429223.1)


关键词:dg oracle exadata 

相关文章

Getting started with Oracle JDBC
How to generate AWR on PDB and ADG(12.2 afterwards)
Oracle ZDLRA (Zero Data Lost Recovery Appliance) FAQ
Oracle ZDLRA (Zero Data Lost Recovery Appliance) Features
Oracle Database 18c On Exadata
Oracle Database 18c New Feature Guide
Migrate Oracle Database on AIX to Exadata
ORA-12514 During DataPump Export/Import In RAC
ExaWatcher Charts
qperf & iperf
How to config IB network listener
Recreate quorum disk on X6-2

联系我们

韩朝阳



    Phone:186-9589-1286

    E-mail:ohsdba@qq.com

    微  信: ohsdba


电话(186-9589-1286)

QQ(375349564)

微信(ohsdba)


常用链接

Oracle
eDelivery
My Oracle Support

Exadata 12.1 Document

Exadata 12.2 Document

Oracle 11gR2 Document

Oracle 12cR1 Document

Oracle 12cR2 Document

GoldenGate 12c

Oracle Fusion Middleware

Mysql Document

PostgreSQL

Python

github

sourceforge



Top
Cell186-9589-1286
QQ 375349564
E-mail ohsdba@qq.com