oracle+sid重复,设置到相同SID仍无法连接实例

今天有同事问,为什么设置了正确的SID后仍然连接到空闲实例,且启动到MOUNT状态就报错。

根据他的描述,基本上可以判断是ORACLE_HOME的设置问题,于是做了一个简单的例子重新了这个问题:

[orat0@hpserver2 ~]$ env|grep

ORACLE

ORACLE_SID=orcl10g

ORACLE_BASE=/t0/orat0/app/oracle

ORACLE_HOME=/t0/orat0/app/oracle/product/10.2.0/db_1

[orat0@hpserver2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 -

Production on Thu Mar 22 16:06:48 2012

Copyright (c) 1982, 2010, Oracle.

All Rights Reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 524288000

bytes

Fixed Size 2097560 bytes

Variable Size 146804328 bytes

Database Buffers 373293056 bytes

Redo Buffers 2093056 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 -

64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[orat0@hpserver2 ~]$ export

ORACLE_HOME=/t0/orat0/app/oracle/product/10.2.0/db_1/

[orat0@hpserver2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 -

Production on Thu Mar 22 16:07:21 2012

Copyright (c) 1982, 2010, Oracle.

All Rights Reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 524288000

bytes

Fixed Size 2097560 bytes

Variable Size 146804328 bytes

Database Buffers 373293056 bytes

Redo Buffers 2093056 bytes

ORA-01102: cannot mount database in EXCLUSIVE mode

Oracle在启动实例时,根据ORACLE_HOME和ORACLE_SID的值来唯一确定实例的,虽然/t0/orat0/app/oracle/product/10.2.0/db_1和/t0/orat0/app/oracle/product/10.2.0/db_1/是同一个目录,但是对Oracle而言,二者是不同的,因此在启动实例的时候,会启动额外的实例。

而尝试MOUNT时,由于尝试加载相同的控制文件,导致了上面的报错。

此外,如果ORACLE_HOME的设置不同,还可能造成监听的异常。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值