Posts

Showing posts from January, 2018

Microsoft JDBC and Microsoft SQL Server

Image
For a recent project, I was asked to get the Microsoft JDBC working on Redhat with SQL 2016. In the instructions I found online to be blunt they were lacking especially because I am not a programmer. I hope that this post helps someone in the future attempting something similar. First JDBC for Windows and JDBC for Linux work a bit different. At the time I write this there is a version 6.2 for Windows, but the Linux driver is only at 4.2. This leads to one major difference 6.2 supports passing a username and password as part of the connect string for Kerberos on Windows while the 4.2 driver for Linux does not. Below is a java sample code that works on windows without getting into keytabs etc. I assume in all this you know you need to add a server principal name to your SQL Server service accounts and have already done that. Using "setspn -a" with a domain admin account. Once you have everything configured if you want to verify something is using Kerberos run this query on SQ