设为首页 加入收藏

TOP

10gRAC使用service实现taf(二)
2015-07-24 10:26:44 来源: 作者: 【 】 浏览:2
Tags:10gRAC 使用 service 实现 taf
n Clusters, OLAP, Data Mining and Real Application Testing options [oracle@node1 ~]$ srvctl config service -d racdb -s service1 -a service1 PREF: racdb1 AVAIL: racdb2 TAF: basic [oracle@node1 ~]$ srvctl config service -d racdb service1 PREF: racdb1 AVAIL: racdb2 从上面的结果可以看出,通过dbca配置service 的taf,会在ocr中存储taf配置信息(仅仅是taf method),在数据库参数文件中会添加service条目,并且在数据字典中添加相应记录,但是数据字典中的taf信息是空的,需要另外添加,如
SQL> begin
  2  dbms_service.modify_service(
  3  service_name=>'service1',
  4  failover_method=>dbms_service.failover_method_basic,
  5  failover_type => dbms_service.failover_type_select,
  6  failover_retries => 180,
  7  failover_delay => 5 
  8  );
  9  end;
 10  /

PL/SQL procedure successfully completed.

SQL> col name for a20
SQL> col failover_method for a20
SQL> col failover_type for a20
SQL> select name,failover_method,failover_type from dba_services;

NAME		     FAILOVER_METHOD	  FAILOVER_TYPE
-------------------- -------------------- --------------------
SYS$BACKGROUND
SYS$USERS
seeddataXDB
seeddata.regress.rdb
ms.dev.us.oracle.com

racdbXDB
racdb
service1	     BASIC		  SELECT

7 rows selected.
另外,也可以使用srvctl来添加service
[root@node1 ~]# srvctl add service -h
Usage: srvctl add service -d  -s  -r "" [-a ""] [-P ]
    -d            Unique name for the database
    -s         Service name
    -r ""    List of preferred instances
    -a ""   List of available instances
    -P      TAF policy (NONE, BASIC, or PRECONNECT)
Usage: srvctl add service -d  -s  -u {-r "" | -a ""}
    -d            Unique name for the database
    -s         Service name
    -u                  Add a new instance to service configuration
    -r   Name of new preferred instance
    -a  Name of new available instance
    -h                  Print usage
[root@node1 ~]# srvctl add service -d racdb -s service2 -r racdb1 -a racdb2 -P BASIC
PRKH-1014 : Current user root is not the same as oracle owner oracle of oracle home /u01/app/oracle/product/11.2.0/db.
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ srvctl add service -d racdb -s service2 -r racdb1 -a racdb2 -P BASIC
[oracle@node1 ~]$ srvctl config service -d racdb -a
service1 PREF: racdb1 AVAIL: racdb2 TAF: basic
service2 PREF: racdb1 AVAIL: racdb2 TAF: BASIC
[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Aug 5 22:16:43 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> show parameter service

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
service_names			     string	 service1, racdb
SQL> select name from dba_services;

NAME
----------------------------------------------------------------
SYS$BACKGROUND
SYS$USERS
seeddataXDB
seeddata.regress.rdbms.dev.us.oracle.com
racdbXDB
racdb
service1

7 rows selected.
从这里,可以看出通过srvct添加的service不会在数据库参数和数据字典中添加相应的信息
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇利用BBED恢复数据文件头 下一篇数据库连接整理

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·bios设置按什么选择 (2025-12-26 17:20:08)
·知乎 - 知乎 (2025-12-26 17:20:04)
·http://和www.前缀网 (2025-12-26 17:20:01)
·Python爬虫教程(从 (2025-12-26 16:49:14)
·【全269集】B站最详 (2025-12-26 16:49:11)