如果出现ORA-12514的错误,那么需要找到文件F:\app\khe\product\11.2.0\dbhome_3\NETWORK\ADMIN\listener.ora
==============================
打开文件, 把红色部分添加上去
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\app\khe\product\11.2.0\dbhome_3)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\app\khe\product\11.2.0\dbhome_3\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = MYORACLE)
(ORACLE_HOME = F:\app\khe\product\11.2.0\dbhome_3)
(SID_NAME = MYORACLE)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = D305875.asiapacific.epicor.net)(PORT = 1522))
)
)
ADR_BASE_LISTENER = F:\app\khe
==============================
其中,GLOBAL_DBNAME, 可以通过查询语句
select * from global_name 查询
ORACLE_HOME 和上一部分一样。SID_NAME 和GLOBAL_DBNAME一样。
重启listener 服务。
在登录的表单中,HostName 和port要和蓝色部分的一样,如果是本机可以填写localhost. Service Name就是GLOBAL_DBNAME一样。