今天通过Oracle SQL*Plus连接远端服务器的时候提示“监听程序当前无法识别连接描述符中请求服务”,遂在网上找到了解决方案:
①打开Oracle服务器安装目录\NETWORK\ADMIN\listener.ora文件,你会看到如下信息:
# listener.ora Network Configuration File: D:\database\Oracle\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\database\Oracle) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ms-c459ece7aa7f)(PORT = 1521)) ) )
②在(SID_LIST=...)后面添加一句话,其中Demo是Oracle监听的实例名:
# listener.ora Network Configuration File: D:\database\Oracle\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\database\Oracle) (PROGRAM = extproc) ) (SID_DESC = (GLOBAL_DBNAME = V3X) (ORACLE_HOME = D:\database\Oracle) (SID_NAME = V3X) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ms-c459ece7aa7f)(PORT = 1521)) ) )
③重启Oracle Listener再连接即可