Data Guard 9i Configuring Transparent Application Failover in a Data Guard Environment [ID 205637.1]
|
|
|
Modified 19-OCT-2010Type BULLETINStatus PUBLISHED
|
|
PURPOSE
-------
When considering 9i Data Guard and the possible failure scenarios, we see that
the proper configuration for redirecting new and existing connections from the
failed instance to the new primary is crucial. The discussion below covers two
possible failover configurations: connect time failover and application
failover.
SCOPE & APPLICATION
-------------------
This document is intended to aid in the configuration of Connect Time Failover
and Transparent Application Failover in a Data Guard environment.
Connect Time Failover
----------------------
Connect time failover will reroute incoming connections to the instance that has
just become primary. This type of failover should work in cases where the old
primary node is down, old primary network is down, old primary listener is down,
or old primary instance is now the standby.
When the old primary network is down, failover functionality is built into the
basic layer of Oracle Net. We simply tcp timeout and fail to the next host in
the list. Changing the tcp timeout parameters will determine the speed at which
failover occurs. However, the basic configuration of connect time failover is
not sufficient for the remaining failure scenarios.
Consider the following service name:
DGD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hasunclu1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = hasunclu2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DGD)
)
)
Using the above alias, the failover (graceful or forced will work correctly if
the old primary instance/listener is down. However it does not work correctly
for the switchover scenario. With switchover, the old primary is now the
standby and the old standby is now the primary. When we issue the connection
to the old primary node -- now running as a mounted standby -- we receive the
following error:
ORA-01033: ORACLE initialization or shutdown in progress
This is expected behavior. Connect time failover is not programmed to failover
on this error.
We can solve this by setting following parameters in the init.ora files:
Primary init.ora: instance_name=DGD_P
Standby init.ora: instance_name=DGD_S
After a switchover, as the standby and primary databases are brought up, PMON
will register the service_names AND the instance_name. We also must change the
TNS service name to look for these values:
DGD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hasunclu1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = hasunclu2)(PORT = 1521))
)
(CONNECT_DATA =
(INSTANCE_NAME=DGD_P)
(SERVICE_NAME = DGD)
)
)
Now when we connect to the old primary/new standby, we get the following error:
'ORA-12521 TNS:Listener could not resolve INSTANCE_NAME given in connect descriptor'
At this point the connection fails over to the second host in the address list.
This final connection attempt succeeds as the proper instance_name (DGD_P) is
present.
Note that the DBA must maintain two init.ora's to maintain the seperate
instance_name values or alter parameter with the alter system command once the
instance has opened.
Application Failover:
----------------------
For application failover, all existing connections from the current primary
must failover to the new primary. One of the biggest obstacles to overcome is
the lag time from when the standby databse becomes the primary database.
Client connections should continue to retry the failover until the standby has
been opened as the new production. This can be configured by having an alias
similar to the following:
DGD_TAF=
(DESCRIPTION=
(address_list=
(load_balance=off)
(failover=on)
(ADDRESS=(PROTOCOL=TCP)(Host=hasunclu1)(Port=1521))
(ADDRESS=(PROTOCOL=TCP)(Host=hasunclu2)(Port=1521))
)
(CONNECT_DATA=
(SERVICE_NAME=DGD)
(instance_name=DGD_P)
(FAILOVER_MODE=
(TYPE=session)
(METHOD=BASIC)
(RETRIES=180)
(DELAY =5)))
)
With this alias, TAF will try to failover to the second node in the address_list.
If it cannot connect, it will wait five seconds and retry again. It will retry
a total of 180 times. This delay will provide the DBA with enough time to
perform a switchover or activate the standby as the new production.
This timing can be adjusted to suit your environment and should be tested
accordingly.
RELATED DOCUMENTS
-------------
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(满); DBA2 群:62697977(满)
DBA3 群:62697850 DBA 超级群:63306533;
聊天 群:40132017
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
分享到:
相关推荐
10.2. Configuring a data source 10.2.1. Using JNDI data sources 10.2.2. Using a pooled data source 10.2.3. Using JDBC driver-based data sources 10.2.4. Using an embedded data source 10.2.5. Using ...
8.3.3.5 Packet Tracer - Configuring Basic OSPFv3 in a Single Area Cisco Packet Tracer 思科模拟器 正确答案文件 可直接上交正确答案文件 本答案版权归mewhaku所有,严禁再次转载!!! Copyright @mewhaku ...
1. a book Developing Flex Applications 2. a web page viewer for doc88 ebt 3. a DDA downloader for doc88.com CONTENTS PART I: Presenting Flex CHAPTER 1: Introducing Flex. . . . . . . . . . . . . . ...
2 Creating a Basic Core Data Application............................................................................................. 3 Understanding the Core Data Components ...........................
Chapter 1: Designing a Modern Real-World Web Application Chapter 2: The New Era of .NET Core Chapter 3: Designing a Theme by Using Material Design Chapter 4: Overview of Azure Storage Chapter 5: Test-...
Microsoft.Press.MCTS.Self.Paced.Training.Kit.Exam.70.680.Configuring.Windows.7.Oct.2009.rar
Oracle Application Express Administration is for architects, administrators, and developers who want to better understand how APEX works in a corporate environment. Readers will use this book to ...
原版MSCE 考试用书,也可做为参考用书,比较详细MS.Exam.Ref.70-410.Installing.and.Configuring.Windows.Server.2012.R2.0735684
1 What is Liferay? 1 1.1 Building a site with Liferay Web Content . . . . . . . . . . . . . . . . . 1 1.2 Using Liferay Portal as a collaborative platform . . . . . . . . . . . . . . 6 1.3 Using ...
1 Overview ..............................................................................................................................................41 Java EE ApplicationModel ......................
Chapter 1: Introduction ....................................................................................... 7 Charitable Donation ....................................................................
3. New Features and Enhancements in Spring Framework 4.0 ............................................ 17 3.1. Improved Getting Started Experience .........................................................
MS.Press.Self-Paced.Training.Kit.Exam.70-652.Configuring.Windows.Server.Virtualization
In the book’s final chapters, you’ll find cutting edge examples of cloud technology in action, from machine learning to business intelligence, for a taste of some exciting ways your business could ...
Apache: The Anatomy of a Web Server.........................................................1 The Apache Source ...........................................................................................
3. New Features and Enhancements in Spring Framework 4.0 ............................................ 17 3.1. Improved Getting Started Experience .........................................................
24.6.1. Loading YAML 24.6.2. Exposing YAML as Properties in the Spring Environment 24.6.3. Multi-profile YAML Documents 24.6.4. YAML Shortcomings 24.7. Type-safe Configuration Properties 24.7.1. Third...
Chapter 1: Configuring a Spring Development Environment .................................1 Chapter 2: Spring Framework Fundamentals .......................................................25 ...
With Microsoft HDInsight, business professionals and data analysts can rapidly leverage the power of Hadoop on a flexible, scalable cloud-based platform, using Microsoft's accessible business ...