首页 > sql > 连接/创建到Microsoft SQL Server的本地实例

连接/创建到Microsoft SQL Server的本地实例 (Connecting/Creating to a local Instance of Microsoft SQL Server)

2019-03-09 sqlsql-server

问题

我使用的是Microsoft SQL v17.9.1。我已经使用Microsoft SQL做了很多工作,所以知道如何连接和查询外部数据库,但从来没有必须连接到我自己的机器上的数据库。目前我正在尝试在我自己的计算机上设置SQL以连接到其上的SQL数据库,但是无法找到要键入的本地SQL实例的名称。

通过以下链接:https//docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view = sql -server -2017

我去了SQL Server配置管理器,以确保正在运行正确的进程并且SQL Server正在运行 在此输入图像描述

然后我转到我的命令提示符并输入ipconfig以获取我的ipv4和ipv6以尝试我的SQL Server Management studio数据库引擎服务器名称并且每次都获取两个版本的错误消息

在此输入图像描述

有谁知道我做错了什么?

解决方法

我们无法看到您使用什么连接到该实例,因为它是隐藏的,但是根据它的长度,您要么使用您的PC名称,要么使用“SQLEXPRESS”。

无论哪种方式,试试这个:

1)启动“SQL Server Browser”

2)在SSMS中使用localhost \ SQLEXPRESS或hostname \ SQLEXPRESS作为服务器名称。

如何连接到SQL Server 2008 Express的本地实例

问题

I am using Microsoft SQL v17.9.1. I have used Microsoft SQL quite a bit for work, so know how to connect and query to external databases, but have never had to connect to a database on my own machine. At the moment I am trying to set up SQL on my own computer to connect to an SQL database on it but am having trouble finding the name of the local instance of SQL to type in.

Following the below link: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-2017

I went to SQL Server Configuration Manager to make sure the correct process are running and SQL Server is running enter image description here

I then went to my command prompt and typed in ipconfig to get my ipv4 and ipv6 to try in my SQL Server Management studio database engine server name and get the error message each time for both versions

enter image description here

Does anyone know what I am doing wrong?

解决方法

We can't see what are you using to connect to that instance because it's hidden, but by the length of it you're either using your PC name or "SQLEXPRESS".

Either way, try this:

1) Start "SQL Server Browser"

2) Use localhost\SQLEXPRESS or hostname\SQLEXPRESS as Server Name in SSMS.

How to connect to local instance of SQL Server 2008 Express

相似信息