配置静态监听sid_name大小写造成无法登录(一)

2014-11-24 17:17:57 · 作者: · 浏览: 1

配置静态监听时SID_NAME名字大小写造成的远程登录失败。


由于原来的1521端口要给另一个实例使用,现在的这个实例要使用另外的端口客户的就使用静态监听在设置完重启监听后远程登录出错.


SQL> conn test/test@127
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


查看oracle home目录和oracle_sid
[oracle@ggfwweb admin]$ echo $ORACLE_HOME
/u01/app/oracle/10gR2/db
[oracle@ggfwweb admin]$ echo $ORACLE_SID
hygeia
[oracle@ggfwweb admin]$ ps -ef | grep pmon
oracle 25830 1 0 09:39 00:00:00 ora_pmon_hygeia
oracle 25950 25585 0 09:59 pts/1 00:00:00 grep pmon


查看监听文件文件
[oracle@ggfwweb admin]$ cd $ORACLE_HOME/network/admin
[oracle@ggfwweb admin]$ ls
listener.ora listener.ora.bak samples shrept.lst tnsnames.ora
[oracle@ggfwweb admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/10gR2/db/network/admin/listener.ora
# Generated by Oracle configuration tools.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/10gR2/db)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = HYGEIA)
(ORACLE_HOME = /u01/app/oracle/10gR2/db)
(SID_NAME = HYGEIA)
)
)


LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.142.11.108)(PORT = 1568))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
可以看到监听文件中使用的是HYGEIA,而ORACLE_SID是hygeia


将SID_NAME=HYGEIA修改为SID_NAME=hygeia后重启监听
[oracle@ggfwweb admin]$ lsnrctl stop


LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 03-JUL-2014 10:03:32


Copyright (c) 1991, 2010, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.142.11.108)(PORT=1568)))
The command completed successfully


[oracle@ggfwweb admin]$ lsnrctl start


LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 03-JUL-2014 10:03:53


Copyright (c) 1991, 2010, Oracle. All rights reserved.


Starting /u01/app/oracle/10gR2/db/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/app/oracle/10gR2/db/network/admin/listener.ora
Log messages written to /u01/app/oracle/10gR2/db/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.142.11.108)(PORT=1568)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.142.11.108)(PORT=1568)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 03-JUL-2014 10:03:53
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/10gR2/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/10gR2/db/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.142.11.108)(PORT=1568)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "hygeia" has 1 instance(s).
Instance "hygeia", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle