sql server - JDBC / IntelliJ Failed to load the sqljdbc_auth.dll -


i trying run small test program in intellij. code:

string driverclass = "com.microsoft.sqlserver.jdbc.sqlserverdriver";     string url = "jdbc:sqlserver://test.test.com;integratedsecurity=true";     string username = "test";     string password = "test";     class.forname(driverclass);     try (connection con = drivermanager.getconnection(url, username, password);          statement st1 = con.createstatement();          statement st2 = con.createstatement();     ) {       string sql1 = "exec  [dbo].[cleanup]";       string sql2 = "exec  [dbo].[detailsall] \"detailsall.csv\" ";       st1.execute(sql1);       st2.execute(sql2);      }catch(exception e){      system.out.println(e.getmessage());     } 

i have added following vm options:

-djava.library.path="\users\sgupta\ideaprojects\todos\sqljdbc_4.0\enu\auth\x86\" enter image description here

running program results in:

apr 05, 2013 5:43:20 pm com.microsoft.sqlserver.jdbc.authenticationjni warning: failed load sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path driver not configured integrated authentication. clientconnectionid:db8a3aa3-d84b-49d2-a7eb-64c4187a8303

i have double checked path have specified in vm option. other suggestions? thanks.

it looks have bad news you. straight sqljdbc documentation included .tar.gz file. after upack file, go webpage: sqljdbc_4.0/enu/help/default.htm

under contents >>> connecting sql server jdbc driver >>> building connection url, go section: "connecting integrated authentication"

at bottom of section has following quote, says can't use dll approach non-windows systems.

the jdbc driver not support integrated authentication when driver runs on non-windows operating systems. driver not provide functionality supply windows authentication credentials, such user name , password, when connecting sql server non-windows operating systems. in such cases, applications must use sql server authentication instead.

however, same file's equivalent msdn documentation seems suggest non-windows operating systems, can work kerberos. http://msdn.microsoft.com/en-us/library/ms378428.aspx

this msdn link gives overview of the kerberos process, falls short on detailed setup non-windows machines. http://msdn.microsoft.com/en-us/library/gg558122.aspx

if has figured out details getting kerberos working connect sql server non-windows machine, i'd love hear them.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -