我的计算机上安装了 Microsoft SQL Server 2019 Developer 版本,用于使用 .NET 进行本地开发工作。两个月前一切都运行良好,当时我最后一次在使用它的项目上工作。我终于回到了项目,但现在我的程序因以下错误而失败:“内部连接致命错误。错误状态 15,令牌:23 (System.Data)”。该程序使用 SQL Server 身份验证帐户。
当我尝试连接到数据库实例时,我在使用 SQL Server Management Studio (SSMS) 时遇到了同样的错误。这是一个保存的会话,localhost\MSSQL2019
它曾经可以工作。无论我使用 Windows 帐户还是 SQL 帐户,我都会收到错误消息。
我将 SSMS 更新到最新版本(18.12.1),但仍然出现错误。我还通过配置管理器确认了 IP 设置。
无奈之下,我卸载了 MSSQL 2019 开发版,重新启动并尝试通过从 Microsoft 全新下载的 DVD ISO 重新安装它。安装接近尾声,但失败并出现同样的错误。
我能够成功安装 MSSQL 2016 开发版并通过 SSMS 连接。但是,当我尝试将其升级到 2019 时,升级完成,但 SSMS 再次出现错误。
我使用的是 64 位 Windows 10 Pro 21H2,配备 Intel i7 处理器。
我在谷歌或必应上没有找到解决这个问题的方法。任何帮助表示赞赏。
为了完整起见,这里是完整的例外。
===================================
Testing the registered server failed. Verify the server name,
login credentials, and database, and then click Test again.
===================================
Internal connection fatal error. Error state: 15, Token : 23 (System.Data)
------------------------------
Program Location:
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover, Boolean isFirstTransparentAttempt, Boolean disableTnir)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.RegisteredServers.NewRegisteredServerForm.testConnection_Click(Object sender, EventArgs e)