CSS 關鍵型: no
css
$ lsnrctl statussql
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 13-MAY-2021 17:31:10Copyright (c) 1991, 2016, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 12.2.0.1.0 - ProductionStart Date 11-MAY-2021 09:17:00Uptime 2 days 8 hr. 14 min. 9 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/12.2.0/grid/network/admin/listener.oraListener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.91)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.96)(PORT=1521)))Services Summary...Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service...Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service...Service "+ASM_FRA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service...Service "+ASM_OCR_VOTE" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service...Service "99f774786184674be0535b66a8c016e8" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "99f92203449e800fe0535b66a8c029cd" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "99f9220344a0800fe0535b66a8c029cd" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "99f9220344a1800fe0535b66a8c029cd" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "9aee50bc89125960e0535b66a8c0e34e" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "a365d71938bb20f7e0535b66a8c08094" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "a37448aa67e01097e0535b66a8c0686d" has 2 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service... Instance "orcl11", status READY, has 2 handler(s) for this service...Service "ecology" has 2 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service... Instance "orcl11", status READY, has 2 handler(s) for this service...Service "ecology_srv" has 2 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service... Instance "orcl11", status READY, has 2 handler(s) for this service...Service "ecologytest20200321" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "orcl" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "orcl1XDB" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "portal" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "portaldev" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "portalmessage" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "portalmobile" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...Service "portaltest" has 1 instance(s). Instance "orcl11", status READY, has 1 handler(s) for this service...The command completed successfully配置tns:ecol = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = racscan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ecology_srv) ) )檢查服務$crsctl status res -tora.orcl.ecology_srv.svc 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE登陸測試停掉rac2對應的pdb,鏈接中斷後能自動恢復:SP2-0306: Invalid option.Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]where <logon> ::= <username>[/<password>][@<connect_identifier>] <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]SP2-0306: Invalid option.Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]where <logon> ::= <username>[/<password>][@<connect_identifier>] <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*PlusINSTANCE_NAME HOST_NAME--------------------------------------------- -------------------------orcl13 rac3.ccic.comINSTANCE_NAME HOST_NAME--------------------------------------------- -------------------------orcl13 rac3.ccic.com----$ srvctl add service -help -verbose將服務配置添加到 Oracle Clusterware。用法: srvctl add service -db <db_unique_name> -service <service_name> {-preferred "<preferred_list>" [-available "<available_list>"] [-tafpolicy {BASIC | NONE | PRECONNECT}] | -serverpool <pool_name> [-cardinality {UNIFORM | SINGLETON}] } [-netnum <network_number>] [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"] [-policy {AUTOMATIC | MANUAL}] [-notification {TRUE | FALSE}] [-dtp {TRUE | FALSE}] [-clbgoal {SHORT | LONG}] [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}] [-failovertype {NONE | SESSION | SELECT | TRANSACTION}] [-failovermethod {NONE | BASIC}] [-failoverretry <failover_retries>] [-failoverdelay <failover_delay>] [-failover_restore {NONE | LEVEL1}] [-edition <edition>] [-pdb <pluggable_database>] [-global {TRUE | FALSE}] [-maxlag <max_lag_time>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE | FALSE}] [-retention <retention>] [-replay_init_time <replay_initiation_time>] [-session_state {STATIC | DYNAMIC}] [-pqservice <pq_service>] [-pqpool "<pq_pool_list>"] [-gsmflags <gsm_flags>] [-drain_timeout <timeout>] [-stopoption <stop_option>] [-css_critical {YES | NO}] [-rfpool <pool_name>] [-force] [-eval] [-verbose] -db <db_unique_name> 數據庫的惟一名稱 -service <service> 服務名 -preferred "<preferred_list>" 逗號分隔的首選實例列表 -available "<available_list>" 逗號分隔的可用實例列表 -serverpool <pool_name> 服務器池名稱 -cardinality (UNIFORM | SINGLETON) 服務在託管此服務的服務器池中的每個活動服務器上運行 (UNIFORM) 或僅在一個服務器上運行 (SINGLETON) -netnum <network_number> 網絡編號 (默認編號爲 1) -tafpolicy (NONE | BASIC | PRECONNECT) TAF 策略規範 -role <role> 服務的角色 (primary, physical_standby, logical_standby, snapshot_standby) -policy <policy> 服務的管理策略 (AUTOMATIC 或 MANUAL) -failovertype (NONE | SESSION | SELECT | TRANSACTION) 故障轉移類型 -failovermethod (NONE | BASIC) 故障轉移方法 -failoverdelay <failover_delay> 故障轉移延遲 (秒) -failoverretry <failover_retries> 重試鏈接的嘗試次數 -failover_restore <failover_restore> Option to restore initial environment for Application Continuity and TAF (NONE or LEVEL1) -edition <edition> 版本 ("" 表示空版本值) -pdb <pluggable_database> 插接式數據庫名 -maxlag <maximum replication lag> 最長複製滯後時間, 以秒爲單位 (非負整數, 默認值爲 'ANY') -clbgoal (SHORT | LONG) 鏈接負載平衡目標。默認值爲 LONG。 -rlbgoal (SERVICE_TIME | THROUGHPUT | NONE) 運行時負載平衡目標 -dtp (TRUE | FALSE) 分佈式事務處理 -notification (TRUE | FALSE) 啓用用於 OCI 鏈接的快速應用程序通知 (FAN) -global <global> 全局屬性 (TRUE 或 FALSE) -preferred <new_pref_inst> 新首選實例的名稱 -available <new_avail_inst> 新可用實例的名稱 -sql_translation_profile <sql_translation_profile> 爲 SQL 轉換概要文件指定數據庫對象 -commit_outcome (TRUE | FALSE) 提交結果 -retention <retention> 指定保留提交結果的秒數 -replay_init_time <replay_init_time> 以後不啓動重放的秒數 -session_state <session_state> 會話狀態一致性 (STATIC 或 DYNAMIC) -pqservice <pq_service> 並行查詢服務名 -pqpool <pq_pool> 並行查詢服務器池名 -gsmflags <gsm_flags> 設置行政區和區域故障轉移值 -drain_timeout <drain_timeout> 服務消耗超時, 以秒爲單位指定 -stopoption <stop_options> 用於中止服務的選項 (例如 TRANSACTIONAL 或 IMMEDIATE) -css_critical {YES | NO} 定義數據庫或服務是否爲 CSS 關鍵型 -rfpool <pool_name> 讀進程場服務器池名稱 -eval 評估事件的效果, 不對系統進行任何更改用法: srvctl add service -db <db_unique_name> -service <service_name> -update {-preferred "<new_pref_inst>" | -available "<new_avail_inst>"} [-force] [-verbose] -db <db_unique_name> 數據庫的惟一名稱 -service <service> 服務名 -update 爲服務配置添加一個新實例 -preferred <new_pref_inst> 新首選實例的名稱 -available <new_avail_inst> 新可用實例的名稱 -force 強制執行添加操做, 即便沒有爲網絡配置監聽程序 -verbose 詳細輸出 -help 輸出用法