我已經下載JDK 6,也是我有sqljdb4.jar,我有database.properties文件內容如下數據JDBC例爲Java
database.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver database.url=jdbc:sqlserver://.;databaseName=UserInfo;integratedSecurity=true; database.username=sa database.password=admin
BN:我在我的機器上安裝服務器和服務器名稱=。 ,還我使用Windows Authontication
我現在的問題是,當我嘗試建立連接,我有以下錯誤
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance 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:130)
我不知道什麼是這裏的確切的問題
如果任何一個可以幫助我可以理解提前
感謝
請確保您在SQL Server配置管理器 - > SQL Server網絡配置 - >協議中啓用了TCP/IP – MDV2000 2011-05-04 15:11:09
是的,我已啓用它,並且它也可以在端口1433上工作,但我也有相同的異常 – 2011-05-04 15:39:33