Scott Roth · Aug 8, 2018

Connecting to MS SQL Database using JDBC and Service Account

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

In reading some of the material about using a Domain Service Account it mentions having kerberos installed. Is this needed for Ensemble JDBC connection to a Microsoft SQL Database to work using a Domain Service Account?

Does anyone use JDBC connections to connect to non cache databases using a Domain Service Account? If so how was this accomplished?



0 2,845
Discussion (4)1
Log in or sign up to continue

Maybe I didn't describe this right. I am trying to go from No Authentication to a Windows Authentication account. Has anyone done this? if so can you share your part of your URL to see what I am possibly missing.



I think Kerberos is only required if you a connecting to a MS SQL Server database from a non-Windows environment using the JDBC driver.  If you are in a Windows environment you will probably use NTLMv2. SQL Squirrel can be used for troubleshooting connection strings or you can write a simple console based Java application. You might also check the account outside of using JDBC using SQL Server Management Studio. You need to verify your system requirements are correct for the JRE/JDK/JDBC version and the MS SQL Server version. Depending on your version requirements the connection string will vary.    

I got jTDS working through using Squirrel SQL Client, I am just now trying to transpose that over to Ensemble to see if I can get it to work.

Are you using JTDS driver?

If so, check out the FAQ.

First of all, you seem to pass user=domain\username (in your case user=osumc\CPD.Intr.Service), but FAQ offers domain parameter. Other parameter that seems promising is useNTLMv2.

Try to pass: