简体   繁体   English

将Windows8升级到Windows 10后,SQL Server无法正常工作

[英]SQL Server not working after upgrading windows8.1 to windows 10

 TITLE: Connect to Server
------------------------------

Cannot connect to Thejus-PC.

------------------------------ ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or
> was not accessible. Verify that the instance name is correct and that
> SQL Server is configured to allow remote connections. (provider: Named
> Pipes Provider, error: 40 - Could not open a connection to SQL Server)
> (.Net SqlClient Data Provider)
> 
> ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
> 
> ------------------------------ Error Number: 2 Severity: 20 State: 0
> 
> 
> ------------------------------ Program Location:
> 
>    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection, Action`1 wrapCloseInAction)    at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)    at
> System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
> SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout,
> Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
> integratedSecurity, Boolean withFailover, SqlAuthenticationMethod
> authType)    at
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, SecureString newSecurePassword,
> Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean
> withFailover)    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)    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.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo
> ci, IServerType server)    at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
> 
> ===================================
> 
> The system cannot find the file specified

Please verify that Service "SQL Server (MSSQLSERVER)" is started. 请验证是否已启动服务“SQL Server(MSSQLSERVER)”。

I started the "SQL Server (MSSQLSERVER)" service and now i am able get into Sql server. 我启动了“SQL Server(MSSQLSERVER)”服务,现在我可以进入Sql server。

Please verify that Service "SQL Server (MSSQLSERVER)" is started. 请验证是否已启动服务“SQL Server(MSSQLSERVER)”。 Just now I upgraded to Windows 10 and got the same issue. 刚才我升级到Windows 10并遇到了同样的问题。

I started the "SQL Server (MSSQLSERVER)" service and now I am able get into Sql server. 我启动了“SQL Server(MSSQLSERVER)”服务,现在我可以进入Sql server了。

We have encountered this problem with Windows 7 and Windows 8. After the upgrade SQL Server does not start. 我们在Windows 7和Windows 8中遇到过此问题。升级后SQL Server无法启动。 We have been able to start it manually, but it will not start automatically. 我们已经能够手动启动它,但它不会自动启动。

So far our only solution has been to uninstall and reinstall SQL Server. 到目前为止,我们唯一的解决方案是卸载并重新安装SQL Server。

Try changing your connection string to IP/NameInstance, it works for me. 尝试将连接字符串更改为IP / NameInstance,它适用于我。 Before I used to have localhost/NameInstance in my connection string but since I updated to windows 10, it did not work anymore. 之前我曾经在我的连接字符串中使用localhost / NameInstance但是因为我更新到了Windows 10,所以它不再起作用了。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM