sqlplus conneted to an idle instance

简介: 数据库本身可以访问,但是在本机却是如下状态,11g都是这样子吗? 参考网页文档http://blog.itpub.








数据库本身可以访问,但是在本机却是如下状态,11g都是这样子吗?



Connected to an idle instance

oracle@node2 bin]$ export oracle_sid=RACDB
[oracle@node2 bin]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 8 03:08:59 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> 


但pl/sql中可以登陆。
select instance_name,host_name,archiver,thread#,status from gv$instance;
1        RACDB1        node2        STARTED        1        OPEN
2        RACDB2        node1        STARTED        2        OPEN

如果输入:会出现这样的报错: 

[oracle@node2 bin]$ export oracle_sid=RACDB2
[oracle@node2 bin]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 8 02:45:03 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/ora10g/product/10.2.0/db_1/dbs/initRACDB2.ora'

解决的办法: 

[oracle@node2 bin]$ export oracle_sid=RACDB
[oracle@node2 bin]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 8 18:58:34 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn system/oracle@RACDB
Connected.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RACDB1

其实只要

rac1-> srvctl status database -d devdb
能启动,说明数据库没问题.
据说这个是个BUG。
主题:  "Connected to an Idle Instance" Message when Connecting Bequeath to a Running Instance 
  文档 ID:  注释:435044.1 类型:  PROBLEM 
  上次修订日期:  23-APR-2008 状态:  PUBLISHED 

In this Document
  Symptoms
  Cause
  Solution
  References



--------------------------------------------------------------------------------



Applies to: 
Oracle Server - Enterprise Edition - Version: 8.0.6 to 11.1.0.6
This problem can occur on any platform.

Symptoms
While connecting bequeath to a running instance the following message appears : 

$ export ORACLE_SID=test 
$ sqlplus "/ as sysdba" 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 6 12:17:14 2007 

Copyright (c) 1982, 2005, Oracle. All rights reserved. 

Connected to an idle instance. 

SQL> 
The "test" instance was running and this was verified with the ps command:

$ ps -ef | grep pmon 
oracle 9714 1 0 May28 ? 00:00:07 ora_pmon_test 
oracle 32635 1 0 May30 ? 00:00:01 ora_pmon_orcl115b 
Furthermore the test instance can be started up:

$ export ORACLE_SID=test 
$ sqlplus "/ as sysdba" 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 6 12:17:14 2007 

Copyright (c) 1982, 2005, Oracle. All rights reserved. 

Connected to an idle instance. 

SQL> startup nomount 
ORACLE instance started. 

Total System Global Area 866291712 bytes 
Fixed Size 1302036 bytes 
Variable Size 239075820 bytes 
Database Buffers 620756992 bytes 
Redo Buffers 5156864 bytes 
SQL> 


The alert.log was immediately written with the informations pertaining to the startup of the operation. When a log switch was performed in the "real" test instance (within a SQL*NET connection)  then the alert.log was appended with the corresponding informations. So at that point on the system there were two instances "test" running from the same Oracle Home

$ ps -ef | grep pmon 
oracle 9714 1 0 May28 ? 00:00:07 ora_pmon_test 
oracle 32635 1 0 May30 ? 00:00:01 ora_pmon_orcl115b 
oracle 10382 1 0 12:27 ? 00:00:00 ora_pmon_test



Cause
The issue was caused by a wrong setting of the ORACLE_HOME environment variable used when starting up the instance. This can be easily discovered if one checks the values of the environment variables set within the background processes of the first "test"  instance started : 



$ ps -ef | grep pmon 
oracle 9714 1 0 May28 ? 00:00:07 ora_pmon_test 
oracle 32635 1 0 May30 ? 00:00:01 ora_pmon_orcl115b 
oracle 10382 1 0 12:27 ? 00:00:00 ora_pmon_test

cat /proc/9714/environ

HOSTNAME=ro-rac4 
SHELL=/bin/bash 
TERM=xterm 
HISTSIZE=1000 
USER=oracle 
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01:... 
ORACLE_SID=test 
MAIL=/var/spool/mail/oracle 
PATH=INPUTRC=/etc/inputrc 
PWD=/home/oracle 
LANG=en_US.UTF-8SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass 
SHLVL=1 
HOME=/home/oracleLOGNAME=oracleLESSOPEN=|/usr/bin/lesspipe.sh %s 
ORACLE_HOME=/u01/app/oracle/product//10.2.0/db_1 
G_BROKEN_FILENAMES=1_=/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus 
ORA_NET2_DESC=8,11ORACLE_SPAWNED_PROCESS=1 
SKGP_HIDDEN_ARGS=0

