1. 引言
Oracle 10g ,我认为最大的革新就是安装越来越人性化、傻瓜化,一个牒就搞定了。
但是Oracle 10g 在Windows平台上,特别是32bit机器,有着几个相对严重的bug,而且一直都没修正,
其bug我认为是:listener 和 OracleDBConsole(使用一个月后出的问题,我还没碰到),这些问题都是比较简单的,
不过初学者在安装Oracle的时候,还是会碰到这样的问题的。
1.Listener的问题。
安装完毕后,使用的时候却遇到了麻烦:如果只是本机的访问, sqlplus system/manager这样是没有问题的。但是如果使用 sqlplus system/manager@orcl 或者用 Toad 访问的时候,却会报ora-12514的错误。TNS:listener is not found SID.
解决方法:
1. 打开<OracleHome>/network/admin/listener.ora文件,找到:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:databaseoracle)
(PROGRAM = extproc)
)
)
2. 在SID_LIST下添加一个子项:
(SID_DESC =
(GLOBAL_DBNAME = HYINT)
(ORACLE_HOME = E:databaseoracle)
(SID_NAME = HYINT)
)
3. 最后listener的SID_LIST_LISTENER为变成:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:databaseoracle)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = HYINT)
(ORACLE_HOME = E:databaseoracle)
(SID_NAME = HYINT)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.96)(PORT = 1521))
)
)
)
4. 保存文件,然后重启服务中的TNSListener,问题解决。
Oracle10g有一个好处:不再与Tomcat的端口冲突了。原来的Oracle9i安装完成后,8080端口就会被占用,
一般都需要改tomcat的端口。现在Oracle10g已经只独占1521现在终于轻松了。
目前我的正确配置:
Listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:databaseoracle)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = HYINT)
(ORACLE_HOME = E:databaseoracle)
(SID_NAME = HYINT)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.96)(PORT = 1521))
)
)
)
Tnsnames:
HYINT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.96)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = hyint)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)