12
返回列表 发新帖
楼主: yaguo_96

能否用srvctl 修改service 的设置

[复制链接]
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2005-11-01 07:43:48会员2006贡献徽章
日期:2006-04-17 13:46:34
11#
发表于 2008-3-28 10:56 | 只看该作者
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$./crs_stat -p ora.urpdb.test1.cs |grep AUTO_START
AUTO_START=always
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$./crs_stat -p ora.urpdb.test1.urpdb1.srv|grep AUTO_START
AUTO_START=always
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$./crs_stat -p ora.urpdb.test1.urpdb2.srv|grep AUTO_START
AUTO_START=always

Thanks,
Phigon

使用道具 举报

回复
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2005-11-01 07:43:48会员2006贡献徽章
日期:2006-04-17 13:46:34
12#
发表于 2008-3-31 09:44 | 只看该作者
有类似案例的朋友吗?

使用道具 举报

回复
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2005-11-01 07:43:48会员2006贡献徽章
日期:2006-04-17 13:46:34
13#
发表于 2008-4-2 17:11 | 只看该作者
Oracle 确认是bug 4134280。到现在还没有补丁包出来。估计12g会修复吧。
谢谢huang的支持。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
14#
发表于 2008-4-3 06:07 | 只看该作者
Bug 4134280 is unpublished. I can only see the header part of it. Looks like it's a bug for 10gR1? Can you ask Oracle more details? I doubt they'll give you the full bug report because it's unpublished.

Yong Huang

使用道具 举报

回复
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2005-11-01 07:43:48会员2006贡献徽章
日期:2006-04-17 13:46:34
15#
发表于 2008-4-3 10:23 | 只看该作者
QUESTION
=========

I have created some service using the command "srvctl add service " in database of RAC 10.2.0.3.
I have set the service to auto_starting using the command "srvctl enable service -d database -d sev
icename.
just as the following
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$srvctl start database -d urpdb
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$./crs_stat -p ora.urpdb.test1.cs |grep AUTO_START
AUTO_START=always
/opt/app/oracle/product/10.2.0/crs/bin@edb3=>urpdb1$srvctl status service -d urpdb -v

Service gxsj is not running.
Service qjsj is not running.
Service test1 is not running.


ANSWER
=======

What you are seeing is an expected and normal behaviour.

User defined services do not startup automatically after Instance re-start.

It should be understood that AUTO_START=always means services will start automatically after reboot and doesn't means
they will start automatically after database re-start.

However, enhancement request is already in place for this and is reviewed by Development as a possible enahancement for a future release.

<<Bug 4134280 >>
Status: Code Resolution
PREFERRED SERVICES LEFT 'OFFLINE' WHEN DATABASE IS SHUTDOWN / RESTARTED.

This enhancement request is internal and as such cannot be viewed by customer.

To explain in a bit more detail, let me try to give you some examples:

1. when you cleanly shutdown the database, whether using SRVCTL or SQLPlus, we change the TARGET state of the database, the database in
stances and the services to OFFLINE. The TARGET of OFFLINE, means that we des
ire these 'resources' to be offline, and we do not want CRS to attempt to resta
rt them.

2. When we start the database back up, whether using SRVCTL or SQLPlus, we set the TARGET value back to ONLINE for the database amd the database ins
tances. This way, CRS knows that the desired state of the instances is to be ONL
INE, and if CRS detects a failure, it will restart the instance(s).

3)It should be understood that Oracle intentionally do NOT set the services back to ONLINE,
because the services are meant as a way to do workload balancing. The reasonin
g behind this is that Oracle cannot know what services you want running, and whe
re you want them to be running after the restart, because some services may be s
et as PREFERRED for a node/instance, and some may be set as AVAILABLE. If we s
tart the services back up automatically on all instances, services may be starte
d on a node where it is not desired. Therefore, the decision was made to leave
the starting of the services up to the user - after a database is cleanly shutdo
wn and restarted, the DBA needs to decide which services to restart, based on th
e load-balancing requirements.

The enhancement request is to at least start up PREFERRED services - so that is being discussed as to how feasible/desirable tha
t is.

Until the enhancement is fixed, you need to manually start the services after instance re-start.

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
16#
发表于 2008-4-3 10:43 | 只看该作者
原帖由 phigon 于 2008-4-2 20:23 发表
...
3)It should be understood that Oracle intentionally do NOT set the services back to ONLINE,
because the services are meant as a way to do workload balancing. The reasonin
...
The enhancement request is to at least start up PREFERRED services - so that is being discussed as to how feasible/desirable that is.

Until the enhancement is fixed, you need to manually start the services after instance re-start.


Thank you, phigon. That was a very sensible note. I was scratching my head a lot on this, until I read that note.

I think they should say CRS restart when they say reboot. I.e., even if the server is not rebooted, as long as CRS is stopped and restarted, the auto_start setting for the *services* will take effect.

Yong Huang

使用道具 举报

回复
论坛徽章:
3
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2005-11-01 07:43:48会员2006贡献徽章
日期:2006-04-17 13:46:34
17#
发表于 2008-4-3 11:52 | 只看该作者
hehe,welcome.

Your understanding are same with mine.

phigon

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
18#
发表于 2008-4-3 23:01 | 只看该作者
Correction for some of my misunderstandings. (1) TARGET value OFFLINE doesn't necessarily mean the service is disabled. In fact, most of the time it's because the service or some other resources (such as DB) were cleanly stopped. (2) Bug 4134280 says cleanly shutting down *database* causes TARGET value to be set to OFFLINE. We tested it and confirmed it, running Oracle 10.2.0.4. We also tested cleanly stopping database *instances*, and the TARGET value is *not* set to OFFLINE, even if the instance was the only one that was up.

Yong Huang

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表