找到一个文本文件:
E:\oracle\NETWORK\ADMIN\listener.ora 还一个在同路径下的tnsnames.ora文件(这是我自己的安装路径)
打开listener.ora:
# listener.ora Network Configuration File: E:\oracle\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = E:\oracle)
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
标红的是我新加的,然后重启oracle服务就行了。