oracle ORA-00119, ORA-00132问题解决

时间:2021-12-21 05:50:02

使用PL/SQL登录oracle报ORA-12154: TNS: 无法解析指定的连接标识符
sqlplus /nolog
connect /as sysdba
startup
报如下错误:
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'

LOCAL_LISTENER为D:\app\Administrator\product\11.2.0\dbhome_1\database\SPFILEORCL.ORA文件中*.local_listener参数
LISTENER_ORCL为*.local_listener参数值,如:*.local_listener='LISTENER_ORCL'

ORA-00119,ORA-00132是因为*.local_listener='LISTENER_ORCL'的值,即LISTENER_ORCL在D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora文件中未申明,需求修改配置文件即可。

LISTENER_ORCL =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 1521))
    )
  )