7 Replies Latest reply: Jan 17, 2012 5:17 AM by orafad RSS

    Sql developer won't connect with SQL server database on cluster

    Ingmar
      Hello,
      I have a microsoft SQL server database on a windows cluster. Name for this cluster is like XXX/YYY
      When I try to connect to this database with SQL developer, I get a failure, mentioning:
      "Status : Failure -Cannot connect to Miscrosoft SQL Server on XXX/YYY"
      As far as I know, I have installed the correct jtds driver (version 1.2.5), since I can connect to sql server databases on single server hosts.
      Does anyone know how to connect to databases on windows clusters?

      Edited by: Ingmar on Jan 16, 2012 4:08 PM

      Edited by: Ingmar on Jan 16, 2012 4:22 PM
        • 1. Re: Sql developer won't connect with SQL server database on cluster
          Turloch O'Tierney-Oracle
          Hi Ingmar,

          Try this is in the port box

          1433/dbname;instance=YYY

          dbname can be omitted

          -Turloch
          SQL Developer team

          1/Giving an instance name in SQLDeveloper connection to SQL Server (from August 2011)
          MS SQL Server Connection

          The correct syntax to deal with this is in the port box

          1433/dbname;instance=instance

          dbname can be omitted

          2/cluster configuration (uses instance name)
          http://stackoverflow.com/questions/1160024/jdbc-connect-string-for-sql-server-cluster

          where vvv\iii is the cluster address: jdbc address is:
          "jdbc:sqlserver://vvv;instanceName=iii"

          3/jtds url details available in
          http://jtds.sourceforge.net/faq.html
          • 2. Re: Sql developer won't connect with SQL server database on cluster
            orafad
            On a (somewhat picky) side note - shouldn't the MS Sql Server instance path separator be a backslash, as every other separator in ms universe?
            • 3. Re: Sql developer won't connect with SQL server database on cluster
              Ingmar
              Hello Turloch,
              It doesn't work.
              I've tried:
              1)
              Hostname: XXX;instanceName=yyy:1433
              Port: empty
              push button "retrieve database"
              result: "cannot connect to Microsoft server on XXX;instanceName=yyy:1433"

              2)
              Hostname: XXX;instanceName=yyy
              Port: 1433
              push button "retrieve database"
              result: "cannot connect to Microsoft server on XXX;instanceName=yyy"


              3)
              Hostname: XXX/yyy
              Port: 1433
              push button "retrieve database"
              result: "cannot connect to Microsoft server on XXX/yyy"

              4)
              Hostname: empty
              port: xxx;instanceName=yyy:1433
              push button "retrieve database"
              result: "the syntax of the connection URL 'jdbc:jtds:sqlserver://:xxx;instanceName=yyy:1433' is invalid

              It appears to me that 1) to 3) are correct in the way, that sql developer can connect to the cluster, but can't find the database.
              So, it doesn't work yet.
              • 4. Re: Sql developer won't connect with SQL server database on cluster
                Ingmar
                Hello Orafad:
                xxx\yyy gives "Failure -Unknown server hostname 'xxx\yyy'."
                xxx/yyy gives "Failure -Cannot connect to Microsoft SQL Server on xxx/yyy"
                So I guess it should be xxx/yyy
                Nobody says MS is consistent
                • 5. Re: Sql developer won't connect with SQL server database on cluster
                  orafad
                  I believe recent SQL Server db engine/service does not automatically listen on port 1433 (for named instance). It depends on network config of MSSqlS, browser port, etc. Sql Browser listens on 1434, but I'm not sure if connection string/driver supports connections handled via sql browser.

                  You need to find port number actually used by the db server of the instance.

                  Edit:
                  Thinking about it, check Configuration Manager, Protocols for instance > TCP/IP properties.

                  Or, try netstat -nab or netstat -nao in combinbation with Task manager (to find PID/process id).

                  What "release" is it, 2008 or 2012?

                  Edited by: orafad on Jan 17, 2012 11:04 AM

                  Edited by: orafad on Jan 17, 2012 11:06 AM
                  • 6. Re: Sql developer won't connect with SQL server database on cluster
                    Ingmar
                    Our SQL Server administrator says that the listening port is 1433.
                    It appears that port 1433 is closed, and that the listening port is 50024 (after some thorough inquiries)
                    And on top of that: network rules prevent my workstation from connecting to the sql server host.
                    So for now this thread can on hold.

                    Edited by: Ingmar on Jan 17, 2012 12:01 PM
                    • 7. Re: Sql developer won't connect with SQL server database on cluster
                      orafad
                      Just a quick comment then:
                      Ingmar wrote:
                      It appears that port 1433 is closed, and that the listening port is 50024 (after some thorough inquiries)
                      As I've noticed, ports in the high range 49xxx-54xxx is not unusual, unless "funneling" via sql browser (which is similar to Oracle's tnslsnr as a focal point for connections).

                      The port number allocation can even be dynamic i.e. can change over time (due to restarts, for example). So digging, as you did, is required.

                      Edited by: orafad on Jan 17, 2012 12:16 PM