Skip to main content

Posts

Showing posts from April, 2015

Java - Windons Authentication to SQL Server with jTDS Driver

To make jTDS driver to work with your SQL server windows authentication use below jdbc url format. 1. windows authentication without SSO jdbc:jtds:sqlserver:// <HOSTNAME>:1433;instance= SQLEXPRESS;databaseName= lportal;domain=<domain>;user= <user>;password=<password> 2. windows authentication with SSO jdbc:jtds:sqlserver:// <HOSTNAME>:1433;instance= SQLEXPRESS;databaseName= lportal;domain=<domain> and set the java argument something like this to load ntlmauth.dll   -Djava.library.path="<driver-folder>/windowsSSO" Note : if you are installing sqlexpress/sql server on your desktop or server you need to enable tcp/ip connectivity to the instance. Steps to enable tcp/ip connectibity: 1. Open SQL Server Configuration Manager 2. Goto  Configuration Manager > SQL Server Network Configuration > Protocols for <instancename> 3. Right click on TCP/IP and select enable. ...