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:

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

System configuration

To use Windows authentication, the app must have access to the mssql-jdbc_auth Microsoft JDBC driver DLL of the appropriate version. Download the DLL file from the release 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.