service由于oracle数据库中的一个关键概念,利用得当,可以轻松地管理数据库,提高数据库的工作效率。

经service。oracle可以实现server side  taf,简单化client维修,下面我们来看看10g rac 如何测试service实现 serve side  taf

使用dbca来配置taf

通过dbca能够很方便的配置server  side taf









至此。service配置完毕,以下我们验证一下

[root@node1 ~]# su - oracle
[oracle@node1 ~]$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 05-AUG-2014 21:46:10 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 05-AUG-2014 21:26:40
Uptime 0 days 0 hr. 19 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/db/network/log/listener_node1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.131)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.31)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "racdb" has 3 instance(s).
Instance "racdb", status UNKNOWN, has 1 handler(s) for this service...
Instance "racdb1", status READY, has 2 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdb_XPT" has 2 instance(s).
Instance "racdb1", status READY, has 2 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "service1" has 1 instance(s).
Instance "racdb1", status READY, has 2 handler(s) for this service...
The command completed successfully
[oracle@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Tue Aug 5 21:46:23 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
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 7 rows selected. SQL> exit
Disconnected from 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 [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 <name> -s <service_name> -r "<preferred_list>" [-a "<available_list>"] [-P <TAF_policy>]
-d <name> Unique name for the database
-s <service> Service name
-r "<pref_list>" List of preferred instances
-a "<avail_list>" List of available instances
-P <TAF_policy> TAF policy (NONE, BASIC, or PRECONNECT)
Usage: srvctl add service -d <name> -s <service_name> -u {-r "<new_pref_inst>" | -a "<new_avail_inst>"}
-d <name> Unique name for the database
-s <service> Service name
-u Add a new instance to service configuration
-r <new_pref_inst> Name of new preferred instance
-a <new_avail_inst> 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不会在数据库參数和数据字典中加入对应的信息





版权声明:本文博主原创文章,博客,未经同意不得转载。

10g RAC 采用service达到taf的更多相关文章

  1. 【转】Oracle 10g RAC TAF

    本人转自:http://www.cnblogs.com/future2012lg/archive/2013/10/12/3365978.html Oracle RAC 同一时候具备HA(High Av ...

  2. Oracle 10g RAC TAF

    Oracle RAC 同时具备HA(High Availiablity) 和LB(LoadBalance). 而其高可用性的基础就是Failover(故障转移). 它指集群中任何一个节点的故障都不会影 ...

  3. 10g RAC常用开启关闭命令 – SRVCTL用法

    10G RAC: srvctl 1. Grammar: srvctl <command> <object> [<options]] available <comma ...

  4. Oracle 10g RAC启动与关闭命令

    一. 检查共享设备 一般情况下, 存放OCR 和 Voting Disk 的OCFS2 或者raw 都是自动启动的. 如果他们没有启动,RAC 肯定是启动不了的. 1.1 如果使用ocfs2的,检查o ...

  5. 安装Oracle 10g RAC是否需要安装HACMP

    实际上无论在哪个操作系统(AIX,HP-UX,Solaris,Linux)上安装Oracle10g RAC都不再需要Vendor Clusterware(IBM的HACMP,HP的Service Gu ...

  6. Oracle 10g RAC的负载均衡配置[转载]

    Oracle 10g RAC的负载均衡配置 负载均衡是指连接的负载均衡.RAC的负载均衡主要是指新会话连接到RAC数据库时,如何判定这个新的连接要连到哪个节点进行工作.在RAC中,负载均衡分为两种,一 ...

  7. Oracle 10g RAC 如何配置 VIP IPMP

    metalink note 283107.1介绍了如何设置VIP的IPMP,此处记录一下设置过程. o Existing 10g RAC installation ^^^^^^^^^^^^^^^^^^ ...

  8. vmware workstation9.0 RHEL5.8 oracle 10g RAC安装指南及问题总结

    一,虚拟机规划 (1)虚拟机:添加三块网卡 eth0 eth1 eth2 ,分别用于内网,心跳,外网RAC1 内网:192.168.1.10/24  心跳:192.168.2.10/24  VIP:1 ...

  9. Oracle 10g RAC中的DRM问题及关闭

    在RAC环境中,Oracle使用GRD(Global Resource Service)来记录各个RAC节点的资源信息,具体通过GCS(Global Cache Service)和GES(Global ...

随机推荐

  1. 从零开始使用git第二篇:git的日常操作

    从零开始使用git 第二篇:git的日常操作 第一篇:从零开始使用git第一篇:下载安装配置 第二篇:从零开始使用git第二篇:git实践操作 第三篇:从零开始使用git第三篇:git撤销操作.分支操 ...

  2. 使用doxygen为C/C++程序生成中文文档

    文章来自:http://www.fmddlmyy.cn/text21.html 依照约定的格式凝视源码,用工具处理凝视过的源码产生文档.通过这样的方式产生文档至少有下面优点: 便于代码和文档保持同步. ...

  3. 关于DMA

    用串口在dma中发东西的时候,,, 要判断DMA里是不是由东西,是不是在占用 当多个外设再用DMA的时候,,,要查看DMA有没有占用 一包数没发完,不要再传另一包

  4. 【Codeforces Round #185 (Div. 2) D】Cats Transport

    [链接] 链接 [题意] 有n座山,m只猫. 每只猫都在其中的一些山上玩. 第i只猫在h[i]山上玩,且会在t[i]时刻出现在山脚下(然后就一直在那里等) 然后有p个人. 它们听从你的安排. 在某个时 ...

  5. 项目中使用Prism框架

    Prism框架在项目中使用   回顾 上一篇,我们介绍了关于控件模板的用法,本节我们将继续说明WPF更加实用的内容,在大型的项目中如何使用Prism框架,并给予Prism框架来构建基础的应用框架,并且 ...

  6. mysql数据库 navicat premium mac 破解教程

    https://www.jianshu.com/p/f3ef78deadaa 转自Navicat Premium for Mac v12.0.22.0 破解教程,macOS上手动破解,无需补丁,无毒 ...

  7. HDU 1069 Monkey and Banana DP LIS

    http://acm.hdu.edu.cn/showproblem.php?pid=1069 题目大意 一群研究员在研究猴子的智商(T T禽兽啊,欺负猴子!!!),他们决定在房顶放一串香蕉,并且给猴子 ...

  8. 高性能 Python —— vectorization

    首先来看一段判断一个整数数是否为素数的函数,然后从计算机内部计算流程的角度对其进行分析: import math def check_prime(number): sqrt_number = math ...

  9. 利用C#与AE调用GP工具

    转自原文 利用C#与AE调用GP工具 第一,首先要明确自己需要调用arctoolbox里面的什么工具,实现什么样的功能. 第三,编写command或tool工具,编写自己要的功能工具. 1)首先创建一 ...

  10. Django之富文本编辑器kindeditor 及上传

    1.什么是富文本编辑器 百度百科(https://baike.baidu.com/item/%E5%AF%8C%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8 ...