简体   繁体   English

无法连接到本地SQL Server Express 2008 R2

[英]Cannot connect to local SQL Server Express 2008 R2

I just installed SQL Server Express 2008 R2 and I have a problem connecting to it using the SQL Server Management Studio (locally). 我刚刚安装了SQL Server Express 2008 R2,但使用SQL Server Management Studio(本地)连接到它时遇到问题。

All SQL Server services are started (SQL Server (SQLEXPRESS), SQL Server browser, also the DTC service) 启动所有SQL Server服务(SQL Server(SQLEXPRESS),SQL Server浏览器以及DTC服务)

When I try to connect I get the following message: 当我尝试连接时,出现以下消息:

TITLE: Connect to Server 标题:连接到服务器

Cannot connect to (local). 无法连接到(本地)。

ADDITIONAL INFORMATION: 附加信息:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与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. 验证实例名称正确,并且已将SQL Server配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2) (提供程序:命名管道提供程序,错误:40-无法打开与SQL Server的连接)(Microsoft SQL Server,错误:2)

Are you connecting to the local express instance? 您正在连接到本地Express实例吗? Try this as your server: .\\SQLEXPRESS 将此作为您的服务器尝试: .\\SQLEXPRESS

The same error can happen if your SQLEXPRESS instance is not started. 如果您的SQLEXPRESS实例未启动,则可能会发生相同的错误。 To verify the service is started: - run services.msc - Look for the "SQL Server (SQLEXPRESS)" service, status should be "Started", if it is not, try to start it manually. 要验证服务是否已启动,请执行以下操作:-运行services.msc-查找“ SQL Server(SQLEXPRESS)”服务,状态应为“已启动”,否则请尝试手动启动。

I had the same error and I had to enable TCP/IP protocol and set IPALL TCP Port to 1433 to resolve the issue: 我遇到了相同的错误,必须启用TCP / IP协议并将IPALL TCP端口设置为1433才能解决此问题:

SQL Server配置管理器设置

hope it will help you 希望对你有帮助

 server name try this: (local)\SQLEXPRESS or localhost\SQLEXPRESS.

it is working..... 这是工作.....

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

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