SQL DB Authentication Issue

PriyankaSadhwni
Tera Expert

When I am Trying to connect Thru SQL Mgmt Studio, query :Select * is getting executed well,
Thru Data source , 

 

PriyankaSadhwni_1-1682422151675.png

 

I get below response

MID Server reported error: java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'XXXXX'. ClientConnectionId:XXXXXXXXXXXXX
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:283)
com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:129)
com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37)
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:5067)
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3731)
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:94)
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3675)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2979)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2488)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2142)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1993)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1164)
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:760)
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:116)
com.service_now.mid.connections.jdbc.JDBCConnection.lambda$connect$0(JDBCConnection.java:86)
com.glide.util.LogContext$Frame.run(LogContext.java:212)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:84)
com.service_now.mid.connections.jdbc.JDBCConnectionFactory.create(JDBCConnectionFactory.java:65)
com.service_now.mid.connections.ConnectionCachePool.getAvailableConnection(ConnectionCachePool.java:82)
com.service_now.mid.connections.ConnectionCache.get(ConnectionCache.java:95)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:831)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:141)
com.service_now.mid.probe.AProbe.process(AProbe.java:106)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:131)
com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
com.service_now.mid.threadpool.ResourceUserQueue$RunnableProxy.run(ResourceUserQueue.java:649)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)

at com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:835)
at com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:141)
at com.service_now.mid.probe.AProbe.process(AProbe.java:106)
at com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:131)
at com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
at com.service_now.mid.threadpool.ResourceUserQueue$RunnableProxy.run(ResourceUserQueue.java:649)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

 

1 ACCEPTED SOLUTION

PriyankaSadhwni
Tera Expert

Point 2 has my answer ;Thanks @Punit S , ONly windows Logon is set

View solution in original post

2 REPLIES 2

Punit S
Giga Guru

The error message suggests that there is an issue with the SQL Server login credentials. The MID Server is unable to log in to the SQL Server with the provided username and password.

You can try the following steps to resolve the issue:

  1. Double-check the SQL Server login credentials used in the Data Source configuration.
  2. Make sure the SQL Server authentication mode is set to SQL Server Authentication and not Windows Authentication.
  3. Check if the SQL Server is configured to allow remote connections.
  4. Verify that the SQL Server instance name, port number, and database name specified in the Data Source configuration are correct.
  5. Ensure that the user account has the necessary permissions to access the database.
  6. Check the SQL Server error logs to see if there are any more specific error messages related to the login failure.
  7. Check user account permissions 

If none of these steps resolve the issue, you may need to contact your SQL Server administrator for further assistance.

 

Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.

Thanks,
Punit

PriyankaSadhwni
Tera Expert

Point 2 has my answer ;Thanks @Punit S , ONly windows Logon is set