provider: Shared Memory Provider, error: 40 - 无法打开到 SQL Server 的连接

来源:互联网 发布:淘宝卖家申诉入口 编辑:程序博客网 时间:2024/05/18 16:56

1、错误描述

===================================无法连接到 SKY-20160824VTF\SQLEXPRESS。===================================在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Shared Memory Provider, error: 40 - 无法打开到 SQL Server 的连接) (.Net SqlClient Data Provider)------------------------------有关帮助信息,请单击: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476------------------------------错误号: 2严重性: 20状态: 0------------------------------程序位置:   在 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)   在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)   在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)   在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)   在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)   在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)   在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)   在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)   在 System.Data.SqlClient.SqlConnection.Open()   在 Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)   在 Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()===================================系统找不到指定的文件。

2、错误原因

     由于在连接数据库服务器时,选错了服务器名称,导致报错


3、解决办法


0 0
原创粉丝点击