123
返回列表 发新帖
楼主: sealren

RAC的 failover 怎么配置阿?

[复制链接]
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44
21#
发表于 2006-2-14 21:14 | 只看该作者
最初由 儿子属羊 发布
[B]TAF测试是RAC测试不可缺少的部分。我这里有一篇ORACLE的文章,希望对你有所帮助!



Quickstart Guide: Setup Transparent Application Failover (TAF)
==============================================================
                  balancing the load on various listeners. [/B]


谢谢,不错!

使用道具 举报

回复
论坛徽章:
12
数据库板块每日发贴之星
日期:2005-06-27 01:01:25ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412010新春纪念徽章
日期:2010-03-01 11:08:29生肖徽章2007版:鸡
日期:2008-01-02 17:35:53ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44会员2007贡献徽章
日期:2007-09-26 18:42:10数据库板块每日发贴之星
日期:2007-06-25 01:02:07授权会员
日期:2006-05-04 13:31:19ITPUB元老
日期:2006-05-04 13:38:51会员2006贡献徽章
日期:2006-04-17 13:46:34
22#
发表于 2006-2-14 23:45 | 只看该作者
想问一下,
我们使用的VB开发的程序,使用的ADO连接,驱动程序是ODBC,
在SQLPLUS中能够切换,但在我们的程序中不会自动切换,是否是VB6。0使用ODBC驱动程序做的程序不支持,谢谢。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
23#
发表于 2006-2-15 00:51 | 只看该作者
最初由 oldboy 发布
[B]想问一下,
我们使用的VB开发的程序,使用的ADO连接,驱动程序是ODBC,
在SQLPLUS中能够切换,但在我们的程序中不会自动切换,是否是VB6。0使用ODBC驱动程序做的程序不支持,谢谢。 [/B]


Get into a habit of telling us your Oracle version. You're a senior member here.

Search for "taf odbc" on Metalink. The first document I find (116558.1) tells us TAF and ODBC do work together except for minor problems in very old versions.

Yong Huang

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2006-01-19 15:01:45
24#
发表于 2006-3-12 21:59 | 只看该作者
在一篇文章中看到这一句:

切记使用 Java 瘦客户机将不能参与 TAF ,因为它从不读取 tnsnames.ora 文件。

想想jdbc里连接的格式,都是直接写IP与SID,那么是不是对于当前web开发中广泛使用jdbc来连接的方式,真的用不上TAF?

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
25#
发表于 2006-3-13 07:45 | 只看该作者
最初由 robbinwoo 发布
[B]在一篇文章中看到这一句:

切记使用 Java 瘦客户机将不能参与 TAF ,因为它从不读取 tnsnames.ora 文件。

想想jdbc里连接的格式,都是直接写IP与SID,那么是不是对于当前web开发中广泛使用jdbc来连接的方式,真的用不上TAF? [/B]


If it's thin client JDBC driver, what you said is true.

I think 10g has some other technologies that work around this restriction. Or I could remember wrong.

Yong Huang

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2006-01-19 15:01:45
26#
发表于 2006-3-13 16:51 | 只看该作者
最初由 Yong Huang 发布
[B]

If it's thin client JDBC driver, what you said is true.

I think 10g has some other technologies that work around this restriction. Or I could remember wrong.

Yong Huang [/B]



也就是说,在进行JDBC连接时,使用oci方式的连接串url,就可以利用TAF了?这样是不是要求在web服务器端有一个oracle client的安装?因为一直都使用thin driver,不清楚jdbc oci的使用.

使用道具 举报

回复
论坛徽章:
1
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44
27#
发表于 2006-3-15 21:19 | 只看该作者
请问一下,TAF的实现是都需要应用的设置吗?比如oracle ebs的应用能否实现failover?

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
28#
发表于 2006-3-16 02:55 | 只看该作者
Thick (OCI) requires Oracle client installation. Once that's done, the only thing you do is change "thin" to "oci" (or is it "oci8"?) in the JDBC connection string. You may start to use a connection string in tnsnames.ora if you want. But it still works if you just leave all three components in the JDBC connection string (host, port, protocol), not using tnsnames.ora.

