简体   繁体   English

尝试连接到 SQL Server 时出错

[英]Error when trying to connect to SQL Server

I am working to connect to a SQL server from ServiceNow.我正在努力从 ServiceNow 连接到 SQL 服务器。 I am getting an error and I am unsure as to what it means.我收到一个错误,我不确定它是什么意思。 Any help is appreciated.任何帮助表示赞赏。

Connection URL: jdbc:sqlserver://TESTSCCMSQL01;selectMethod=cursor;databaseName=TEST_ASH;integratedSecurity=true连接 URL:jdbc:sqlserver://TESTSCCMSQL01;selectMethod=cursor;databaseName=TEST_ASH;integratedSecurity=true

Error: java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'CAMBRIDGE\svc-p-SCCM-SN-CMDB'. ClientConnectionId:e9216fed-c737-4f09-b27b-a63f6b66b925
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$1LogonProcessor.complete(SQLServerConnection.java:4786)
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:5068)
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:110)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:82)
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:94)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:784)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:119)
com.service_now.mid.probe.AProbe.process(AProbe.java:102)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:122)
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:834)

    at com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:788)
    at com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:119)
    at com.service_now.mid.probe.AProbe.process(AProbe.java:102)
    at com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:122)
    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:834)

Is your SQL Server in 'mixed mode authentication' ?您的 SQL Server 是否处于“混合模式身份验证”? This is necessary to login with a SQL server account instead of a Windows login.这是使用 SQL 服务器帐户登录而不是 Windows 登录名所必需的。

You can verify this by checking the properties of the server and then SECURITY, it should be in 'SQL Server and Windows Authentication Mode'您可以通过检查服务器的属性然后检查安全来验证这一点,它应该处于“SQL Server 和 Windows 身份验证模式”

This problem occurs if the user tries to log in with credentials that cannot be validated.如果用户尝试使用无法验证的凭据登录,则会出现此问题。 This problem can occur in the following scenarios:在以下情况下可能会出现此问题:

Scenario 1: The login may be a SQL Server login but the server only accepts Windows Authentication.场景 1:登录可能是 SQL Server 登录,但服务器只接受 Windows 身份验证。

Scenario 2: You are trying to connect by using SQL Server Authentication but the login used does not exist on SQL Server.场景 2:您尝试使用 SQL Server 身份验证进行连接,但所使用的登录名在 SQL Server 上不存在。

Scenario 3: The login may use Windows Authentication but the login is an unrecognized Windows principal.场景 3:登录可能使用 Windows 身份验证,但登录是无法识别的 Windows 主体。 An unrecognized Windows principal means that Windows can't verify the login.无法识别的 Windows 主体意味着 Windows 无法验证登录。 This might be because the Windows login is from an untrusted domain.这可能是因为 Windows 登录来自不受信任的域。

It's also possible the user put in incorrect information.用户也可能输入了不正确的信息。

http://support.microsoft.com/kb/555332 http://support.microsoft.com/kb/555332

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试连接到SQL Server数据库时出现“ SqlException未处理”错误 - 'SqlException was unhandled' error when trying to connect to SQL Server database 尝试连接到 SQL Server 时出现经典 ASP 错误 80004005 - Classic ASP Error 80004005 when trying to connect to SQL Server sql server 2000错误,尝试连接到sql server 2005时出错 - sql server 2000 error, error trying to connect to sql server 2005 尝试连接到SQL数据库时出错 - Error when trying to connect to SQL database 尝试连接到Azure中的SQL Server时在signalR ASP.NET中出现错误 - Error when in signalR ASP.NET when trying to connect to SQL server in Azure 尝试从电子应用程序连接到 sql server 但未找到端口错误 - Trying to connect to sql server from an electron app but port not found error 尝试与SQL Server数据库连接 - Trying to connect with sql server database 尝试连接到SQL数据库时出现权限错误 - Getting a permission error when trying to connect to sql database 尝试连接到SQL表时MS Access 2007中的查询错误 - Query error in MS Access 2007 when trying to connect to SQL Tables 尝试将Play应用程序连接到mysql数据库时出现SQL语法错误 - SQL syntax error when trying to connect Play application to mysql database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM