关键配置
1. 下载安装sqljdbc_4.0到C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Server.
2. 或者在DTP的New Database Connections时Edit Driver Definition的JAR List中Add 安装路径:到C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar;
或者在环境变量中添加CLASSPATH,值:C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar
此时,可以配置sql server 用户名/密码方式连接。
3. 把sqljdbc_auth.dll从jdbc目录中拷贝到system32目录和JAVAHOME目录C:Program FilesJavajre6bin
现在,可以用集成账户连接SQL Server。
详细信息:
The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.
The sqljdbc_auth.dll files are installed in the following location:
<installation directory>sqljdbc_<version><language>auth
Note:
If you are running a 32-bit Java Virtual Machine (JVM), use the sqljdbc_auth.dll file in the x86 folder, even if the operating system is the x64 version. If you are running a 64-bit JVM on a x64 processor, use the sqljdbc_auth.dll file in the x64 folder. If you are running a 64-bit JVM on a IA-64 processor, use the sqljdbc_auth.dll file in the IA64 folder.
Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:
-Djava.library.path=C:Microsoft SQL Server 2005 JDBC Driversqljdbc_<version>enuauthx86
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66009/viewspace-1058309/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/66009/viewspace-1058309/