GDS 命令的使用 srvctl service TAF application continuity

文档中prim and stdy在同一台机器上,不同机器需要添加address list

TAF ENABLED GLOBAL SERVICE in GDS ENVIRONMNET 12C. (Doc ID 2283193.1)​编辑To Bottom


In this Document

Goal
Solution

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

GOAL

NOTE: In the images and/or the document content below, the user information and environment data used represents
fictitious data from the Oracle sample schema(s),Public Documentation delivered with an Oracle database product or
other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental
and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example
to describe the procedure:

NETWORK_NAME: SERVICE: prim.stpool.oradbcloud
REGIONS: stregion
DATABASE: STDB1, DB1
SERVICE: prim.stpool.oradbcloud

Goal of this article is to explain how we can create the TAF enabled Global Data Services in 12c environment and it will allow application continuity.

SOLUTION

 ++ Global Service PRIM is created as below:

GDSCTL>add service -service prim -gdspool stpool -preferred_all -role PRIMARY -tafpolicy BASIC -failovertype SELECT -failovermethod BASIC -failoverretry 20 -failoverdelay 15

 GDSCTL>config service -service prim
Catalog connection is established
Name: prim
Network name: prim.stpool.oradbcloud
Pool: stpool
Started: Yes
Preferred all: Yes
Locality: ANYWHERE
Region Failover: No
Role: PRIMARY
Primary Failover: No
Lag: ANY
Runtime Balance: SERVICE_TIME
Connection Balance: LONG
Notification: Yes
TAF Policy: BASIC
Policy: AUTOMATIC
DTP: No
Failover Method: BASIC
Failover Type: SELECT
Failover Retries: 20
Failover Delay: 15
Edition:
PDB:
Commit Outcome:
Retention Timeout:
Replay Initiation Timeout:
Session State Consistency: DYNAMIC
SQL Translation Profile:

Databases
------------------------
Database Preferred Status
-------- --------- ------
db1 Yes Enabled
stdb1 Yes Enabled

  Client Side TNS enrty:

PRIM =
(DESCRIPTION=
(FAILOVER=on)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(host= localhost.localdomain)(port=1522)))
(CONNECT_DATA=
(SERVICE_NAME=prim.stpool.oradbcloud)
(REGION=stregion)
(FAILOVER_MODE=
(TYPE=SELECT)
(METHOD=basic)
(RETRIES=20)
(DELAY=15))
)
))

 Test the Select during switchover:

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@localhost ~]$ sqlplus sys/<PASSWORD>@prim as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 4 16:21:46 2017

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>select * from dba_objects;

At the same time issue switchover from the broker.

DGMGRL> switchover to "DB1"
Performing switchover NOW, please wait...
New primary database "DB1" is opening...
Operation requires startup of instance "stdb1" on database "STDB1"
Starting instance "stdb1"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "DB1"
DGMGRL> switchover to "STDB1"
Performing switchover NOW, please wait...
Operation requires a connection to instance "stdb1" on database "STDB1"
Connecting to instance "stdb1"...
Connected as SYSDBA.
New primary database "STDB1" is opening...
Operation requires startup of instance "db1" on database "DB1"
Starting instance "db1"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "STDB1"

Result of select:

SHARING E O
------------- - -
NONE Y

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
---------- -------------- ----------------------- --------- ---------
TIMESTAMP STATUS T G S NAMESPACE
------------------- ------- - - - ----------
EDITION_NAME
--------------------------------------------------------------------------------
SHARING E O
------------- - -


>>>>>>>>>select paused during switchover and then continued instead of throwing ORA-03113 error.

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
---------- -------------- ----------------------- --------- ---------
TIMESTAMP STATUS T G S NAMESPACE
------------------- ------- - - - ----------
EDITION_NAME
--------------------------------------------------------------------------------
SHARING E O
------------- - -
NONE N

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
---------- -------------- ----------------------- --------- ---------
TIMESTAMP STATUS T G S NAMESPACE
------------------- ------- - - - ----------
EDITION_NAME
--------------------------------------------------------------------------------
SHARING E O
------------- - -

90801 rows selected.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值