問題描述
今天我去連接到我的本地數據庫,但由于未知原因我無法再連接.我輸入(本地)并像往常一樣使用 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".
這篇關于無法再連接到本地 SQL Server 2008 數據庫的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!