Eclipse Data Tools Platform (DTP) 連線SQL Server 2008

kitesky發表於2012-03-15
Eclipse Data Tools Platform (DTP) 連線SQL Server 2008[@more@]

關鍵配置

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章