So basically, I'm having trouble connecting to SQL Server 2012 through JDBC through my tomcat web application and also SQuirreL
I've tried substituting multiple versions of sqljdbc jar files. The weird thing is, my co-worker is able to successfully connect!
Also, all jars successfully connect to a different SQL Server 2005.
SQL Server Management Studio 2005 express (on my machine) connects to both SQL Server 2005 & 2012 without issue.
Tomcat Resource setting:
<Resource auth="Container" description="a Database Connection" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" logAbandoned="true" maxActive="300" maxIdle="50" maxWait="10000" name="jdbc/SomethingPool" password="PW" removeAbandoned="true" removeAbandonedTimeout="60" type="javax.sql.DataSource" url="jdbc:sqlserver://<SOMETHING>.<DOMAIN>.com:1433;databaseName=dbname;" username="USER"/>
old SQL JDBC version (sorry, don't know how to check versions):
- SQuirreL test connect- times out
- SQuirreL connect - times out
- Tomcat - times out
- other developer SQuirreL - SUCCESS!
- other developer Tomcat - SUCCESS!
- SQL Server 2005 SQuirreL - SUCCESS!
new SQL JDBC version (downloaded recently from http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx):
- SQuirreL test connect- SUCCESS! also weird
- SQuirreL connect - times out
- Tomcat - com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
- other developer SQuirreL - N/A
- other developer Tomcat - N/A
- SQL Server 2005 SQuirreL - SUCCESS!
My machine
- Windows 7
- SQuirreL 3.5.0
- Tomcat 6.0.18
- Java 1.6.0_29
- connection string: jdbc:sqlserver://..com:1433
- SQL Server Management Studio Express 2005
Server:
- Windows Server 2012 R2
- SQL Server 2012 (2005 compatibility)
Old Server:
- Windows Server 2003 R2
- SQL Server 2005
Thanks!