$ORACLE_HOME of the old test instance points to "ORACLE_HOME=/u01/app/oracle/product//10.2.0/db_1" . Note the double slash ("//".

whereas  $ORACLE_HOME of the new test instance points to "ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1"




ORACLE_SID and ORACLE_HOME are used to generate the IDs of the shared memory segments for the SGA. When using a different ORACLE_HOME value a different ID will get generated and since this does not match any of the existing segments' IDs it is assumed that this is a new idle instance. 

The above example shows how to get the environment variables for a process running on Linux. In order to get these variables for other platforms please read Note 373303.1-How to Check the Environment Variables for an Oracle Process 




Solution
Shutdown the instance and start it up from an OS session where all the environment variables are correctly set. If the instance is to be started via SRVCTL make sure that all the CRS configuration files are using a correct value for the ORACLE_HOME.

-OR-

If the running instance can't be shutdown set the ORACLE_HOME to the value found in the envrionment variables set of the running instance. 

References
Note 373303.1 - How to Check the Environment Variables for an Oracle Process

Keywords
START~INSTANCE; BACKGROUND~PROCESSES; ORACLE~PROCESS; NOMOUNT; SYSDBA; BEQUEATH; SRVCTL; START~INSTANCE; 
--------------------------------------------------------------------------------

Help us improve our service. Please email us your comments for this document. .

目录
相关文章
|
人工智能 弹性计算 边缘计算
2020年国内十大云计算商排名榜
云计算在中国经过数年发展后,技术和市场都越发成熟。随着性能和稳定的提高,成本的降低,个人和企业用户都开始逐步接受云服务,但无论在全球范围还是中国范围内,云计算市场还只是起步阶段。 中国云市场来看,表面看似巨头已经瓜分天下,但实际上,出色的新秀在不断涌现,利用自己的特色优势在细分市场中分一杯羹。笔者根据企业实力,产品性能、性价比、服务评价等方面选出了市场认可度高的中国十大公有云计算服务商云计算服务商。
|
存储 运维 监控
超越传统模型:从零开始构建高效的日志分析平台——基于Elasticsearch的实战指南
【10月更文挑战第8天】随着互联网应用和微服务架构的普及,系统产生的日志数据量日益增长。有效地收集、存储、检索和分析这些日志对于监控系统健康状态、快速定位问题以及优化性能至关重要。Elasticsearch 作为一种分布式的搜索和分析引擎,以其强大的全文检索能力和实时数据分析能力成为日志处理的理想选择。
744 6
|
JavaScript
Vue2使用v-model封装ElementUI_Input组件
本文介绍了在Vue2中如何使用v-model封装ElementUI的Input组件。封装后的组件可以根据传入的title属性决定是否显示标题,支持正则表达式校验,并提供了在Vue页面中的使用示例。
454 5
|
11月前
|
存储 数据处理 数据中心
1U和2U服务器应如何正确选择?各有什么优缺点?
标准机架式服务器以U为高度单位,1U和2U服务器因高度差异影响其内部空间和扩展能力。1U服务器体积小巧、性价比高但扩展性受限;2U服务器扩展性强、散热好、稳定性高,但托管费用较高。选择时需根据具体需求权衡。
341 6
|
Linux
Linux命令之iconv
Linux命令之iconv
255 1
|
运维 安全 网络安全
Digicert 证书
DigiCert是全球领先的数字证书颁发机构,提供SSL/TLS、代码签名等多种证书服务,确保网络通信安全。其证书以高安全性、广泛兼容性及优质客户服务著称。DigiCert的EV SSL证书能严格验证网站身份,增强用户信任。通过代码签名,保证软件未经篡改。适用于商业网站和电商,提供高级安全保障。在网络安全日益重要的今天,DigiCert证书是值得信赖的选择,为数字化世界保驾护航。
366 0
|
弹性计算
关于阿里云乌兰察布ECS突发性能t6型云服务器的性能评测
关于阿里云乌兰察布ECS突发性能t6型云服务器的性能评测,总体来说实测体验感极好,网络延迟评测结果不错,十分推荐入手体验。
关于阿里云乌兰察布ECS突发性能t6型云服务器的性能评测
|
机器学习/深度学习 人工智能 算法
华为昇腾,AI推理性能超越对手一倍:软件挖掘处理器全部潜力
华为的 Atlas,一次就让业界最佳水平翻了一倍。
1264 0
华为昇腾,AI推理性能超越对手一倍:软件挖掘处理器全部潜力
|
机器学习/深度学习 人工智能 自然语言处理
6.2万字报告剖析「智能写作」全貌,从落地产品看NLP商业化突破
近年来字节跳动、百度、阿里巴巴、美团点评、微软等各大互联网巨头纷纷加注智能创作/写作,并已在自有资讯、内容平台、电商、办公文书等业务场景中广泛应用;同时达观数据、智搜、妙笔智能、文因互联等 NLP 领域领先创业公司扎根营销文案、文本业务自动化、金融数据分析等场景,让 NLP 技术产生更显著的商业价值。 「智能写作」让我们看到论文中 SOTA 的 NLP 模型也可以被快速应用到工业场景中,辅助或直接成为人类的生产力。因此我们针对这一技术应用领域,搜集了数百余篇论文、第三方市场报告及国内外新闻报道,并采访了多位国内智能写作公司与产品线的产品经理或技术负责人,撰写了 6.2 万字报告,从基础概念到
2007 0
6.2万字报告剖析「智能写作」全貌,从落地产品看NLP商业化突破
Uma
|
存储 算法 大数据
与“十“俱进 阿里数据库运维10年演进之路
阿里巴巴集团拥有超大的数据库实例规模,在快速发展的过程中我们在运维管理方面也在不断的面临变化,从物理器到容器、从独占到混布、从本地盘到存储计算分离、从集团内到大促云资源,从开源的MySQL到自研分布式数据库,运维管控进行了自我革新与进化
Uma
3722 1