java.sql.SQLException: Io exception: Unknown host specified












1















I have a server name, port number, database name, domain, username, and password.
I entered the connection string using the below format:



jdbc:oracle:thin:@//serverName:portNumber//domain


But got the below error:




java.sql.SQLException: Io exception: Unknown host specified




How do I specify the connection string ?










share|improve this question





























    1















    I have a server name, port number, database name, domain, username, and password.
    I entered the connection string using the below format:



    jdbc:oracle:thin:@//serverName:portNumber//domain


    But got the below error:




    java.sql.SQLException: Io exception: Unknown host specified




    How do I specify the connection string ?










    share|improve this question



























      1












      1








      1








      I have a server name, port number, database name, domain, username, and password.
      I entered the connection string using the below format:



      jdbc:oracle:thin:@//serverName:portNumber//domain


      But got the below error:




      java.sql.SQLException: Io exception: Unknown host specified




      How do I specify the connection string ?










      share|improve this question
















      I have a server name, port number, database name, domain, username, and password.
      I entered the connection string using the below format:



      jdbc:oracle:thin:@//serverName:portNumber//domain


      But got the below error:




      java.sql.SQLException: Io exception: Unknown host specified




      How do I specify the connection string ?







      oracle jdbc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 13 '18 at 5:18









      a_horse_with_no_name

      295k46451545




      295k46451545










      asked Jan 6 '16 at 17:48









      Divya RaoDivya Rao

      30117




      30117
























          3 Answers
          3






          active

          oldest

          votes


















          0














          Without seeing your connection string it is difficult to tell what might be the actual problem, but the error is basically letting you know it cannot reach whatever machine you specified. Here is a good link regarding Oracle connection strings using Java:



          https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html






          share|improve this answer
























          • i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

            – Divya Rao
            Jan 6 '16 at 18:14













          • You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

            – John DeFauw
            Jan 6 '16 at 18:45













          • No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

            – Divya Rao
            Jan 6 '16 at 18:48



















          0














          jdbc:oracle:thin:@DBhost:DBport:DBname






          share|improve this answer































            -3














            Path is wrong
            Just run this:
            jdbc:oracle:thin://@serverName:portNumber/databaseName






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34639459%2fjava-sql-sqlexception-io-exception-unknown-host-specified%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              Without seeing your connection string it is difficult to tell what might be the actual problem, but the error is basically letting you know it cannot reach whatever machine you specified. Here is a good link regarding Oracle connection strings using Java:



              https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html






              share|improve this answer
























              • i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

                – Divya Rao
                Jan 6 '16 at 18:14













              • You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

                – John DeFauw
                Jan 6 '16 at 18:45













              • No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

                – Divya Rao
                Jan 6 '16 at 18:48
















              0














              Without seeing your connection string it is difficult to tell what might be the actual problem, but the error is basically letting you know it cannot reach whatever machine you specified. Here is a good link regarding Oracle connection strings using Java:



              https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html






              share|improve this answer
























              • i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

                – Divya Rao
                Jan 6 '16 at 18:14













              • You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

                – John DeFauw
                Jan 6 '16 at 18:45













              • No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

                – Divya Rao
                Jan 6 '16 at 18:48














              0












              0








              0







              Without seeing your connection string it is difficult to tell what might be the actual problem, but the error is basically letting you know it cannot reach whatever machine you specified. Here is a good link regarding Oracle connection strings using Java:



              https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html






              share|improve this answer













              Without seeing your connection string it is difficult to tell what might be the actual problem, but the error is basically letting you know it cannot reach whatever machine you specified. Here is a good link regarding Oracle connection strings using Java:



              https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 6 '16 at 18:10









              John DeFauwJohn DeFauw

              265




              265













              • i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

                – Divya Rao
                Jan 6 '16 at 18:14













              • You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

                – John DeFauw
                Jan 6 '16 at 18:45













              • No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

                – Divya Rao
                Jan 6 '16 at 18:48



















              • i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

                – Divya Rao
                Jan 6 '16 at 18:14













              • You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

                – John DeFauw
                Jan 6 '16 at 18:45













              • No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

                – Divya Rao
                Jan 6 '16 at 18:48

















              i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

              – Divya Rao
              Jan 6 '16 at 18:14







              i cannot put the actuals as it is sensitive information.But i will put something instead of that. i got information like : Server : "abcd.efg.org" port : 1234, database name : "abcdefgh" domain "dfghjklop". My connection url which i gave was : jdbc:oracle:thin@//abcd.efg.org:1234/dfghjklop . My confusion is , SID or server name is the domain name what i have ?

              – Divya Rao
              Jan 6 '16 at 18:14















              You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

              – John DeFauw
              Jan 6 '16 at 18:45







              You do not actually need the @ symbol in there or the //. It would need to be something like this: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:nameofcomputerhere:1521:orcl", "usernamehere", "passwordhere");

              – John DeFauw
              Jan 6 '16 at 18:45















              No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

              – Divya Rao
              Jan 6 '16 at 18:48





              No no i am not using jdbc.i am trying connect in squirrelSQL to oracle thin driver.

              – Divya Rao
              Jan 6 '16 at 18:48













              0














              jdbc:oracle:thin:@DBhost:DBport:DBname






              share|improve this answer




























                0














                jdbc:oracle:thin:@DBhost:DBport:DBname






                share|improve this answer


























                  0












                  0








                  0







                  jdbc:oracle:thin:@DBhost:DBport:DBname






                  share|improve this answer













                  jdbc:oracle:thin:@DBhost:DBport:DBname







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 5 '18 at 20:32









                  RaghavendraRaghavendra

                  1




                  1























                      -3














                      Path is wrong
                      Just run this:
                      jdbc:oracle:thin://@serverName:portNumber/databaseName






                      share|improve this answer




























                        -3














                        Path is wrong
                        Just run this:
                        jdbc:oracle:thin://@serverName:portNumber/databaseName






                        share|improve this answer


























                          -3












                          -3








                          -3







                          Path is wrong
                          Just run this:
                          jdbc:oracle:thin://@serverName:portNumber/databaseName






                          share|improve this answer













                          Path is wrong
                          Just run this:
                          jdbc:oracle:thin://@serverName:portNumber/databaseName







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 14 '16 at 7:51









                          Venu A PositiveVenu A Positive

                          1,64721325




                          1,64721325






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34639459%2fjava-sql-sqlexception-io-exception-unknown-host-specified%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Florida Star v. B. J. F.

                              Danny Elfman

                              Lugert, Oklahoma