接上篇《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
建议配置:
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/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 等新的的专题栏目和一些新的技术...
阅读 1347·2023-01-11 13:20
阅读 1685·2023-01-11 13:20
阅读 1133·2023-01-11 13:20
阅读 1860·2023-01-11 13:20
阅读 4101·2023-01-11 13:20
阅读 2705·2023-01-11 13:20
阅读 1386·2023-01-11 13:20
阅读 3599·2023-01-11 13:20