1 2 Previous Next 16 Replies Latest reply: Oct 26, 2012 9:05 AM by Jeff Smith Sqldev Pm-Oracle RSS

    First Time: SQL Developer connect to DB

    969643
      Need help with TNS entries not showing from the TNSNames entries.

      I do not have a TNSNames file?
        • 1. Re: First Time: SQL Developer connect to DB
          rp0428
          >
          Need help with TNS entries not showing from the TNSNames entries.

          I do not have a TNSNames file?
          >
          Ask yourself - how would anyone else know if you have a TNSNames file? We can't see your pc. Why use TNSNAMEs anyway?

          Use the Basic connection and confirm that you can connect.
          • 2. Re: First Time: SQL Developer connect to DB
            969643
            Agree, that was smart from my side.

            I tried the Basic connection, clicked Test
            Message = Test Failed: The network Adapter could not establish the connection
            .
            • 3. Re: First Time: SQL Developer connect to DB
              rp0428
              >
              I tried the Basic connection, clicked Test
              Message = Test Failed: The network Adapter could not establish the connection
              >
              That error means that your pc cannot find the server you are trying to connect to. If you are using a hostname then the 'hosts' file may not contain the hostname->ip address in it. If you are using an IP address then you may have a firewall issue.

              open a command window and try to ping the server; try using hostname and try using ip. If that doesn't work you need to find and fix that problem.

              See this blog by Ed Stevens, an expert in this area.
              http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/
              • 4. Re: First Time: SQL Developer connect to DB
                969643
                Where can i find the .. the 'hosts' file ? to add the connection names.

                .........Where should the tnsnames.ora FILE be located ?

                Edited by: 966640 on Oct 23, 2012 11:33 AM

                Edited by: 966640 on Oct 23, 2012 12:00 PM
                • 5. Re: First Time: SQL Developer connect to DB
                  Jim Smith
                  You don't need a TNSNAMES file for basic connections.

                  All you need is
                  - the hostname or IP address of the host on which the database resides.
                  - the port number the database is listening on (probably 1521)
                  - the name (SID) of the database.
                  - a username and password for the databa
                  Do you have this information? If so enter it in the New / Select Database Connection dialog box.

                  Click on test. Let us know what error message you get.

                  The hosts file on windows is in c:\windows\system32\drivers\etc, but you can create the connection with an IP address without an entry in a host file.

                  You could also try reading this Troubleshooting SQLDeveloper connection problems
                  • 6. Re: First Time: SQL Developer connect to DB
                    969643
                    At the moment I don't have this info.

                    I am trying to acquire it from the DB admin.

                    However, I am connected via Toad, but connection info is different.


                    why we do not have a way for attaching a screen shot in this forum ?????

                    Edited by: 966640 on Oct 23, 2012 2:39 PM
                    • 7. Re: First Time: SQL Developer connect to DB
                      Jim Smith
                      If you are connecting via Toad, then you almost certainly have an oracle client installed and you will have a tnsnames.ora.

                      What happens if you open the new connection dialog and select TNS as the connection type? Do you get a list of databases then?


                      Or try opening a command window and typing
                      tnsping xxxx
                      Where xxxx is the database name you connect to through toad.

                      This should display two things - the location of the tnsnames file, and the connection details you need for a basic connection.
                      • 8. Re: First Time: SQL Developer connect to DB
                        969643
                        if i open the new connection dialog and select TNS as the connection type, there is no list of databases

                        command window and typing
                        tnsping xxxx

                        Failed to resolve name
                        • 9. Re: First Time: SQL Developer connect to DB
                          Jim Smith
                          Oceans_Blue wrote:
                          if i open the new connection dialog and select TNS as the connection type, there is no list of databases

                          command window and typing
                          tnsping xxxx

                          Failed to resolve name
                          That means you have the wrong name. However, the output from the tnsping command should, as I said above, show you where the oracle networking files are. Have you looked in there?

                          Have you looked in toad to see how it is connecting?
                          Have you read any of the external links people have posted that might give you an understanding of how things are supposed to work?

                          It is very difficult for us to help you when you are only providing information in bits and pieces. At this rate we will still be here next year trying to understand your setup. The best people to help you are your internal dba team or it support team.
                          • 10. Re: First Time: SQL Developer connect to DB
                            969643
                            I will be honest.

                            I gave up, can't do it.

                            Thanks
                            • 11. Re: First Time: SQL Developer connect to DB
                              969643
                              Finally.........I was able to figure it out......Manually all connections were added..............THANKS
                              • 12. Re: First Time: SQL Developer connect to DB
                                rp0428
                                And yet you don't bother to post the solution so that it will help others?

                                Sort of selfish dont' you think?
                                • 13. Re: First Time: SQL Developer connect to DB
                                  969643
                                  And yet you don't bother to post the solution so that it will help others?
                                  Sort of selfish dont' you think?

                                  Thought you would post a more appropriate professional reply like :
                                  *" Would like you to post details of your findings when you get a chance, so others might benefit from your experience"*
                                  • 14. Re: First Time: SQL Developer connect to DB
                                    rp0428
                                    Professionalism starts at home. If you want to be treated like a professional you need to start acting like one.
                                    1 2 Previous Next