CRS添加ora.taf.svc服务

本文详细介绍如何在Oracle数据库中管理服务,包括修改、添加、启动、查看、配置、删除服务及更改服务连接实例的过程。通过srvctl命令,可以实现对数据库服务的全面控制,确保高可用性和性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、修改service_names:

SYS@crm3eop2> alter system set service_names='crm3eop_taf' sid='crm3eop2' scope=spfile;

System altered.

Elapsed: 00:00:00.02
SYS@crm3eop2> 

 

Usage: srvctl add service -d <db_unique_name> -s <service_name> {-r "<preferred_list>" [-a "<available_list>"] [-P {BASIC | NONE | PRECONNECT}] | -g <pool_name> [-c {UNIFORM | SINGLETON}] } [-k   <net_num>] [-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-y {AUTOMATIC | MANUAL}] [-q {TRUE|FALSE}] [-x {TRUE|FALSE}] [-j {SHORT|LONG}] [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] [-m {NONE|BASIC}] [-z <failover_retries>] [-w <failover_delay>] [-t <edition>] [-f]
    -d <db_unique_name>      Unique name for the database
    -s <service>             Service name
    -r "<preferred_list>"    Comma separated list of preferred instances
    -a "<available_list>"    Comma separated list of available instances
    -g <pool_name>           Server pool name
    -c {UNIFORM | SINGLETON} Service runs on every active server in the server pool hosting this service (UNIFORM) or just one server (SINGLETON)
    -k <net_num>             network number (default number is 1)
    -P {NONE | BASIC | PRECONNECT}        TAF policy specification
    -l <role>                Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
    -y <policy>              Management policy for the service (AUTOMATIC or MANUAL)
    -e <Failover type>       Failover type (NONE, SESSION, or SELECT)
    -m <Failover method>     Failover method (NONE or BASIC)
    -w <integer>             Failover delay
    -z <integer>             Failover retries
    -t <edition>             Edition (or "" for empty edition value)
    -j <clb_goal>  Connection Load Balancing Goal (SHORT or LONG). Default is LONG.
    -B <Runtime Load Balancing Goal>     Runtime Load Balancing Goal (SERVICE_TIME, THROUGHPUT, or NONE)
    -x <Distributed Transaction Processing>  Distributed Transaction Processing (TRUE or FALSE)
    -q <AQ HA notifications> AQ HA notifications (TRUE or FALSE)
Usage: srvctl add service -d <db_unique_name> -s <service_name> -u {-r "<new_pref_inst>" | -a "<new_avail_inst>"} [-f]
    -d <db_unique_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
    -f                       Force the add operation even though a listener is not configured for a network
    -h                       Print usage

 

2、添加服务:

grid@acctdb1:/export/home/grid $srvctl add service -d crm3eop -s crm3eop_taf -r crm3eop2 -a crm3eop1 -P basic -e select -m basic -z 180 -w 5
PRCD-1248 : User is not authorized to create service crm3eop_taf for database crm3eop
PRKH-1014 : Current user "grid" is not the oracle owner user "oracle" of oracle home "/u01/app/oracle/product/11.2.0/db_1"
grid@acctdb1:/export/home/grid $logout
acctdb1:/root # 
acctdb1:/root # su - oracle
You have logged onto a secured server..All accesses logged
You have new mail.
oracle@acctdb1:/export/home/oracle $cd /u01/app/oracle/product/11.2.0/db_1
oracle@acctdb1:/u01/app/oracle/product/11.2.0/db_1 $cd bin
oracle@acctdb1:/u01/app/oracle/product/11.2.0/db_1/bin $./srvctl add service -d crm3eop -s crm3eop_taf -r crm3eop2 -a crm3eop1 -P basic -e select -m basic -z 180 -w 5

-d 数据库 -s 服务名 -r 优先节点 -a 次要节点  -P basic -e select -m basic -z 180 -w 5

 

3、启动服务

grid@acctdb1:/export/home/grid $srvctl start service -d crm3eop

 

4、查看服务

grid@acctdb1:/export/home/grid $crsctl stat res -t

。。。。。。。。。。

ora.crm3eop.crm3eop_taf.svc
      1        ONLINE  ONLINE       acctdb2                     

。。。。。。。。。。

 

5、查看配置:

grid@acctdb1:/export/home/grid $srvctl config service -d crm3eop -a
Warning:-a option has been deprecated and will be ignored.
Service name: crm3eop_taf
Service is enabled
Server pool: crm3eop_crm3eop_taf
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: SELECT
Failover method: BASIC
TAF failover retries: 180
TAF failover delay: 5
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition: 
Preferred instances: crm3eop2
Available instances: crm3eop1
grid@acctdb1:/export/home/grid $

 

6、删除服务:srvctl remove service -d rac -s rac_taf

7、更改服务连接实例:

srvctl relocate  service  -d crm3eop -s crm3eop2 -i crm3eop1 -t ngrewdb1  -f

[grid@rac1 ~]$ srvctl relocate service -help

Temporarily relocates service from one node of the cluster to another.

Usage: srvctl relocate service -d <db_unique_name> -s <service_name> {-i <old_inst_name> -t <new_inst_name> | -c <current_node> -n <target_node>} [-f]
    -d <db_unique_name>      Unique name for the database
    -s <service>             Service name
    -i <old_inst>            Old instance name
    -t <new_inst>            New instance name
    -c <current_node>        Node name to relocate service from
    -n <target_node>         Node name to relocate service to
    -f                       Disconnect all sessions during stop or relocate service operations
    -h                       Print usage
[grid@rac1 ~]$ 

 

 

 

 

 

 

 

 

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值