6 Replies Latest reply on Aug 15, 2014 1:50 PM by Satishbabu Gunukula

    Cannot create new connection to database in sql developer

    2729786

      I am starting out with oracle's sql developer, using this tutorial:

      Getting Started with Oracle SQL Developer 4.0

      When attempting to test the connection, I get this 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

       

      I would appreciate some insight on this problem.

       

      Thank you

        • 1. Re: Cannot create new connection to database in sql developer
          I am starting out with oracle's sql developer, using this tutorial:

          Getting Started with Oracle SQL Developer 4.0

          When attempting to test the connection, I get this 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

          We can't offer any specific help since you haven't posted the details of what information you entered for: hostname, port, connection type, sid/service name, etc

           

          1. You need to already have a database 'somewhere' to connect to.

          2. You need to provide the correct info for YOUR database - the values on the screens in that tutorial will NOT be correct. That tutorial uses a service name of 'pdb1'. Is that what your service name is?

           

          If the DB is NOT on your machine then 'localhost' is NOT going to be correct.

          1 person found this helpful
          • 2. Re: Cannot create new connection to database in sql developer
            2729786

            Thank you for your insight, I did not put in a service name, since that was not in the tutorial. Now I am having an issue logging in:

             

            Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied

             

            I remember a password configuration stage during the database install, but the password/username I set in there does not seem to be working. Is there a way to configure the passwords/usernames of a database after installing it?

             

            Thank you

            • 3. Re: Cannot create new connection to database in sql developer
              I did not put in a service name, since that was not in the tutorial.

               

              Yes it WAS in the tutorial as I said above:

              That tutorial uses a service name of 'pdb1'. Is that what your service name is?

              But you need to use YOUR service name or sid.

              Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied

               

              I remember a password configuration stage during the database install, but the password/username I set in there does not seem to be working. Is there a way to configure the passwords/usernames of a database after installing it?

              Not sure what you are referring to since you do NOT 'set' a username during a database install. You provide passwords for the SYS and SYSTEM accounts.

               

              If you forget those then you need to connect as 'SYS as SYSDBA' on the machine the DB is installed on. Or if sql developer is on the machine the DB is on use the 'role' dropdown and select SYSDBA.

              • 4. Re: Cannot create new connection to database in sql developer
                2729786

                Here is what I have in the New/Select Database Connection Window:

                 

                Untitled.png

                 

                My database is current on the same computer as sql developer. I believe I had set my database service name to hr during its installation.

                 

                Sorry about the service name thing, the tutorial said that one of its images used the service name, it do not specify that I needed my own service name as well.

                • 5. Re: Cannot create new connection to database in sql developer

                  See the Sql Developer User Guide

                  http://docs.oracle.com/cd/E12151_01/doc.150/e12152.pdf

                   

                  The doc has an entire chapter on connecting.

                   

                  You use the SID or service name when you make a TNS connection. For the basic connection you show above you have NOT entered a password so you got a 'null password' exception. You also did NOT select the SYSDBA role but are using the 'default' role. You have to use SYSDBA if you connect as SYS.

                   

                  If you unlocked the HR account and provided a password just provide the user as HR and enter the password you provided.

                  • 6. Re: Cannot create new connection to database in sql developer
                    Satishbabu Gunukula

                    I would highly encourage to google it before posting as it saves yours and others time

                    If you still cant figure it out , we are here to help you.

                     

                    Regards,

                    Satishbabu

                    <Moderator Edit - deleted link spam - pl see FAQ link on top of this page as to where to include signature links - this violation has been reported the Admins>