I'm not familiar with EBS. Check to see where it specifies the connection. If it's using JDBC and it's thin driver, make the above change and you can fail over.

Yong Huang

使用道具 举报

回复
论坛徽章:
4
会员2007贡献徽章
日期:2007-09-26 18:42:10祖国60周年纪念徽章
日期:2009-10-09 08:28:002013年新春福章
日期:2013-02-25 14:51:24ITPUB社区OCM联盟徽章
日期:2013-12-16 09:51:00
29#
发表于 2006-3-21 17:09 | 只看该作者
学习

使用道具 举报

回复
论坛徽章:
129
蓝锆石
日期:2008-08-23 16:25:58萤石
日期:2008-02-26 15:38:51祖母绿
日期:2008-08-18 16:12:54海蓝宝石
日期:2008-02-23 15:06:23紫水晶
日期:2008-08-22 14:58:26红宝石
日期:2008-07-26 15:02:37九尾狐狸
日期:2008-09-16 09:24:50红孩儿
日期:2008-10-26 12:20:09紫蜘蛛
日期:2008-11-19 08:33:41玉兔
日期:2009-02-02 09:09:53
30#
发表于 2008-7-30 09:50 | 只看该作者
原帖由 儿子属羊 于 2006-2-12 10:53 发表
TAF测试是RAC测试不可缺少的部分。我这里有一篇ORACLE的文章,希望对你有所帮助!



Quickstart Guide: Setup Transparent Application Failover (TAF)
==============================================================
--------------------------------------------------------------

This quickstart guide is a walk through of a working TAF implementation
which can be used as a building block for more complex TAF configurations.   

If a current TAF configuration is failing, use this quickstart guide
as baseline to get to a TAF starting point.  Once this configuration works,
continue to build on it with more complex features.



IMPORTANT:
==========
     1. Oracle Net Manager does not provide support for
        TAF configuration parameters.  Manual configuration
        of TAF is required.

     2. Do not set the GLOBAL_DBNAME parameter in the  
        SID_LIST_listener section of the listener.ora file.
        A statically configured global database name disables
        TAF.

     3. LOAD_BALANCE and FAILOVER parameters are housed within the
        DESCRIPTION section of the tnsnames.ora file
TAF - TAF with Connect Time Failover and Load Balancing
======================================================
In this configuration Oracle Net connects randomly to one of two servers
listed in the TNSNAMES.ORA file.  There are two parts to this configuration:
load balancing and TAF.  If the connected instance fails, subsequent  
operations against the database will cause TAF to reconnect to the other  
ADDRESS.  


1. Prerequisites:
        1. This Quickstart guide is using a "pfile" for clarity.  An "spfile"   can certainly be used.
        2. The two databases involved may have similar or different
instance  names.  In either case, the two databases should have a common  
SERVICE_NAMES value.  For this Quickstart guide,  2 different  
instances are being used (PROD1 and PROD2), but each instance is   using
the same SERVICE_NAMES value (TAF.us.oracle.com)
        3. A listener and database configured for instance registration on a  
            primary node.
        4. A listener and database configured for instance registration on a  
            secondary node.

        On both nodes, a LSNRCTL STATUS output should show that the instance
         status is READY:

        "Instance "PROD1", status READY, has 1 handler(s) for this service..."

        5. Two terminal sessions are needed for this test.   
                TERMINAL #1: needed to work with the primary instance
                TERMINAL #2: needed to shutdown the primary instance.


2. In TERMINAL #1, configure the tnsnames.ora file for TAF.  The TNSNAMES.ORA  
   file will be configured to connect to two machines - the primary node and  
   the secondary node.

   Here is the configuration file used to create this quickstart guide:


   TNSNAMES.ORA

   taf_test=
    (description=
     (failover=on)
     (load_balance=on)
     (address=
          (protocol=tcp)
          (host=hp3)
          (port=20020))
     (address=
          (protocol=tcp)
          (host=hp4)
          (port=20020))
     (connect_data=
        (service_name=TAF.us.oracle.com)
          (failover_mode=
              (type=session)
              (method=basic))))

   NOTE: Do not proceed until it is known that both ADDRESSes are  
         tested and proven to be valid.

