windows上oracle11配置监听器 博客分类: 数据库
程序员文章站
2024-03-15 12:06:53
...
oracle11 windows版安装后默认通过计算机名"windows-tom"进行监听,连接时,只能用服务名进行连接如windows-tom:1521/orcl,对开发来说十分不便,需要改为通过IP监听和通过sid进行连接。
配置过程如下:
oracle主目录为E:\oracle\product\11.2.0\dbhome_1
重启listener服务
配好的listener.ora文件内容为
tnsnames.ora文件内容
plsql配置
配置过程如下:
oracle主目录为E:\oracle\product\11.2.0\dbhome_1
重启listener服务
配好的listener.ora文件内容为
# listener.ora Network Configuration File: E:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = E:\oracle\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:E:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = E:\oracle\product\11.2.0\dbhome_1) (SID_NAME = ORCL) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.200.113)(PORT = 1521)) ) ) ADR_BASE_LISTENER = E:\oracle
tnsnames.ora文件内容
# tnsnames.ora Network Configuration File: E:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora # Generated by Oracle configuration tools. ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) ) ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.200.113)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
plsql配置
#D:\Programs\instantclient_12_1\Network\Admin\tnsnames.ora orcl200.113 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.200.113)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SID = orcl) ) )