无法连接到本地sql实例
我正在尝试连接到本地 sql server 2008 实例。我正在使用 SQL Server Management Studio 2008 R2。 logindetails:
servername: .\SQLEXPRESS
authentication: Windows Authentication
username:myuser
也许有趣的细节:当我在 sql server 配置管理器中查看 sql server services 时,什么也没有?
错误信息:
标题:连接到服务器
无法连接到 mymachinename\SQLEXPRESS。
其他信息:
发生网络相关或特定于实例的错误 建立与 SQL Server 的连接。找不到服务器或 无法访问。验证实例名称是否正确 SQL Server 配置为允许远程连接。 (提供者:SQL 网络接口,错误:26 - 定位服务器/实例时出错 指定)(Microsoft SQL Server,错误:-1)
I am trying to connect to my local sql server 2008 instance. I am using sql server management studio 2008 R2. logindetails:
servername: .\SQLEXPRESS
authentication: Windows Authentication
username:myuser
Interesting detail maybe: when I look in the sql server configurationmanager, under sql server services , there is nothing?
Error message:
TITLE: Connect to Server
Cannot connect to mymachinename\SQLEXPRESS.
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: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server, Error: -1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能需要以管理员身份运行 SQL Server 配置管理器才能查看服务。不知道为什么你看到“什么也没有”。你所说的“什么都没有”到底是什么意思?
以下是您需要查找的事项清单:
You may need to run SQL Server Configuration Manager as an administrator to see the services. Not sure why you see "nothing". What exactly do you mean by "nothing"?
Here's the checklist of things you need to look for:
我有同样的问题。我打开我的电脑管理-->服务屏幕,发现 SQL Server 和 SQL Server 代理没有运行。我尝试启动它们,但收到一条消息,指出由于登录失败,它们无法启动。
我打开它们(属性)更改了登录ID和密码(我的最近更新了),然后启动了服务。打开 SQL 并尝试使用 Windows 身份验证登录 - 非常有效。 基本上,这些服务需要运行。
或者,我相信 SQL 配置管理器会在“服务”面板中向您指出相同的内容。
如果您仍然无法登录,还可以尝试使用 localhost 与 local 作为实例名称。
希望这有帮助!
I had the same issue. I opened up my computer Managerment --> services screen and saw that SQl Server and SQL Server Agent were not running. I tried starting them and got a message that they could not be started due to a logon failure.
I opened them up(properties) changed the login id and password(mine had been updated recently) and then started the services. Opened up SQL and tried loggin in with windows authentication - worked like a charm. Basically, those services needed to be running.
Alternatively, I believe SQL configuration manager will point you to the same thing within the Services panel.
also try localhost vs local as the instance name if you are still unable to login.
Hope this helps!
确保您的 SQL Server 实例名为 SQLEXPRESS。您可以快速查看 Sql Server 配置管理器中运行的服务器。通常,当 Management Studio 找不到服务器实例时,您会收到此错误。
让我们知道您的进展如何!
Ensure that your SQL Server instance is called SQLEXPRESS. You can have a quick look at the servers running in the Sql Server Configuration Manager. Usually you get this error when Management Studio can't find the Server instance.
Let us know how you get on!
我最终再次安装了 sql server,现在它可以工作了!
I ended up installing sql server again and now it works!
可能是您尝试通过 SSMS 访问 SQL Server 时没有运行 SQL Server 实例
May be you didn't have a SQL Server instance running from where you were trying to access SQL Server via SSMS