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服務就行了。