Bonsoir,
j'aimerais se connecter à SQL Server 2008 depuis une application JAVA, en utilisant l'authentification windows:
voici l'url que j'utilise:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
String connectionUrl = "jdbc:sqlserver://127.0.0.1:1433;" +
				"databaseName=exemple;integratedSecurity=true;";
j'ai placé le fichier: sqljdbc_auth.dll dans le répertoire: c:/windows/system32
une erreur a été générée:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.microsoft.sqlserver.jdbc.AuthenticationJNI.SNISecGenClientContext([B[I[BI[B[I[ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/logging/Logger;)I
	at com.microsoft.sqlserver.jdbc.AuthenticationJNI.SNISecGenClientContext(Native Method)
	at com.microsoft.sqlserver.jdbc.AuthenticationJNI.GenerateClientContext(AuthenticationJNI.java:58)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.SSPIData(SQLServerConnection.java:1924)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2323)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
	at com.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)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at odbc.ConnexionDB.main(ConnexionDB.java:20)
merci d'avance