无法再连接到本地 SQL Server 2008 数据库

今天我去连接到我的本地数据库,但由于未知原因我无法再连接.我输入(本地)并像往常一样使用 Windows 身份验证,但出现此错误.

Today I went to connect to my local database but I cannot connect anymore for unknown reasons. I typed in (local) and used Windows authentication like I always do yet I get this error.

无法连接到本地主机.

发生与网络相关或特定于实例的错误建立到 SQL 的连接服务器.未找到服务器或无法访问.验证实例名称正确且该 SQL服务器配置为允许远程连接.(提供者:命名管道提供程序,错误:40 - 无法打开连接到 SQL Server) (.NetSqlClient 数据提供程序)

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)

推荐答案

SQL Server 服务是否正在运行?要进行检查,请右键单击我的电脑"并选择管理..."从窗口左侧的树中选择服务和应用程序",然后选择服务".查找SQL Server"服务并查看它是否处于已启动"状态.如果没有,请右键单击该服务并选择开始".

Is the SQL Server service running? To check, right-click on "My Computer" and choose "Manage..." From the tree on the left side of the window, choose "Services and Applications", then "Services". Look for the "SQL Server" service and see if it is in the "Started" status. If not, right-click on the service and choose "Start".

相关文章