接上篇《oracle最佳連接方式之service簡介及創建》,本章節涉及數據庫service的維護操作:
service切換、刪除等標準操作。
su – oracle
srvctl config service {-db [-service ] [-verbose]
示例:
[oracle@server01 admin]$ srvctl config service -db DGORCL -verbose
Service name: ORCL_RD_S1
Server pool:
Cardinality: 1
Service role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Global: false
Commit Outcome: false
Failover type:
Failover method:
Failover retries:
Failover delay:
Failover restore: NONE
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Pluggable database name: ORCL
Hub service:
Maximum lag time: ANY
SQL Translation Profile:
Retention: 86400 seconds
Replay Initiation Time: 300 seconds
Drain timeout:
Stop option:
Session State Consistency: DYNAMIC
GSM Flags: 0
Service is enabled
Preferred instances: orcl1
Available instances: orcl2
CSS critical: no
Service uses Java: false
Service name: ORCL_RD_S2
Server pool:
Cardinality: 1
Service role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Global: false
Commit Outcome: false
Failover type:
Failover method:
Failover retries:
Failover delay:
Failover restore: NONE
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Pluggable database name: ORCL
Hub service:
Maximum lag time: ANY
SQL Translation Profile:
Retention: 86400 seconds
Replay Initiation Time: 300 seconds
Drain timeout:
Stop option:
Session State Consistency: DYNAMIC
GSM Flags: 0
Service is enabled
Preferred instances: orcl2
Available instances: orcl1
CSS critical: no
Service uses Java: false
srvctl status service {-db [-service "
" | -pdb ] [-db
]} [-force] [-verbose]
示例:
srvctl status service -d DGORCL –verbose
Service ORCL_rd_s1 is running on instance(s) orcl2
Service ORCL_rd_s2 is running on instance(s) orcl2
srvctl status service -d DGORCL -pdb ORCL
Service ORCL_rd_s1 is running on instance(s) orcl2
Service ORCL_rd_s2 is running on instance(s) orcl2
srvctl start service { -node
| -db
[-node| -instance ]
[-service "" | -pdb
[-role] [-startoption][-verbose]
--啟動service
srvctl start service -db DGORCL -service ORCL_RD_S1
--檢查
srvctl status service -db DGORCL -service ORCL_RD_S1
Service ORCL_RD_S1 is running on instance(s) orcl1
--停止service
srvctl stop service -db DGORCL -service ORCL_RD_S1
--檢查
srvctl status service -db DGORCL -service ORCL_RD_S1
Service ORCL_RD_S1 is not running.
srsctl status res –t
ora.DGORCL.ORCL_rd_s1.svc
1 OFFLINE OFFLINE STABLE
ora.DGORCL.ORCL_rd_s2.svc
ONLINE ONLINE server02 STABLE
srvctl relocate service -db
[-service | -pdb ]
{-oldinst [-newinst ]
[-force [-noreplay]
示例:
ora.DGORCL.ORCL_rd_s1.svc
1 ONLINE ONLINE server01 STABLE
ora.DGORCL.ORCL_rd_s2.svc
2 ONLINE ONLINE server02 STABLE
將server01的ORCL_rd_s1 relocate到server02上面
srvctl relocate service -db DGORCL -service ORCL_RD_S1 -oldinst orcl1 -newinst orcl2
--檢查狀態
ora.DGORCL.ORCL_rd_s1.svc
2 ONLINE ONLINE server02 STABLE
ora.DGORCL.ORCL_rd_s2.svc
ONLINE ONLINE server02 STABLE
srvctl modify service -d -s
-n -i "" [-a "" ] [-f]
示例:
[oracle@emrep01 ~]$ srvctl config service -d EMREP -s EMREP_r_s1
Service name: EMREP_R_S1
Service is enabled
Server pool: EMREP_EMREP_R_S1
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Preferred instances: EMREP1
Available instances: EMREP2
將EMREP_R_S1的首選實例調整為EMREP2,備選實例調整為EMREP1:
srvctl modify service -d EMREP -s EMREP_R_S1 -n -i EMREP2 -a EMREP1
檢查service:
[oracle@emrep01 ~]$ srvctl config service -d EMREP -s EMREP_r_s1
Service name: EMREP_R_S1
Service is enabled
Server pool: EMREP_EMREP_R_S1
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Preferred instances: EMREP2
Available instances: EMREP1
srvctl remove service -d -s
[-i ] [-f]
srvctl stop service -d EMREP -s EMREP_r_s1
srvctl remove service -d EMREP -s EMREP_r_s1
建議配置:
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/129322.html
Oracle最佳連接方式之service最佳實踐及測試(下) img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%...
摘要:微軟已經很久沒有支持開源社區了,這也是很多公司不采用的原因之一。當然微軟總是致力于提供無的工具簡單的語法和良好的教程,他們最近也意識到,開源可以為提供更多的創新和業務。 得益于CTO、CEO和CDO們積極的推動,IT基礎設施正在向云環境遷移,底層架構師則在熱烈討論圍繞著云原生應用的SaaS、PaaS和微服務架構,而開發者們正在大顯身手,努力探索云計算的魔盒,找出什么是對業務有價值的,什...
摘要:年月日甲骨文今日發布了最新的集成產品,以幫助企業更便利地運用變革性技術。甲骨文提供下一代用戶體驗,包括基于個人角色使用所有功能,同時通過預先制作的集成模板加速產品上市時間,為企業創造更多的價值。2017年10月11日 –甲骨文今日發布了最新的集成PaaS產品,以幫助企業更便利地運用變革性技術。除了最新的自治數據管理云服務、大數據分析和人工智能功能之外,甲骨文宣布在其應用程序開發平臺、數據集成...
摘要:新晉技術專家下面是墨天輪部分新晉的技術專家。大家可以點擊往期閱讀墨天輪技術專家邀請函了解詳情,申請成為我們的技術專家,加入專家團隊,與我們一起創建一個開放互助的數據庫技術社區。新關聯公眾號墨天輪是一個開放互助的數據庫技術社區。 引言 近期我們在DBASK小程序增加了數據庫 MongoDB、Redis、 Elasticsearch、DB2、Weblogic 等新的的專題欄目和一些新的技術...
閱讀 1353·2023-01-11 13:20
閱讀 1699·2023-01-11 13:20
閱讀 1211·2023-01-11 13:20
閱讀 1904·2023-01-11 13:20
閱讀 4161·2023-01-11 13:20
閱讀 2751·2023-01-11 13:20
閱讀 1397·2023-01-11 13:20
閱讀 3664·2023-01-11 13:20