Windows authentication

When working with Windows, you can use the Windows authentication mode to connect to the Microsoft SQL DB servers. This mode allows you to use the data of the current Windows user or the user you run a program as, rather than explicitly indicating the username and password.

To enable the Windows authentication mode, you just need to enable the corresponding option in DB connection settings. If you use a CLI version, you’ll have to indicate the integratedSecurity parameter in connection string.

Examples of using Windows authentication in GUI and CLI:

pgcodekeeper-cli.bat --ms-sql jdbc:sqlserver://;databaseName={master};integratedSecurity=true NUL

System configuration

To use Windows authentication, you should make the Microsoft JDBC driver’s sqljdbc_auth.dll available to the app. Extract the DLL file from the driver pack and put it to the directory present in the PATH environment variable, or in the java.library.path JVM property. Library bitness should match the bitness of the Eclipse version you use.

The easiest and most universal way to achieve this is to save the library in the C:\Windows\System32\ directory. In 64-bit systems, this directory contains 64-bit libraries. If you use a 32-bit Eclipse version for the 64-bit system, save the 32-bit library in the C:\Windows\SysWOW64\ directory.