Thanks @Erland Sommarskog for the response. I started both my java application service & the SQL server service account using the gmsa account. Now I am trying to connect to the SQL Server with the below JDBC URL with empty password.Below is the code snippet of my jdbc connection part.
String driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver";
String url = "jdbc:sqlserver://apm-kerb-1.apmkerb.com:1433;databaseName=master;domain=apmkerb";
Properties dbConProp = new Properties();
dbConProp.setProperty("integratedSecurity","true");//NO I18N
dbConProp.setProperty("authenticationScheme","NTLM");//NO I18N
dbConProp.setProperty("driverName", driverName);
dbConProp.setProperty("url", url);
dbConProp.setProperty("userName", userName);
dbConProp.setProperty("passWord", password);
Connection con = DriverManager.getConnection(url,dbConProp_jdbc);
I provided empty password for the connectivity but i get the below error.
url : jdbc:sqlserver://apm-kerb-1.apmkerb.com:1433;databaseName=master;domain=apmkerb
dbConProp : {integratedSecurity=true, password=, url=jdbc:sqlserver://apm-kerb-1.apmkerb.com:1433;databaseName=master;domain=apmkerb, driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver, authenticationScheme=NTLM, userName=svc_sql$}
Unable to connect to MsSQL server while using the url-> jdbc:sqlserver://apm-kerb-1.apmkerb.com:1433;databaseName=master;domain=apmkerb and user svc_sql$
com.microsoft.sqlserver.jdbc.SQLServerException: "User" (or "UserName") and "Password" connection properties must be specified for NTLM authentication.
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2698)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1971)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1263)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.adventnet.appmanager.server.mssql.datacollection.ScheduleMsSQLDataCollection.main(ScheduleMsSQLDataCollection.java:834)
Unable to connect to MsSQL server while using the url-> jdbc:sqlserver://10.10.10.11:1433;databaseName=master;domain=apmkerb and user svc_sql$
com.microsoft.sqlserver.jdbc.SQLServerException: "User" (or "UserName") and "Password" connection properties must be specified for NTLM authentication.
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2698)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1971)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1263)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.adventnet.appmanager.server.mssql.datacollection.ScheduleMsSQLDataCollection.main(ScheduleMsSQLDataCollection.java:847)
Please let me know the misconfiguration done here if any.