SQL 无法连接到 pc-name\SQLEXPRESS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15332418/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
cannot connect to pc-name\SQLEXPRESS
提问by Waleed Ehsan
While trying to connect to SQL server 2005 standard edition through SQL Server Management Studio 2005 I get the following error:
在尝试通过 SQL Server Management Studio 2005 连接到 SQL Server 2005 标准版时,出现以下错误:
I put all my effort to solve this problem but there is no solution. On stack overflow in the following post link given:
我竭尽全力解决这个问题,但没有解决方案。关于以下帖子链接中的堆栈溢出:
How to connect to local instance of SQL Server 2008 Express
如何连接到 SQL Server 2008 Express 的本地实例
in one answer of this post I found this screen shoot
在这篇文章的一个答案中,我发现了这个屏幕截图
when I see my connect to server dialog box I find the difference like
当我看到我的连接到服务器对话框时,我发现了不同之处
What is the problem?
问题是什么?
This SQL server runs on a single machine, not on a cluster or on a client server.
此 SQL 服务器在单台机器上运行,而不是在集群或客户端服务器上。
回答by
Go to services (services.msc) and restart the services in the image and then try to connect.
转到服务 (services.msc) 并重新启动映像中的服务,然后尝试连接。
回答by S. Mayol
If you have Microsoft Windows 10:
如果您有Microsoft Windows 10:
- Type Control Panelon Cortanasearch bar (which is says by default 'Type here to search').
- Click on Administrative Tools
- Then click on Services
- Scroll down and look for: SQL Server (SQLEXPRESS), after that right click
- And then in the pop out windows click on Start
- 在Cortana搜索栏上键入控制面板(默认情况下为“在此处键入以进行搜索”)。
- 点击管理工具
- 然后点击服务
- 向下滚动并查找:SQL Server (SQLEXPRESS),然后右键单击
- 然后在弹出的窗口中点击开始
Now you should be able to connect to your pc-name\SQLEXPRESS
现在您应该能够连接到您的pc-name\SQLEXPRESS
回答by Luis Mata
Initialize the SQL Server Browser Service.
初始化 SQL Server 浏览器服务。
回答by UTKARSH
Follow these steps then you solve your problem 100%.
遵循这些步骤,您就可以 100% 地解决您的问题。
- When you get this error then close everything(Microsoft SQL Server Managment):
- 当您收到此错误时,请关闭所有内容(Microsoft SQL Server 管理):
Then open command prompt by pressing (
window
+r
) keys and typeservices.msc
and click OK or press Enter key.And search **SQL Server (SQLEXPRESS) as I show in the image.
然后按 (
window
+r
) 键打开命令提示符并键入services.msc
并单击 OK 或按 Enter 键。并搜索 **SQL Server (SQLEXPRESS),如图所示。
Now see left upper side and click start.
If you open Microsoft SQL Server Management then you not get any type error.
现在看到左上侧并单击开始。
如果您打开 Microsoft SQL Server 管理,则不会出现任何类型错误。
Enjoy!!!
享受!!!
回答by akshay shedwad
When you get this error.
当您收到此错误时。
Follow these steps then you solve your problem
请按照以下步骤解决您的问题
- Open command prompt by pressing (window + r) keys or Click on windows Button and Type Run then type services.mscand click OK or press Enter key.
- 按 (window + r) 键打开命令提示符或单击 windows 按钮并键入运行,然后键入services.msc并单击确定或按 Enter 键。
2.Find SQL Server (SQLEXPRESS).
2.查找SQL Server (SQLEXPRESS)。
3.Now see left upper side and click start.
3.现在看到左上侧并单击开始。
4.If Service show error then right click on SQL Express and then click on Properties.
4.如果服务显示错误,则右键单击SQL Express,然后单击属性。
5.Then click on Logon Tab.
5.然后单击登录选项卡。
6.Enter Username and Password of Windows Authentication
6.输入Windows认证的用户名和密码
7.Then Start your Service
7.然后启动您的服务
8.Problem will be solve and run your query
8.问题将被解决并运行您的查询
回答by Ramanujam Allam
Use (LocalDB)\MSSQLLocalDB as the server name
使用 (LocalDB)\MSSQLLocalDB 作为服务器名称
回答by Lisa Hertweck
I'm Running Windows 10 and this worked for me:
我正在运行 Windows 10,这对我有用:
- Open services by searching in the toolbar for Services.
- Right click SQL Server (SQLEXPESS)
- Go To Properties - Log On
- Check Local System Account & Allow service to interact with desktop.
- Apply and restart service.
- I was then able to connect
- 通过在工具栏中搜索服务来打开服务。
- 右键单击 SQL Server (SQLEXPESS)
- 转到属性 - 登录
- 选中本地系统帐户并允许服务与桌面交互。
- 应用并重新启动服务。
- 然后我就可以连接了
回答by Helder José
I had this problem. So I put like this: PC-NAME\SQLSERVER Since the SQLSERVER the instance name that was set at installation.
我有这个问题。所以我这样写: PC-NAME\SQLSERVER 因为 SQLSERVER 是在安装时设置的实例名称。
Authentication: Windows Authentication
身份验证:Windows 身份验证
Connects !!!
连接!!!
回答by user2161455
try using IP instead of pc name. If the ip working, then it might be the name pipe is not enable. If it;s still not working then the login using windows might be disabled.
尝试使用 IP 而不是 pc 名称。如果ip正常工作,则可能是名称管道未启用。如果它仍然无法正常工作,则可能会禁用使用 Windows 的登录。
回答by ady
go to services and start the ones related to SQL
转到服务并启动与 SQL 相关的服务