RAC中ORACLE_SID区分大小写(11.2.0.1)

做实验,登录一个节点, 发现切换到oracle用户,然后直接sqlplus,显示数据库未启动
-bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 9月 13 14:39:24 2013

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

Connected to an idle instance.

SQL> 

但是,数据库确实是启动的
-bash-4.1$ crs_stat -t -v
名称           类型           R/RA   F/FT   目标      状态      主机        
----------------------------------------------------------------------
ora.DATADG.dg  ora....up.type 0/5    0/     ONLINE    ONLINE    ais1        
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    ais1        
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    ais1        
ora.SYSDG.dg   ora....up.type 0/5    0/     ONLINE    ONLINE    ais1        
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    ais1        
ora....S1.lsnr application    0/5    0/0    ONLINE    ONLINE    ais1        
ora.ais1.gsd   application    0/5    0/0    OFFLINE   OFFLINE               
ora.ais1.ons   application    0/3    0/0    ONLINE    ONLINE    ais1        
ora.ais1.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    ais1        
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    ais2        
ora....S2.lsnr application    0/5    0/0    ONLINE    ONLINE    ais2        
ora.ais2.gsd   application    0/5    0/0    OFFLINE   OFFLINE               
ora.ais2.ons   application    0/3    0/0    ONLINE    ONLINE    ais2        
ora.ais2.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    ais2        
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    ais1        
ora.eons       ora.eons.type  0/3    0/     ONLINE    ONLINE    ais1        
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE               
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    ais1        
ora.oc4j       ora.oc4j.type  0/5    0/0    OFFLINE   OFFLINE               
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    ais1        
ora.prod.db    ora....se.type 0/2    0/1    ONLINE    ONLINE    ais1        
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    ais1

原因为,oracle用户的.bash_profile中的ORACLE_ID为大写

-bash-4.1$ echo $ORACLE_SID
PROD1
-bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 9月 13 14:38:33 2013

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

Connected to an idle instance.

SQL> exit
Disconnected

修改一下,正常连接
-bash-4.1$ export ORACLE_SID=prod1
-bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 9月 13 14:39:52 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> 

但是直接通过VIP加数据库名的方式连接不区分大小写

-bash-4.1$ sqlplus aisj/aisj@192.168.3.7/PROD 

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 9月 13 14:41:32 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options



-bash-4.1$ sqlplus aisj/aisj@192.168.3.7/PRod

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 9月 13 14:41:39 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21124603/viewspace-772676/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/21124603/viewspace-772676/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值