Oracle 10g配置不正确造成的错误分析及解决方案是本文我们主要要介绍的内容,接下来我们就一起来熟悉一下这部分内容吧。
在Oracle 10g安装好后链接数据库时发生以下问题:
TNS:listener does not currently know of SID given in connect descriptor
Io 异常: The Network Adapter could not establish the connection
原因分析:
第一种可能是配置得数据库SID名不正确localhost:1521:oracle即红字部份不是你本机的SID。
第二种可能发现SID配置没有错误,但是还是报错,那可能就是oracle得监听配置出了问题,需要检查listener.ora文件,用记事本打开,增加以下部份代码:
- (SID_DESC =
- (GLOBAL_DBNAME = orcl)
- (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
- (SID_NAME = orcl)
- )
红字部份的SID改成oracle创建时候的SID(10g一般默认为orcl)保存退出。
完整的listener.ora
- # listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_2\network\admin\listener.ora
- # Generated by Oracle configuration tools.
- SID_LIST_LISTENER =
- (SID_LIST =
- (SID_DESC =
- (SID_NAME = PLSExtProc)
- (ORACLE_HOME = E:\oracle\product\10.2.0\db_2)
- (PROGRAM = extproc)
- )
- (SID_DESC =
- (GLOBAL_DBNAME = orcl)
- (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
- (SID_NAME = orcl)
- )
- )
- LISTENER =
- (DESCRIPTION_LIST =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
- (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
- )
- )
配置tnsnames.ora
- # tnsnames.ora Network Configuration File: E:\oracle\product\10.2.0\db_2\network\admin\tnsnames.ora
- # Generated by Oracle configuration tools.
- ORCL =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
- (CONNECT_DATA =
- (SERVER = DEDICATED)
- (SERVICE_NAME = orcl)
- )
- )
- EXTPROC_CONNECTION_DATA =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
- )
- (CONNECT_DATA =
- (SID = PLSExtProc)
- (PRESENTATION = RO)
- )
- )
关于Oracle 10g配置不正确造成的错误分析及解决方法就介绍到这里了,希望本次的介绍能够对您有所收获!
【编辑推荐】