12
返回列表 发新帖
楼主: duxzh

用户session会不会因为RAC节点down掉而自动转移?

[复制链接]
论坛徽章:
0
11#
 楼主| 发表于 2005-2-2 11:32 | 只看该作者

Re: 这样配置!

最初由 jiangjs888 发布
[B]假设有两个RAC实例,主机Server1,Server2,实例名ora9i

ORA9I =
  (DESCRIPTION =
    (FAILOVER=on)
    (LOAD_BALANCE=on)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Server1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = Server2)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ora9i)
      (FAILOVER_MODE=(TYPE=SESSION))
    )
  )

注:TYPE=SESSION表示会话级FAILOVER,=SELECT表示select语句failover [/B]



强!
那天做个试验.

使用道具 举报

回复
招聘 : 数据库管理员
论坛徽章:
66
ITPUB元老
日期:2005-07-16 18:49:11授权会员
日期:2005-10-30 17:05:33ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44现任管理团队成员
日期:2011-05-07 01:45:08版主3段
日期:2012-05-15 15:24:11
12#
发表于 2005-2-2 11:40 | 只看该作者
Services Entries  When you configure high availability services using the DBCA Services page, then the DBCA creates net service entries similar to the following. The three services in the following examples, db_svc1, db_svc2, and db_svc3, have TAF policies of NONE, BASIC and PRECONNECT respectively.
db_svc1.us.acme.com=
  (description =
    (address=(protocol=tcp)(host=node1-vip)(port=1521))
    (address=(protocol=tcp)(host=node2-vip)(port=1521))
    (load_balance=yes)
    (connect_data=
        (server = dedicated)
        (service_name = db_svc1.us.acme.com)
  )
  )

db_svc2.us.acme.com=
  (description=
    (address=(protocol=tcp)(host=node1-vip)(port=1521))
    (address=(protocol=tcp)(host=node2-vip)(port=1521))
    (load_balance=yes)
    (connect_data =
        (server = dedicated)
        (service_name=db_svc2.us.acme.com)
        (failover_mode =
        (type=select)
        (method=basic)
           (retries=180)
           (delay=5)
     )
     )
     )

db_svc3.us.acme.com=
    (description=
      (address=(protocol=tcp)(host=node1-vip)(port=1521))
      (address=(protocol=tcp)(host=node2-vip)(port=1521))
      (load_balance=yes)
      (connect_data=
        (server=dedicated)
        (service_name=db_svc3.us.acme.com)
        (failover_mode=
        (backup=db_svc3_preconnect.us.acme.com)
        (type=select)
        (method=preconnect)
        (retries=180)
        (delay=5)
   )
   )
   )


Services Entries (continued)  When a service has a TAF policy of PRECONNECT, then a service_name_preconnect net service entry is also created as in the following example:
db_svc3_preconnect.us.acme.com =
  (description =
    (address = (protocol = tcp)(host = node1-vip)(port = 1521))
    (address = (protocol = tcp)(host = node2-vip)(port = 1521))
    (load_balance = yes)
    (connect_data =
      (server = dedicated)
      (service_name = db_svc3_preconnect.us.amce.com)
      (failover_mode =
        (backup = db_svc3.us.acme.com)
        (type = select)
        (method = basic)
        (retries = 180)
        (delay = 5)
      )
    )
  )

External procedures  An entry for connections to external procedures. This enables an Oracle Database 10g database to connect to external procedures.
extproc_connection_data.us.acme.com=
(description=
  (address_list=
    (address=(protocol=ipc)(key=extproc0))
  (connect_data=
    (sid=plsextproc)))

使用道具 举报

回复
论坛徽章:
0
13#
 楼主| 发表于 2005-2-2 11:46 | 只看该作者
更强!谢谢大家了!!

使用道具 举报

回复
论坛徽章:
8
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:102011新春纪念徽章
日期:2011-02-18 11:42:49ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:32兰博基尼
日期:2014-01-31 14:56:26优秀写手
日期:2015-01-08 06:00:14优秀写手
日期:2015-02-12 06:00:15
14#
发表于 2005-2-2 11:48 | 只看该作者
最初由 duxzh 发布
[B]谢谢piner!
那么rac的最大优势在于性能的提高吧?
[/B]


不对。rac的优势在于高可靠性。

使用道具 举报

回复
招聘 : 售前/售后支持
论坛徽章:
5
ITPUB元老
日期:2005-04-25 13:27:42授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21祖国60周年纪念徽章
日期:2009-10-09 08:28:00
15#
发表于 2005-2-2 11:51 | 只看该作者
我的理解是当应用程序的一个session链接到A 节点时,如果该节点此时突然宕机,这个session会被中断,但是应用程序会自动去链接另外一个节点,也就是用户需要重做这个session的操作……
不知这样理解是否正确?

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
16#
发表于 2005-2-2 12:05 | 只看该作者
RAC环境下Oracle Net Configuration for Failover说明
来源于下面的ebook
McGraw.Hill.Oracle.Database.10g.High.Availability.with.RAC.Flashback.and.Data.Guard.Apr.2004.eBook-DDU

Connect-Time Failover
We begin with connect-time failover, which is defined as a failed initial connection attempt that must be retried against a different address. Consider the following entry in a client's tnsnames.ora:
代码:



GRID =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rmscvip1.us.oracle.com)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST = rmscvip2.us.oracle.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = grid)

    )

  )


