I am trying to connect to SQL Server 2008 on another box with integrated authentication. My environment includes 64bit Java 7, 64 bit Eclipse, and 64-bit Windows 7. I used JDBC driver provided by Microsoft. Everything works fine with 32-bit Java. However, with 64-bit Java, I got the following:
"WARNING: Failed to load the sqljdbc_auth.dll cause : C:\Program Files (x86)\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x86\sqljdbc_auth.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform ..."
I found http://msdn.microsoft.com/en-us/library/ms378428.aspx, but none of the suggestions there seems to work. Specifically,
I copied "sqljdbc_4.0\enu\auth\x64\sqljdbc_auth.dll" to "sqljdbc_4.0\enu", an"C:\Windows", and "C:\Windows\System32". Got the same error.
I set " -Djava.library.path=C:\Program Files (x86)\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x64" in the VM arguments of Eclipse, then I got:
"Error: Could not find or load main class Files"
Any idea? Not sure why it is using 32-bit sqljdbc_auth.dll? AFAIK, the sql server 2008 is of 64 bit.
Many thanks!