vendredi 17 juin 2016

ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

My problem started with an idle instance. I am trying to connect to my local XE instance with SQL Developer.

I have tried numerous links on Google and probably if you provide some solution I can readily tell you that I tried those but still looking forward to solve it.

Additional information:

  1. All other conn strings in SQL Developer are working just fine.
  2. Tried restarting DB with /nolog and all.....
  3. Tried alter system....
  4. I can connect to orcl (my local sid name) with sys privileges correctly, only problem is with dummy user HR which comes with Oracle.
  5. I could able to resolve the original idle instance problem
  6. Connecting with SQL*Plus with the bare string : description ... gave me error

    Error 6 initializing SQL*Plus  
    SP2-0667: Message file sp1<lang>.msb not found  
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    
  7. My Oracle home is "C:app\product11.2.0dbhome_1NETWORKADMIN"

Attached is the listener.ora (first line is commented but when I put # in so it turned bold so please consider it is commented ) :

#ADR_BASE_LISTENER = C:app387759

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:app387759product11.2.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:app387759product11.2.0dbhome_1binoraclr11.dll")
    )
    (SID_DESC =
      (GLOBAL_DBNAME = XE)
      (ORACLE_HOME = C:app387759product11.2.0dbhome_1)
      (SID_NAME = ORCL)
    )
  )

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

ADR_BASE_LISTENER = C:app387759product11.2.0dbhome_1log

Now the error from cmd (as admin) is :

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

Also the concerning entries (apart from other working ones) in tnsnames.ora are:

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.36.160.158)
    )
  )

Also, please consider I could resolve the idle instance problem and hence it is no more.

387759 is my username to the machine. 

Additional information, only change I did while fixing the idle instance problem, and that is removing the line

*.local_listener='LISTENER_ORCL'

from InitORCL.ora file and then created the spfile again from pfile but just now I added it again to the pfile and then created spfile.

Cmd line started giving me error:

SQL> startup    
ORA-00119: invalid specification for system parameter LOCAL_LISTENER    
ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'    
SQL>

so in theory I am back to the problem where I could not startup the oracle instance.

After not being able to locate the pfile in mentioned location (in the comment), I tried using the command

show parameter spfile;

I got following :

SQL> show parameter spfile; ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

One additional info, I can see only 2 of the services running under services.msc

OracleOraDb11g_home1TNSListener
OracleServiceORCL

I manually start them when I need to use local oracle else I keep them not started mode to save some RAM. Other oracle related services I just keep shut almost all the time and also at this time when I am getting error.Could this help to narrow down the problem

`

Aucun commentaire:

Enregistrer un commentaire