oracle服务方式rac,【Oracle Database】Oracle RAC(八):服务资源管理

Service资源

每个数据库都有一个或多个service名称,service名称是提供给客户端连接到数据库实例的名称。

创建数据库会默认创建与数据库同名的service,默认的service实现所有实例的负载均衡,可以认为数据库的所有实例是默认创建的service的首选节点。

手工创建的service资源区分首选节点与备用节点,客户端无论通过哪个节点请求连接都会固定连接到service资源的首选节点,只有当首选节点故障才会连接到备用节点。

TAF(Transparent Application Failover):对于已经连接到数据库的客户端连接(会话),当前连接的数据库实例出现问题时,将已经存在的数据库连接透明地迁移到其他数据库实例中。对应的连接可能在实例出现问题之前已经执行了一些操作,或者在实例出现问题时正在执行某个操作,所以在failover到新实例的时候需要对执行过的操作和正在执行的操作进行相应的处理。

TAF仅支持使用OCI方式连接到数据库的会话,不支持使用JDBC方式连接到数据库的会话。创建service

[oracle@wallet01 ~]$ srvctl add service -d wallet -s gspublic -r wallet1 -a wallet2,wallet3 -P basic -e session -y automatic

-d       Unique name for the database

-s              Service name

-r ""    Comma separated list of preferred instances

-a ""    Comma separated list of available instances

-P {NONE | BASIC | PRECONNECT}        TAF policy specification

-e        Failover type (NONE, SESSION, or SELECT)

-y               Management policy for the service (AUTOMATIC or MANUAL)

查询service属性

[oracle@wallet01 ~]$ srvctl config service -d wallet -s gspublic

Service name: gspublic

Service is enabled

Server pool: wallet_gspublic

Cardinality: 1

Disconnect: false

Service role: PRIMARY

Management policy: AUTOMATIC

DTP transaction: false

AQ HA notifications: false

Failover type: SESSION

Failover method: NONE

TAF failover retries: 0

TAF failover delay: 0

Connection Load Balancing Goal: LONG

Runtime Load Balancing Goal: NONE

TAF policy specification: BASIC

Edition:

Preferred instances: wallet1

Available instances: wallet2,wallet3

查询service状态

[oracle@wallet01 ~]$ srvctl status service -d wallet

Service gspublic is not running.

启动service资源

[oracle@wallet01 ~]$ srvctl start service -d wallet -s gspublic

[oracle@wallet01 ~]$ srvctl status service -d wallet

Service gspublic is running on instance(s) wallet1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值