How should I write my connection string in jdbc when I want to connect to a SQL server where windows authentication is needed and I am connecting to a named instance?
So I have my connection string like
jdbc:sqlserver://sqlserver4\Test;datebaseName=TestDB;user=g\John;password=hello123
I have also tried with sqlserver4;namedInstance=Test
instead of sqlserver4\Test
I have tried under
Control Panel -> Administrative Tools -> ODBC Data Source
Shift Right-Click -> Run as different user
login as user=g\John password=hello123
with this test I can connect successfuly, but in my jdbc connection string I get Login failed for user g\John
.
Do I have to setup my connection string in a specific way when using Windows User Authentication and named instance in the DB?