2013年11月17日星期日

JDBC connection sqlserver 2008 database windows based authentication connection exception , seeking help .

Connect to the database using JDBC heard a lot of problems , so I read a lot of information before the connection began to connect , according to some references configured, quickly put the login mode to connect with a user name to connect to the database , and can perform sql operation. But when you use windows based authentication has been suggested that such an error :

2013-1-27 19:18:50 com.microsoft.sqlserver.jdbc.AuthenticationJNI

Warning : Failed to load the sqljdbc_auth.dll cause: - no sqljdbc_auth in java.library.path

com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication is not configured for the driver.

at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate (SQLServerConnection.java: 1352)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon (SQLServerConnection.java: 2329)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon (SQLServerConnection.java: 1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access $ 000 (SQLServerConnection.java: 41)
atcom.microsoft.sqlserver.jdbc.SQLServerConnection $ LogonCommand.doExecute (SQLServerConnection.java: 1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute (IOBuffer.java: 4575)
atcom.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (SQLServerConnection.java: 1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper (SQLServerConnection.java: 1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login (SQLServerConnection.java: 817)
... 11 more

checked, I could find online approach is: the sqljdbc_3.0 \ chs \ auth \ x64 under sqljdbc_auth.dll files are copied to : C: \ Windows \ System32. But I did not do so .
because my system is 64 , so the test x64 folder sqljdbc_auth.dll. No later I also x86, IA64 under have tried, or not. Now I would like to ask where is the problem ?

the Internet to find answers to basically get a so after a successful connection , and some it is not to give up the windows logon mode connection. I wanted to give up, but think about Dounong most of the day , why not try to solve it ? Hoping to get advice , thank you.

emphasize the way : My JDF configuration is correct , the drive no problem (sqljdbc3.0 drive , 2.0 also replaced , no ), TCP / IP ports are available , the right to import sqljdbc4.jar to the project , sqljdbc_auth.dll ; files are also copied to the c :/ / windows / / system32 directory. Final or not.
------ Solution - -------------------------------------------
you try to sqljdbc_auth.dll copy the file to your bin folder to see that your JDK in the bin, like mine is C: \ Program Files (x86) \ Java \ jdk1.6.0_10 \ bin.
------ For reference only -------------------------------------- -
drive ........
------ For reference only --------------------- ------------------


Great God , this can ah. Thanks a lot .
------ For reference only -------------------------------------- -
Congratulations landlord to solve the problem , and I also have to thank the landlord . The method according to the Internet to find you , I can .

没有评论:

发表评论