0

I get the following error: Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor. My services are below and my connection window. I believe the installation of oracle 12c was a success. Do you guys know what could be wrong, please. enter image description here

enter image description here enter image description here enter image description here enter image description here

enter image description here

13
  • I think you are making mistake to give user connection name "SYS as SYSDBA'. First unlock the user like (alter user 'hr' identified by hr account unlock;) Jan 24, 2018 at 8:39
  • Is the database instance started? (OracleServiceorcl10 service). What is the output of lsnrctl status? Jan 24, 2018 at 9:27
  • orcl10 has an instance, but not OracleServiceorcl10. I get the following message:
    – Elias
    Jan 24, 2018 at 19:09
  • Service "orcl10" has 1 instance(s). Instance "orcl10", status READY, has 1 handler(s) for this service...
    – Elias
    Jan 24, 2018 at 19:12
  • Service "orcl10XDB" has 1 instance(s). Instance "orcl10", status READY, has 1 handler(s) for this service... Service "orcl9" has 1 instance(s). Instance "orcl9", status READY, has 1 handler(s) for this service... Service "orcl9XDB" has 1 instance(s). I also get: Instance "orcl9", status READY, has 1 handler(s) for this service... Service "pdborcl" has 2 instance(s). Instance "orcl10", status READY, has 1 handler(s) for this service... Instance "orcl9", status READY, has 1 handler(s) for this service... The command completed successfully
    – Elias
    Jan 24, 2018 at 19:12

3 Answers 3

-1

First Logged in SQLPlus and Unlock the user

Run SQLPlus, connect as SYS user (use administrator's password you have entered during installation) . Suppose that here For your test connection unlock HR user and give him a new password:

C:\>sqlplus  sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 24 12:15:51 2018

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

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> alter user hr identified by new_password;

User altered.

SQL> alter user hr account unlock;

User altered.

For Creating a Database Connection

The first step to managing database objects using Oracle SQL Developer is to create a database connection.Perform the following steps:

  1. Open Oracle SQL Developer.

  2. In the Connections navigator, right-click Connections and select New Connection.

  3. Enter test for the Connection Name (or any other name that identifies your connection), hr for the Username and Password, specify your localhost for the Hostname and enter ORCL10(in your case, as it showing in your attached picture) for the SID. Click Test.

  4. The status of the connection was tested successfully. The connection was not saved however. Click Save to save the connection, and then click Connect.

For further your ref Here , Here & Here

3
  • This is irrelevant to this error. Jan 24, 2018 at 9:30
  • @ Balazs Papp , As per OP screen shot , it seems like that OP didn't unlock the connection user . Even though OP is not giving the proper connection name in SQL Developer. May be this is primary troubleshooting for making a connection. Jan 24, 2018 at 9:36
  • 1
    This has nothing to do with users. The connection request does not even reach the database so it does not get to the authentication phase. This is very clear from the error. Jan 24, 2018 at 9:49
-1

I tried altering the user In SQL plus but I get the following error. But, thanks for the response.

Also, I cannot remember my user name. But, I know the administrative password. enter image description here

4
  • I can login using '\ as sysdba' It says connect to 12c standard edition release ...
    – Elias
    Jan 24, 2018 at 10:52
  • Why did you repeat the sqlplus command when you were clearly being prompted for a username? The simple command (at the OS command line) 'sqlplus / as sysdba' will connect you as SYS to the database specified by the current setting of ORACLE_SID. Since you obviously have multiple databases of multiple versions, you should create a command file for each, to set ORACLE_SID and ORACLE_HOME appropriately.
    – EdStevens
    Jan 24, 2018 at 22:36
  • when i stopped the service orcl9 and just had orcl10 open, and used the port 1523, then it worked. Thanks all.
    – Elias
    Jan 25, 2018 at 4:22
  • this is not an answer. please edit the question and add this information and then delete this answer.
    – miracle173
    Feb 4, 2018 at 7:30
-1
  1. Ensure that you are on the correct home
  2. Ensure that the listener is started
  3. Make sure that the listener, tnsnames files include the database entries

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.