ORACLE11g -- Oracle Restart新特性

Oracle restart是监控以下组件并在发生异常时能够自动重启的功能。
Database instances
Oracle Net listener
Database services
Automatic Storage Management (ASM) instance
ASM disk groups
Oracle Notification Services (ONS/eONS)
不能加到oracle restart configuration的部件:不需要自动启动的,不能通过依赖性自动启动的,不能用srvctl启动的。
Oracle restart只能在stand alone环境中执行,即非cluster环境。
设置、激活、启动restart
CRSCTL:需以grid用户或root用户执行
crsctl check | config | disable | enable | start | stop has [-f]
启用oracle restart功能
利用oem:High Availability -> oracle restart改成enabled
命令:srvctl enable | disable
Restart组件的设置
利用srvctl utility
用dbca建库时相关组件会自动增加到oracle restart配置里。手动建库如使用create database命令或先建库后安装oracle restart(grid infrastructure)时,需使用srvctl命令手动增加或删除组件到oracle restart 配置里。先用srvctl add后用start命令启动component。手动加的时候需注意,grid用户必须为osdba(dba组)的成员,这是因为grid用户必须以sysdba连接到数据库以便起停数据库。
如果使用srvctl命令关闭某个组件,那么下次Oracle restart不会自动启动这个组件;而使用srvctl命令启动了此组件,则Oracle restart下次会自动启动此组件。
sql*plus,lsnrctl,asmcmd等utility和Oracle restart是集成的,如果使用上述utility去停止某个组件,oracle restart认为是正常关闭的,所以不自动重启组件。
srvctl和sql*plus的区别
srvctl记录各个组件之间的依赖性,如先起ASM库再起DB,sql*plus则不具有依赖性。
对于dataguard的支持:
Oracle restart和data broker集成。
如果使用data broker配置了database的角色,则oracle restart configuration会根据新角色自动更新database configuration,如果不使用data broker,则要在oracle restart configuration中手动修改数据库角色。当加一个数据库服务到oracle restart configuration,可以给服务指定一个或多个dataguard role。
oracle restart 使用ons服务和advanced q来发布FAN(fast application nogification)ha事件。
Application High Availability with Services and FAN
Managing Unplanned Outages
Managing Planned Outages
Enabling FAN Events in an Oracle Restart Environment
To enable Oracle Restart to publish Fast Application Notification (FAN) events, you must create an Oracle Notification Services (ONS) network that includes the Oracle
Restart servers and the integrated clients. Client中包括 CMAN,JDBC,Universal Connection pool(UCP)等等。如果想加OCI或ODP.NET client需要激活aq ha notifications的服务。ONS须在server上执行。
Srvctl  add ons -> srvctl enable ons -> srvctl start ons
OCI Client配置: srvctl modify service -d proddb -s gl.us.example.com -q true -l primary -e
select -m basic -z 5 -w 180 -j long
Note: Oracle Call Interface does not manage UP events.

原文地址:https://www.cnblogs.com/kevin-boy/p/3225425.html