Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-12505 while creating new connection in Oracle SQL Developer

I installed few moments later the Oracle database XE 18.4.0.0.0 (18c). Next I downloaded the Oracle SQL Developer tool and I tried to create a new connection, but I'm getting this error:

enter image description here

The master password is correct and the listerner is running, (UPDATED after @EdStevens reply):

C:\WINDOWS\system32> lsnrctl start

LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 22-OTT-2020 09:04:27

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Avvio di tnslsnr: attendere...

TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Il file dei parametri di sistema Þ C:\app\gabri\product\18.0.0\dbhomeXE\network\admin\listener.ora
Ascolto su: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connessione a (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATO del LISTENER
------------------------
Alias                     LISTENER
Versione                  TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Data di inizio            22-OTT-2020 09:04:34
Tempo di attivitÓ           0 giorni 0 ore 0 min. 12 sec.
Livello trace             off
Sicurezza                 ON: Local OS Authentication
SNMP                      OFF
File di parametri listenerC:\app\gabri\product\18.0.0\dbhomeXE\network\admin\listener.ora
Summary table degli endpoint di ascolto...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Summary table dei servizi...
Il servizio "CLRExtProc" ha 1 istanze.
  L'istanza "CLRExtProc", stato UNKNOWN, ha 1 handler per questo servizio...
Il servizio "database" ha 1 istanze.
  L'istanza "XE", stato UNKNOWN, ha 1 handler per questo servizio...
Il comando Þ stato eseguito

Here my listener.ora:

# listener.ora Network Configuration File: C:\app\gabri\product\18.0.0\dbhomeXE\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

DEFAULT_SERVICE_LISTENER = XE

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\gabri\product\18.0.0\dbhomeXE)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\gabri\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
    )
  )

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

And tnsnames.ora:

# tnsnames.ora Network Configuration File: C:\app\gabri\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

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

I hope that someone can help me!

Thanks in advance

EDIT:

C:\WINDOWS\system32>echo %ORACLE_HOMEd%
%ORACLE_HOMEd%

C:\WINDOWS\system32>echo %ORACLE_SID%
%ORACLE_SID%

C:\WINDOWS\system32>sqlplus / as sysdba'

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ott 22 14:27:19 2020
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-12560: TNS: errore dell'adattatore del protocollo


Immettere il nome utente: SYSTEM
Immettere la password:
ERROR:
ORA-12560: TNS: errore dell'adattatore del protocollo


Immettere il nome utente:
like image 866
Gabrysse Avatar asked Jul 02 '26 12:07

Gabrysse


1 Answers

First, the error 'listener does not know of sid' is absolutley correct. We see from 'lsnrctl status' that no database is registered with the listener. So until you get a database actually started and registered with the listener, nothing else matters.

Second, once you do get a database running, your SQL Dev 'connection type' of 'basic' means you are supplying all necessary connection info directly, and tnsnames.ora is not called into play. NOthing wrong with that, but if you do want to use tnsnames, then change your connection type to 'tns'. The necessary input fields with change accordingly.

Third, as mentioned, whether you use tns or basic connection, you want to specify service name, not sid.

like image 53
EdStevens Avatar answered Jul 05 '26 06:07

EdStevens