管理ONS(Oracle Notification Service)
时间:2022-03-15 02:13
Onsctl
Onsctl这个命令是用来管理ONS(Oracle Notification Service)是OracleClustser实现FAN Event Push模型的基础。
Oracle Notification Service (ONS)--A publish and subscribe service for communicating Fast Application Notification (FAN) events.
在RAC环境下,需要使用$CRS_HOME下的ONS,而不是$ORACLE_HOME下的ONS,这点需要注意。配置文件位于$CRS_HOME/opmn/conf/ons.config。
[oracle@felix2 conf]$ pwd
/u01/oracle/10.2.0/crs_1/opmn/conf
[oracle@felix2 conf]$ cat ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
[oracle@felix2 conf]$ netstat -ano | grep 6200
tcp 0 0 0.0.0.0:6200 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 192.168.10.102:8471 192.168.10.101:6200 ESTABLISHED off (0.00/0/0)
[oracle@felix2 conf]$ netstat -ano | grep 6113
tcp 0 0 127.0.0.1:6113 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 127.0.0.1:42331 127.0.0.1:6113 ESTABLISHED keepalive (2251.34/0/0)
tcp 0 0 127.0.0.1:42328 127.0.0.1:6113 ESTABLISHED keepalive (2185.99/0/0)
tcp 0 0 127.0.0.1:6113 127.0.0.1:42331 ESTABLISHED off (0.00/0/0)
tcp 0 0 127.0.0.1:6113 127.0.0.1:42328 ESTABLISHED off (0.00/0/0)
unix 3 [ ] STREAM CONNECTED 6113
[oracle@felix2 conf]$
配置ONS:
添加ONS:
[oracle@felix2 conf]$ racgons add_configfelix11:6200 felix22:6200
删除ONS:
[oracle@felix2 conf]$ racgons remove_configfelix11:6200 felix22:6200
[oracle@felix2 conf]$
Onsctl命令:
使用onsctl命令可以启动、停止、调试ONS,并重新载入配置文件,其命令格式如下:
注意:
ONS进程运行,并不一定代表ONS正常工作,需要使用ping命令来确认。
[oracle@felix2 conf]$ onsctl
usage: /u01/oracle/10.2.0/db_1/bin/onsctlstart|stop|ping|reconfig|debug
start - Start opmn only.
stop - Stop ons daemon
ping - Test to see ifons daemon is running
debug - Display debuginformation for the ons daemon
reconfig - Reload the onsconfiguration
help - Print a shortsyntax description (this).
detailed - Print a verbosesyntax description.
(1)在os级别查看进程
[oracle@felix2 conf]$ ps -ef | grep ons
root 2530 1 0 20:19 ? 00:00:00 sendmail: acceptingconnections
oracle 5223 1 0 20:22 ? 00:00:00/u01/oracle/10.2.0/crs_1/opmn/bin/ons -d
oracle 5224 5223 0 20:22 ? 00:00:00 /u01/oracle/10.2.0/crs_1/opmn/bin/ons-d
oracle 10833 29589 0 21:59 pts/2 00:00:00 grep ons
[oracle@felix2 conf]$
(2)确认ONS服务的状态
[oracle@felix2 conf]$ onsctl ping
Number of configuration nodes retrieved: 2
0: {node = felix1, port = 6200}
Adding remote host felix1:6200
1: {node = felix2, port = 6200}
Remote port for local node in local config doesnot match that from OCR.
ons is not running ...
[oracle@felix2 conf]$
从输出的信息课件,ONS服务是停止的。
(3)启动ONS服务
[oracle@felix2 conf]$ onsctl start
Number of configuration nodes retrieved: 2
0: {node = felix1, port = 6200}
Adding remote host felix1:6200
1: {node = felix2, port = 6200}
……
……
Fast Connection Failover differs from Transparent Application Failover (TAF) in the following ways:
-
Application-level connection retries
Fast Connection Failover supports application-level connection retries. This gives the application control of responding to connection failovers. The application can choose whether to retry the connection or to rethrow the exception. TAF supports connection retries only at the OCI/Net layer.
-
Integration with the implicit connection cache
Fast Connection Failover is well-integrated with the implicit connection cache, which allows the Connection Cache Manager to manage the cache for high availability. For example, failed connections are automatically invalidated in the cache. TAF works at the network level on a per-connection basis, which means that the connection cache cannot be notified of failures.
-
Event-based
Fast Connection Failover is based on the Oracle RAC event mechanism. This means that Fast Connection Failover is efficient and detects failures quickly for both active and inactive connections.
-
Load-balancing support
Fast Connection Failover supports UP event load balancing of connections and run-time work request distribution across active Oracle RAC instances.
管理ONS(Oracle Notification Service),布布扣,bubuko.com
相关推荐
- xshell怎么连接数据库
- MySQL数据库设计规范(仅供参考)
- SQLServer字符串查找(判断字符串是否含数字或字母)
- MySQL源码安装5.7-CentOS7
- 数据库常用架构和同步工作原理
- Apache HBase 1.7.1 发布,分布式数据库
- SQL Server 数据库分离和附加
- sqlSugar 简单封装及使用案例
- 【MySQL】-索引类型
- mysql的数据类型详解