Accès à SQL server 2005 via java

chercheDBA -  
 sefaxe82 -
Bonjour à tous,

je ne parviens pas à attaquer localement ma BD via une application web codée en java.

J'utilise SQL server 2005, je pense avoir correctement configuré la base, j'ai bien spécifié le port 1433, le mode tcp/ip est activé. La connection se fait par authentification windows, j'ai bien collé le fichier sqljdbc_auth.dll dans le repertoire windows/system32 donc je n'ai plus le message d'erreur "Fail to load sqljdbc_auth.dll"...

Par contre, j'ai ce message là:

java.lang.UnsatisfiedLinkError: com.microsoft.sqlserver.jdbc.AuthenticationJNI.GetDNSName(Ljava/lang/String;[Ljava/lang/String;Ljava/util/logging/Logger;)I
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.GetDNSName(Native Method)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.GetDNSName(Unknown Source)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.InitDNSNameAndPort(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
...

voici mes paramètres de connection
driver= com.microsoft.sqlserver.jdbc.SQLServerDriver
url= jdbc:sqlserver://localhost:1433;databaseName=mabase;IntegratedSecurity=true

Je suis vraiment perdu, donc toute aide serait la bienvenue.

Merci.
A voir également:

1 réponse

sefaxe82
 
il faut copier le fichier d'authentification <<sqljdbc_auth.dll >> dans le répertoire Bin du JDK.
utilise l'url : "jdbc:sqlserver://localhost:1433;databaseName=tabase;integratedSecurity=true;"
ça devrait marcher
1