1. 找到listener.ora监听文件,具体位置如:
C:appAdministratorproduct11.2.0dbhome_1 etworkadminlistener.ora
2. 在lisener.ora文件中添加下方加红加粗部分:
# listener.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1 etworkadminlistener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:C:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll") ) (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1) (SID_NAME = ORCL) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-UBKOOK0BP2K.geostar.com.cn)(PORT = 1521)) ) ) ADR_BASE_LISTENER = C:appAdministrator
3.相同目录下tnsnames.ora文件内容如下,参考使用:
# tnsnames.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1 etworkadmin nsnames.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 = (PROTOCOL = TCP)(HOST = WIN-UBKOOK0BP2K.geostar.com.cn)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
4、重启服务
1). 先停监听,后停实例。
2). 先起实例,后起监听。