路径:D:\app\admin\product\12.1.0\dbhome_1\NETWORK\ADMIN
listener.ora文件:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\sdc\product\12.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = “EXTPROC_DLLS=ONLY:D:\app\sdc\product\12.2.0\dbhome_1\bin\oraclr12.dll”)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = D:\app\sdc\product\12.2.0\dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
tnsnames.ora 文件:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = KM-WL-118.kaimadata.cn)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = KM-WL-118.kaimadata.cn)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.kaimadata.cn)
)
)
1、GLOBAL_DBNAME 为连接时的用户名 ORCL ,可以修改,SID_NAME不能修改,且要与tnsnames.ora文件保持一致。
2、端口号也可以修改,保持一致就行,默认端口号为1521