日期:2014-05-16  浏览次数:20415 次

单机连接oracle数据库配置

单机连接ORACLE,只需配置以下文件:

?

\oracle\product\10.2.0\db_1\NETWORK\ADMIN目录下

?

listener.ora文件:

?

# listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\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_1)
????? (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))
??? )
??? (DESCRIPTION =
????? (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
??? )
? )

tnsnames.ora文件:

# tnsnames.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

122 =
? (DESCRIPTION =
??? (ADDRESS_LIST =
????? (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.122)(PORT = 1521))
??? )
??? (CONNECT_DATA =
????? (SERVICE_NAME = orcl)
??? )
? )

ORCL =
? (DESCRIPTION =
??? (ADDRESS_LIST =
????? (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(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)
??? )
? )

?