Given the above entry for the alias called GRID, when a client attempts to connect, the first address in the list will be the one initially tried-in this case, rmscvip1. Should the initial connection attempt to rmscvip1 be unsuccessful, the next address in the list will be tried. This is known as a connect-time failover. You can add as many entries to the list as you have available nodes to accept connections. Note also that the entries in the list do not have to be RAC nodes. The above may apply in a Streams or advanced replication environment, or one of the entries in the list may be a standby database-either physical or logical, as long as there is an available service defined and running on that node. The other criteria, of course, is that the addresses in the list will all allow the client to get to the data that is needed by the application. In the case of a RAC environment, we know that the data is always the same, as it is the same database. In the case of Streams, advanced replication, and physical or logical standby, whether or not the data is accessible depends on how these options are configured.

Transparent Application Failover
Transparent Application Failover, or TAF, refers to the failover of a connection that has already been made when a node or instance goes down. This is controlled by the parameter FAILOVER=ON, in the tnsnames.ora. By default, this parameter will be set to on, if not defined. Setting it to OFF will disable failover. When it is enabled, there are two types of failover, defined as part of the FAILOVER_MODE parameter: session (the default), or select. With TYPE=SESSION, should an instance fail after a session is connected, that session will be failed over to another available address in the list, without the user needing to reconnect. However, any SQL statements that were in progress will need to be reissued. With TYPE=SELECT, if the session fails over in the middle of a query, the query will be restarted after the failover. Consider the following modification to the CONNECT_DATA section of the tnsnames.ora file:
代码:



(CONNECT_DATA =

      (SERVICE_NAME = grid)

      (FAILOVER_MODE =

        (TYPE = SELECT)

        (METHOD = BASIC)

      )

  )


In this case, should a failure occur, the failed over session will keep track of the number of rows retrieved so far, so that when the query is restarted, the session will discard those rows that have already been returned.

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
17#
发表于 2005-2-2 12:07 | 只看该作者
另外的参数说明:

1.METHOD
Determines how fast failover occurs from the primary node to
the backup node:
代码:



basic: Set to establish connections at failover time. This

option requires almost no work on the backup server until

failover time.

preconnect: Set to pre-established connections. This

provides faster failover but requires that the backup

instance be able to support all connections from every

supported instance.



2.TYPE
Specify the type of failover. Three types of Oracle Net failover
functionality are available by default to Oracle Call Interface
(OCI) applications:
代码:



session: Set to failover the session. If a user's connection is

lost, a new session is automatically created for the user on

the backup. This type of failover does not attempt to recover

selects.

select: Set to enable users with open cursors to continue

fetching on them after failure. However, this mode involves

overhead on the client side in normal select operations.

none: This is the default. No failover functionality is used.

This can also be explicitly specified to prevent failover from

使用道具 举报

回复
论坛徽章:
12
会员2006贡献徽章
日期:2006-04-17 13:46:34生肖徽章2007版:兔
日期:2009-03-10 21:27:28ERP板块每日发贴之星
日期:2007-10-24 01:04:58ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44设计板块每日发贴之星
日期:2007-10-18 01:06:03ITPUB元老
日期:2007-10-11 14:47:20开发板块每日发贴之星
日期:2007-10-10 01:05:30行业板块每日发贴之星
日期:2007-10-01 01:05:12行业板块每日发贴之星
日期:2007-09-30 01:05:35会员2007贡献徽章
日期:2007-09-26 18:42:10
18#
发表于 2005-2-2 12:51 | 只看该作者
So Stronger

使用道具 举报

回复
论坛徽章:
0
19#
 楼主| 发表于 2005-2-2 15:25 | 只看该作者
继续感谢大家!
希望还有高人共享自己的知识!

使用道具 举报

回复

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

本版积分规则 发表回复

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