aspose file tools
The moose likes JDBC and the fly likes Exception during connecting to sql server2005 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Exception during connecting to sql server2005" Watch "Exception during connecting to sql server2005" New topic
Author

Exception during connecting to sql server2005

amrut sabade
Ranch Hand

Joined: Aug 16, 2010
Posts: 90
Hii Everyone wen i tried to net conn from driver manager i got following exception i am using to connect to sqlserver which is on my local machine...


com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1033)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Abc.demo.main(demo.java:17)
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Did you do everything that the error suggested?
Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception during connecting to sql server2005
 
Similar Threads
TCP/IP connection to the host localhost, port 1433 has failed
com.microsoft.sqlserver.jdbc.SQLServerException:The TCP/IP connection to the host port 1433 has fail
SQLServerException - could not connect to the host on port 1433
SQL Database to Java using JDBC
Finding out the correct URL