ORA-00119: invalid specification ORA-00132: syntax error

半腔热情 提交于 2019-12-04 12:56:24

Your initialisation parameter is looking for an alias LISTENER; and you've shown that exists in your listener.ora, but the database does not look at that file - it may not even be able to read it.

If you specify an alias then it has to exist in the tnsnames.ora file, so add a matching same entry to that file:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

Or alternatively set your initialisation parameter to the connect string rather than an alias, so it doesn't need to refer to tnsnames.ora:

*.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))'

Try below procedure. It worked for me.

C:\Users\Hp>sqlplus SYSTEM as SYSDBA   
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 3 12:28:32 2016    
Copyright (c) 1982, 2010, Oracle.  All rights reserved.    
Enter password:    
Connected to an idle instance.    
SQL> startup  
ORA-00119: invalid specification for system parameter LOCAL_LISTENER    
ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'    
SQL> create pfile from spfile;    
File created.    
**************************    
Now open the PFILE (INIT%ORACLE_SID%.ORA) from %ORACLE_HOME%\database
Search for string local_listener='LISTENER_ORCL' and remove it and save the file.     
**************************    
SQL> startup nomount pfile='C:\app\Hp\product\11.2.0\dbhome_1\database\INITorcl.ORA'    
ORACLE instance started.    
Total System Global Area 1686925312 bytes
Fixed Size                  2176368 bytes
Variable Size            1291848336 bytes
Database Buffers          385875968 bytes
Redo Buffers                7024640 bytes    
SQL> create spfile from pfile;   
File created.    
SQL> startup    
ORA-01081: cannot start already-running ORACLE - shut it down first    
SQL> shutdown    
ORA-01507: database not mounted    

ORACLE instance shut down.    
SQL> startup    
ORACLE instance started.    
Total System Global Area 1686925312 bytes
Fixed Size                  2176368 bytes
Variable Size            1291848336 bytes
Database Buffers          385875968 bytes
Redo Buffers                7024640 bytes
Database mounted.
Database opened.    
SQL>
 (SID_DESC =
   (GLOBAL_DBNAME = EDMP1)
   (ORACLE_HOME = C:\app\oracle\product\11.2.0\dbhome_1)
   (SID_NAME = EDMP1

C:\app\product\12.1.0\dbhome_1\network\admin\sqlnet.ora

C:\app\product\12.1.0\dbhome_1\network\admin\listener.ora
  • ORACLE_HOME - Your ORACLE_HOME environment variable is incorrectly set. You have multiple ORACLE_HOME(s), one is pointing to 11.2.0 and the other is pointing to 12.1.0.

  • LOCAL LISTENER - More importantly, set the LOCAL LISTENER properly.

  • STATIC registration - Another thing, why do you use STATIC listener registration? Remove the SID_LIST_LISTENER. It uses static registration, and that's the reason that you see STATUS as UNKNOWN service. Let it register dynamically.

  • PLUGGABLE DATABASE - If you are on 12c, and if you have created it as PLUGGABLE DATABASE, then you must include the PDB details in the tnsnames.ora file. Else, you would by default connect to CDB when you do SQLPLUS / AS SYSDBA.

Please read Oracle 12c Post Installation Mandatory Steps.

Had a similar problem. In my case it was solved by changing hostname.

Found that local_listener variable is calculated somewhere based on hostname which was initiated random, so the value incorrect.

Changed it in /etc/sysconfig/network and set it with hostname myshost.mydomain. Did not edit /etc/hosts cause i already have dns set up, but otherwise it could be necessary.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!