简体   繁体   English

如何从 m1 芯片 macbook 连接到 SQL 服务器

[英]How to connect to a SQL Server from an m1 chip macbook

I am working on a project with a friend and he has deployed a SQL Server database.我正在和一个朋友一起做一个项目,他部署了一个 SQL 服务器数据库。 He uses a PC and can access the database using Microsoft SQL Server Management Studio (SSMS).他使用 PC,可以使用 Microsoft SQL Server Management Studio (SSMS) 访问数据库。

However I have a Macbook with an M1 chip and so I cannot use SSMS and need to figure out which SQL Server application I want.但是我有一台带 M1 芯片的 Macbook,所以我不能使用 SSMS,需要弄清楚我想要哪个 SQL 服务器应用程序。

It seems like the way to go is Microsoft Azure Data Studio.似乎通往 go 的途径是 Microsoft Azure Data Studio。 I cannot figure out how to connect properly, I have looked at several solutions posted online which all say to download docker, download the latest SQL Server image, use SQL edge, run SQL Server in a container and then open Azure and connect.我不知道如何正确连接,我看了网上发布的几个解决方案,都说要下载 docker,下载最新的 SQL 服务器映像,使用 SQL 边缘,在容器中运行 SQL 服务器,然后打开 Azure 并连接。

One caveat is that all these tutorials end with creating a SQL Server on the local host rather than connecting to an existing one.需要注意的是,所有这些教程都以在本地主机上创建 SQL 服务器结束,而不是连接到现有服务器。

In Azure, after entering server id, username and password, there is a green dot on the label of the DB on the left drop down menu, indicating that the connection to the DB was successful. Azure,输入server id、用户名和密码后,左侧下拉菜单中DB的label出现绿点,表示连接DB成功。 However whenever I try to view the DB's from the drop down it loads and then errors:但是,每当我尝试从下拉列表中查看数据库时,它都会加载然后出错:

Object Explorer task didn't complete within 45 seconds Object 资源管理器任务未在 45 秒内完成

and I cannot run any basic queries either.而且我也无法运行任何基本查询。

At this point I don't care what IDE I use as long as it works.在这一点上,我不在乎我使用什么 IDE 只要它有效即可。 Any advice is much appreciated.非常感谢任何建议。 It seems like this task should be super easy but has given me such a hard time and we cannot continue working on the project until I get access.看起来这项任务应该超级简单,但让我度过了一段艰难的时光,在我获得访问权之前我们无法继续开展该项目。

Anyways, thanks again in advance.无论如何,再次感谢。 and lmk if there's any other info I should provide.如果我还应该提供任何其他信息,请告诉我。

Tried using docker with Azure Data Studio and my results were the same as when I only used Azure.尝试将 docker 与 Azure Data Studio 结合使用,结果与仅使用 Azure 时的结果相同。

You'll want to use Azure Data Studio .您需要使用Azure Data Studio

You don't need Docker at all to meet your goals.您根本不需要 Docker 来实现您的目标。 Those tutorials were in regards to running your own SQL Server instance on a Mac.这些教程是关于在 Mac 上运行您自己的 SQL 服务器实例的。 You're trying to connect to an existing instance.您正在尝试连接到现有实例。

As mentioned in the comments, where is the existing SQL Server instance located?...is it on a server that's part of a domain.如评论中所述,现有的 SQL 服务器实例位于何处?...它是否在属于域的服务器上。 Is your Mac part of that same domain?您的 Mac 是否属于同一域? It sounds like you're getting some kind of timeout issue or some sort of authentication issue.听起来您遇到了某种超时问题或某种身份验证问题。 So this is more of an infrastructure question.所以这更像是一个基础设施问题。

Once connected to the SQL Server instance in Azure Data Studio, what happens if you just open a blank worksheet and run the query SELECT @@SERVERNAME ?一旦连接到 Azure Data Studio 中的 SQL 服务器实例,如果您打开一个空白工作表并运行查询SELECT @@SERVERNAME会发生什么情况?

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

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