4 Replies Latest reply: Feb 1, 2007 1:30 AM by 807599 RSS

    connecting to database

    807599
      please help me....i try connecting to database using ms sqlserver driver sp3 using netbeans, i'm successfully add the driver. but when i try to add new connection to database to my local computer it is fail. the error message appear :
      " unable to add connection, cannot establish connection to jdbc:microsoft:sqlserver://dharmas:1433;DatabaseName:Lampung_ab using com.microsoft.jdbc.sqlserver.sqlserverdriver. Connection refused : connect ".
      The funny things....when i try to add connection to the server it is granted (using the same driver). Why ????
      Is it the settings properties in sql manager that would be the problem or ...........

      thanks for th answer...
        • 1. Re: connecting to database
          807599
          Can you ping that host? Are you sure it allows connections from outside(firewall, etc)?
          Mike
          • 2. Re: connecting to database
            807599
            Can you ping that host?
            Yes....i can ping either server host or my local computer. There is no problem about the connection. i didn't know exaclty too...
            is it the port that i am using was wrong? isn't it '1433' (the default) ? or
            is it the properties settings in my local sql server that difference from server / host sql server ?
            Are you sure it allows connections from outside(firewall, etc)?
            I already turn it off, so...the real problem is i couldn't add connection
            to my own local database server (sql server), but when i try to
            add connection to the other computer (in this case the server
            computer), it is granted.

            notice : i'm using netbeans 5.5 with jdk 1.6 to add connection.

            thanks before...
            • 3. Re: connecting to database
              807599
              No idea then, but I still suspect the connection to the host (or as you said, whether it is configured to listen to a port other than the default). But IIRC you can see the port it is listening to by running netstat on the host running SQLServer, the listening process identifies itself as mssql.... Or check the server settings.

              Why are you mentioning 'local sql server'? Do you mean the client part only? Can you check how your local sql server client connects to the remote machine?

              Mike
              • 4. Re: connecting to database
                807599
                No idea then, but I still suspect the connection to the host (or as you said, whether it is configured to listen to a port other than the default). But IIRC you can see the port it is listening to by running netstat on the host running SQLServer, the listening process identifies itself as mssql.... Or check the server settings.
                Why are you mentioning 'local sql server'?
                i mean 'my' ( = me) sql server application located at my PC, server /
                host in this case i mean the other computer, bu it is the server which
                have the sql server application too, so....it have sql server
                application installed in each computer.
                Do you mean the client part only?
                nope....client and server.
                Can you check how your local sql server client connects to the
                remote machine?
                how? i didn't know...sorryy...can u explained more detail?sorry dude.