简体   繁体   English

连接到SQL Server实例时出错

[英]Error connecting to SQL Server instance

I already have SQL server 2008 R2 on my system. 我的系统上已经安装了SQL Server 2008 R2。 I also installed SQL server 2012 express. 我还安装了SQL server 2012 express。 Then, I uninstalled it and installed SQL server 2012 commercial edition. 然后,我卸载它并安装了SQL Server 2012商业版。 I cannot connect to my DB via management studio. 我无法通过管理工作室连接到我的数据库。 These weird errors happen to me all the time - 2005, 2008, 2012. The numbers change. 这些奇怪的错误一直发生在我身上 - 2005年,2008年,2012年。数字发生了变化。 TCP/IP is enabled, service is enabled. 启用TCP / IP,启用服务。 I just want to be able to connect and put some test databases for learning. 我只是希望能够连接并放置一些测试数据库用于学习。

Please help me to fix the error below - 请帮我修复下面的错误 -

Cannot connect to SuperPC\\SQLEXPRESS. 无法连接到SuperPC \\ SQLEXPRESS。

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1) (提供程序:SQL网络接口,错误:26 - 找到指定的服务器/实例时出错)(Microsoft SQL Server,错误:-1)

Make sure that the SQL Server Service is running. 确保SQL Server服务正在运行。 Go to services from start menu, and see SQL Server, if it's not running just right click and select Start. 从开始菜单转到服务,并查看SQL Server,如果它没有运行,只需右键单击并选择开始。

When you uninstalled SQL Express you removed the SuperPC\\SQLEXPRESS instance of SQL from your system. 卸载SQL Express时,从系统中删除了SQL的SuperPC\\SQLEXPRESS实例。 You will need to use a different SQL instance name. 您将需要使用不同的SQL实例名称。 You would have set this name in the 2012 commercial version installation. 您可以在2012年商业版安装中设置此名称。

If the SQL 2008 R2 instance is the default instance on your system then the commercial SQL 2012 instance would have been installed as a named instance and you'd need to connect to it using the instance name you indicated during installation. 如果SQL 2008 R2实例是系统上的默认实例,则商业SQL 2012实例将作为命名实例安装,您需要使用安装期间指示的实例名称连接到该实例。 You would connect to it using SuperPC\\[new instance name] where you replace [new instance name] with the name of the instance you set during installation. 您可以使用SuperPC\\[new instance name]连接到它,在此处将[new instance name]替换为您在安装期间设置的实例的名称。

If the SQL 2008 R2 instance is not the default instance, then the new SQL 2012 instance MAY have been installed as the default instance, in which case you just connect to it using SuperPC . 如果SQL 2008 R2实例不是默认实例,则可能已将新的SQL 2012实例安装为默认实例,在这种情况下,您只需使用SuperPC连接它SuperPC It COULD still have been installed as a named instance in which case you would need to follow the directions in the above paragraph. 它仍然可以作为命名实例安装,在这种情况下,您需要按照上一段中的说明进行操作。

EDIT: 编辑:
Based on your comment on your question, try connecting with SuperPC\\Sql2012 . 根据您对问题的评论,尝试连接SuperPC\\Sql2012

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

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