sql-server - 无法作为本地主机连接到 MSSQL 服务器管理工​​作室

标签 sql-server ssms

我安装了带有配置管理器和管理工作室的 MSSQL Server 2016。我尝试通过 Management Studio 连接到 SQL Server:

  • 服务器类型:数据库引擎
  • 服务器名称:本地主机
  • 身份验证:Windows 身份验证

错误标题:连接到服务器:

Cannot connect to localhost. 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) (Microsoft SQL Server, Error: 2) The system cannot find the file specified

事件查看器中没有更多信息。我在各州提供以下服务:

  • SQL Server (SQLEXPRESS) - 正在运行
  • SQL 全文过滤器后台程序启动程序 (SQLEXPRESS) - 正在运行
  • SQL Server 启动板 (SQLEXPRESS) - 正在运行
  • SQL Server Reporting Services (SQLEXPRESS) - 正在运行
  • SQL Server 代理 (SQLEXPRESS) - 已停止
  • SQL Server 浏览器 - 正在运行

尝试启动 SQL Server 代理后,我收到此错误:

The SQL Server Agent (SQLEXPRESS) service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

感谢您的建议。

编辑

我捕获了 sql 服务的屏幕: enter image description here

最佳答案

我只能使用服务器名称 (localdb)\MSSQLLocalDB 来解决相同的问题。仅供引用

关于sql-server - 无法作为本地主机连接到 MSSQL 服务器管理工​​作室,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51787319/

相关文章:

sql-server - SQL Server中如何检查表变量是否为空?

sql-server - Oracle 和 SQL Server select (+) 等效

java - Hibernate 中的 MSSQL 用户定义数据类型(缺少列异常)

sql-server - Azure SQL Server 托管实例

python - 如何在 MySQL 中复制 pandas 函数?

PHP,将 PDO 与嵌套查询一起使用,结果已损坏

sql - 如何测试数据库的性能

asp.net - LINQ to SQL 执行时间比 SSMS SQL 长 50 倍

sql - 在 SQL Server Management Studio 中保存带标题的结果

sql - 将 varchar() 列限制为特定值?