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
3 Answers 3
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:
Open Oracle SQL Developer.
In the Connections navigator, right-click Connections and select New Connection.
Enter test for the Connection Name (or any other name that identifies your connection), hr for the Username and Password, specify your
localhost
for theHostname
and enterORCL10
(in your case, as it showing in your attached picture) for theSID
. Click Test.The status of the connection was tested successfully. The connection was not saved however. Click Save to save the connection, and then click Connect.
-
This is irrelevant to this error.Balazs Papp– Balazs Papp2018年01月24日 09:30:59 +00:00Commented 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.Md Haidar Ali Khan– Md Haidar Ali Khan2018年01月24日 09:36:16 +00:00Commented Jan 24, 2018 at 9:36
-
1This 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.Balazs Papp– Balazs Papp2018年01月24日 09:49:43 +00:00Commented Jan 24, 2018 at 9:49
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
-
I can login using '\ as sysdba' It says connect to 12c standard edition release ...Elias– Elias2018年01月24日 10:52:16 +00:00Commented 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– EdStevens2018年01月24日 22:36:24 +00:00Commented 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– Elias2018年01月25日 04:22:45 +00:00Commented 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– miracle1732018年02月04日 07:30:15 +00:00Commented Feb 4, 2018 at 7:30
- Ensure that you are on the correct home
- Ensure that the listener is started
- Make sure that the listener, tnsnames files include the database entries
lsnrctl status
?