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 

相关文章

Exadata最权威最完整的学习资料
Oracle数据库C函数解析
Exadata上收集Cell节点的日志
Exadata上如何重置Cell节点root密码当你忘记时
Oracle性能加速之Write-Back Flash Cache
PDB Migration/Failover in Dataguard
MySQL Cookbook for Oracle DBA
Full Transportable Export/Import(fxtts)
Oracle自治数据仓库云
expdp on physical standby
Oracle Database 12c之后DataGuard环境中的PDB操作
How to generate AWR for Standby Databases
Top
Cell186-9589-1286
QQ 375349564
E-mail ohsdba@qq.com