What's preconnect.svc in 11g RAC?
生活随笔
收集整理的這篇文章主要介紹了
What's preconnect.svc in 11g RAC?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
有網友反映在11.2的RAC中有一個名如*_preconnect.svc的資源一直處于OFFLINE狀態,而其TARGET則為ONLINE狀態,無法通過重啟CRS或者手動start該資源來使之ONLINE。我們來具體看一下什么情況下回產生這種資源?:[oracle@rh2 ~]$ srvctl add service -hAdds a service configuration to the Oracle Clusterware.Usage: srvctl add service -d -s {-r ""
[-a ""] [-P {BASIC | NONE | PRECONNECT}] | -g
[-c {UNIFORM | SINGLETON}] } [-k ] [-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 ]
[-w ] [-t ] [-f]-d Unique name for the database-s Service name-r "" Comma separated list of preferred instances-a "" Comma separated list of available instances-g 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 network number (default number is 1)-P {NONE | BASIC | PRECONNECT} TAF policy specification-l Role of the service (primary, physical_standby, logical_standby, snapshot_standby)-y Management policy for the service (AUTOMATIC or MANUAL)-e Failover type (NONE, SESSION, or SELECT)-m Failover method (NONE or BASIC)-w Failover delay-z Failover retries-t Edition (or "" for empty edition value)-j Connection Load Balancing Goal (SHORT or LONG). Default is LONG.-B Runtime Load Balancing Goal (SERVICE_TIME, THROUGHPUT, or NONE)-x Distributed Transaction Processing (TRUE or FALSE)-q AQ HA notifications (TRUE or FALSE)
Usage: srvctl add service -d -s -u {-r "" | -a ""} [-f]-d Unique name for the database-s Service name-u Add a new instance to service configuration-r Name of new preferred instance-a Name of new available instance-f Force the add operation even though a listener is not configured for a network-h Print usage[oracle@rh2 ~]$ srvctl add service -d PROD -s maclean -r "PROD1,PROD2" -P BASIC[oracle@rh2 ~]$ crs_stat|grep maclean
NAME=ora.prod.maclean.svc
NAME=ora.prod.maclean_taf.svc[oracle@rh2 ~]$ srvctl add service -d PROD -s maclean_pre -r "PROD1,PROD2" -P PRECONNECT
[oracle@rh2 ~]$ crs_stat|grep maclean_pre
NAME=ora.prod.maclean_pre.svc
NAME=ora.prod.maclean_pre_preconnect.svc/* 可以看到僅當創建的service使用preconnect的TAF policy時會附帶創建{service_name}_preconnect.svc的服務 */[oracle@rh2 ~]$ srvctl start service -d PROD -s maclean
[oracle@rh2 ~]$ srvctl start service -d PROD -s maclean_pre[oracle@rh2 ~]$ crs_stat |grep -A3 maclean
NAME=ora.prod.maclean.svc
TYPE=ora.service.type
TARGET=ONLINE
STATE=ONLINE on rh2
--
NAME=ora.prod.maclean_pre.svc
TYPE=ora.service.type
TARGET=ONLINE
STATE=ONLINE on rh2
--
NAME=ora.prod.maclean_pre_preconnect.svc
TYPE=ora.service.type
TARGET=ONLINE
STATE=OFFLINE
--
NAME=ora.prod.maclean_taf.svc
TYPE=ora.service.type
TARGET=OFFLINE
STATE=OFFLINE[oracle@rh2 ~]$ srvctl start service -d prod -s maclean_pre_preconnect
PRCD-1084 : Failed to start service maclean_pre_preconnect
PRCR-1079 : Failed to start resource ora.prod.maclean_pre_preconnect.svc
CRS-2674: Start of 'ora.prod.maclean_pre_preconnect.svc' on 'rh2' failed
CRS-2674: Start of 'ora.prod.maclean_pre_preconnect.svc' on 'rh3' failed
CRS-2632: There are no more servers to try to place resource
'ora.prod.maclean_pre_preconnect.svc' on that would satisfy its placement policy/* 無法手動啟動該preconnect.svc服務 */[oracle@rh2 ~]$ crs_stat |grep preconnect
NAME=ora.prod.maclean_pre_preconnect.svc[oracle@rh2 ~]$ srvctl remove service -d PROD -s maclean_pre_preconnect
PRCD-1107 : Removed service maclean_pre_preconnect but failed to remove its
underlying server pool PROD_maclean_pre
PRCS-1012 : Failed to remove server pool PROD_maclean_pre
PRCR-1072 : Failed to unregister server pool ora.PROD_maclean_pre
CRS-2554: Server pool 'ora.PROD_maclean_pre' cannot be unregistered as
it is referenced by resource 'ora.prod.maclean_pre.svc'[oracle@rh2 ~]$ crs_stat |grep preconnec/* 以上remove命令報錯但該preconnect.svc服務還是被刪除了,雖然我們并不推薦這樣做 */[oracle@rh2 admin]$ srvctl start service -d PROD -s maclean_pre[oracle@rh2 admin]$ lsnrctl serviceLSNRCTL for Linux: Version 11.2.0.2.0 - Production on 30-MAR-2011 18:55:43Copyright (c) 1991, 2010, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "+ASM" has 1 instance(s).Instance "+ASM1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyLOCAL SERVER
Service "PROD" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyLOCAL SERVER
Service "PRODXDB" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...Handler(s):"D000" established:0 refused:0 current:0 max:1022 state:readyDISPATCHER (ADDRESS=(PROTOCOL=tcp)(HOST=rh2)(PORT=36196))
Service "maclean" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyLOCAL SERVER
Service "maclean_pre" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyLOCAL SERVER
The command completed successfully[oracle@rh2 admin]$ tnsping PROD_TAFTNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 30-MAR-2011 18:54:38Copyright (c) 1997, 2010, Oracle. All rights reserved.Used parameter files:Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)
(HOST = rh-cluster-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = maclean_pre)))
OK (10 msec)[oracle@rh2 admin]$ sqlplus maclean/maclean@PROD_TAFSQL> select instance_name,host_name from v$instance;INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
PROD2
rh3.oracle.comshutdown PROD2 instance:SQL> shutdown abortSQL> select instance_name,host_name from v$instance;INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
PROD1
rh2.oracle.com/* 可以看到即使刪除preconnect.svc服務也不會影響到TAF的正常使用,在生產環境中無需刻意去調試該服務,最好的應對方式是放任不管
*/
所以如果某天你看到你的crs_stat -t輸出里有一條莫名的類似"ora....ect.svc ora....ce.type ONLINE OFFLINE"的記錄,那么大可以忽略該資源的OFFLINE狀態;這是正常現象,用不著緊張!
本文轉自maclean_007 51CTO博客,原文鏈接:http://blog.51cto.com/maclean/1277080
總結
以上是生活随笔為你收集整理的What's preconnect.svc in 11g RAC?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: X window的思想和终端的重大意义
- 下一篇: Django 实现WEB登陆(第二版)