3. In TERMINAL #1, connect to Oracle using the TAF service name configured
   in step 2.

4. Execute this query to show which instance and machine you are connected to:

   SQL> select host_name, instance_name from v$instance;

   HOST_NAME       INSTANCE_NAME
   --------------  ---------------
   hp4             PROD1

5. Using the second terminal session (TERMINAL #2) logon to the machine  
   specified in step 4 and shutdown the database:

   SQL> shutdown abort

6. In TERMINAL #1, reissue the query from step 4:

   SQL> select host_name, instance_name from v$instance;

   The result should be the hostname and instance of the alternate instance  
   and is a good test to know if TAF operated correctly or not.

   HOST_NAME       INSTANCE_NAME
   --------------  ---------------
   hp3             PROD2


7. TAF Verification

   In TERMINAL #1, issue this TAF query to verify TAF is correctly configured:

   select machine, failover_type, failover_method, failed_over, count(*)  
   from v$session  
   group by machine, failover_type, failover_method, failed_over;

   MACHINE   FAILOVER_TYPE  FAILOVER_M FAILED_OVER   COUNT(*)
   --------- -------------  ---------- -----------   --------
   hp3       NONE           NONE       NO                  8
   hp4       SESSION        BASIC      YES                 1

   This shows that the HP4 node is the node that failed over due to a  
   connection failure.  HP3 reports no failover because it is the machine  
   currently handling the connection - it is not the machine that failed.


Configuration Files Used for this Quickstart Guide:
===================================================

On the machine "HP3"
--------------------

initPROD2.ora contains these additional parameters:

        *.service_names='TAF.us.oracle.com'
        *.local_listener="(address=(protocol=tcp)(host=hp3)(port=20020))"

LISTENER.ORA

        listener=(address=(protocol=tcp)(host=hp3)(port=20020))


On the machine "HP4"
--------------------

initPROD1.ora contains these additional parameters:

        *.service_names='TAF.us.oracle.com'
        *.local_listener="(address=(protocol=tcp)(host=hp4)(port=20020))"

LISTENER.ORA

        listener=(address=(protocol=tcp)(host=hp4)(port=20020))

TNSNAMES.ORA

        taf_test=
         (description=
          (failover=on)
          (load_balance=on)
          (address=
               (protocol=tcp)
               (host=hp3)
               (port=20020))
          (address=
               (protocol=tcp)
               (host=hp4)
               (port=20020))
          (connect_data=
             (service_name=TAF.us.oracle.com)
               (failover_mode=
                   (type=session)
                   (method=basic))))



Additional Information
======================

Definitions used in this Quickstart guide
===========================================================================
FAILOVER_MODE     Description
Subparameters
---------------------------------------------------------------------------
TYPE              SESSION: If a connection is lost, a new session
                  is automatically created for the user on the  
                  backup.  SELECT statements are not recovered.

                  SELECT: SELECT statements are preserved and
                  fetches will continue on the backup after the
                  failure.

                  NONE: The default setting.  An explicit setting  
                  of NONE disables failover.

METHOD            BASIC: connections are established at
                  failover time.

                  PRECONNECT: Parallel connections are made to the
                  primary and backup instance providing faster failover.
                  However, the backup instance must be able to handle  
                  the same connection load as the primary.

==========================================================================
Other             Description
Parameters   
--------------------------------------------------------------------------
FAILOVER          At connect time, instructs Oracle Net to failover to a  
                  different listener if the first listener fails when set
                  to 'ON'.

LOAD_BALANCE      When set to 'ON', instructs Oracle Net to progress through
                  the list of protocol addresses in a random sequence,
                  balancing the load on various listeners.


好文章!

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表