无法启动 T-SQL 调试。无法连接到计算机(“*****”)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25756851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 02:36:26  来源:igfitidea点击:

Unable to start T-SQL Debugging. Could not connect to computer ("*****")

sqlsql-serverdebugging

提问by Mehrdad Babaki

When I try to debug an Stored Procedure using Microsoft SQL Server Management Studio, I encounter this error message: Unable to start T-SQL Debugging. Could not connect to computer ("*"). The dubugger cannot connect to the remote computer. This may be because the remote computer does not exist or a firewall may preventing communication to the remote computer. Please see help for assistance. I really appreciate any help.

当我尝试使用 Microsoft SQL Server Management Studio 调试存储过程时,我遇到以下错误消息:无法启动 T-SQL 调试。无法连接到计算机 (" *")。dubugger 无法连接到远程计算机。这可能是因为远程计算机不存在或防火墙可能阻止与远程计算机的通信。请参阅帮助以获取帮助。我真的很感激任何帮助。

回答by Alien Technology

SSMS needs to be able to find your SQL Server by DNS. When you connect to the DB in SSMS, you can use (local), but (local) does not resolve on your network so the debug program can not find it. Try connecting to localhost or your computer's name on the "Connect to Server" screen.

SSMS 需要能够通过 DNS 找到您的 SQL Server。当您在 SSMS 中连接到数据库时,您可以使用 (local),但是 (local) 在您的网络上无法解析,因此调试程序找不到它。尝试在“连接到服务器”屏幕上连接到本地主机或您的计算机名称。

You should not have to run as administrator.

您不必以管理员身份运行。

SSMS Login Screen

SSMS 登录屏幕

回答by jRosenholm

I just wanted to pay this forward, as after searching for quite some time I've yet to see anyone mention the problem that I encountered here.

我只是想提前支付这笔费用,因为在搜索了很长一段时间后,我还没有看到有人提到我在这里遇到的问题。

I ran into this issue while connected to SQL using a SQL Server Authenticated user. Once I tried using a Windows Authenticated user I was able to debug without issue. That user must also be assigned the sysadmin role.

我在使用 SQL Server Authenticated 用户连接到 SQL 时遇到了这个问题。一旦我尝试使用 Windows Authenticated 用户,我就可以毫无问题地进行调试。还必须为该用户分配 sysadmin 角色。

Hope this helps someone.

希望这可以帮助某人。

回答by Babla

There's still problem in MSSQL 2012 if you want to debug a query connected to server via some defined alias. You need to connect to that server with the full name of the server first and then the debugger finds the server - otherwise it doesn't.

如果您想调试通过某个定义的别名连接到服务器的查询,MSSQL 2012 中仍然存在问题。您需要首先使用服务器的全名连接到该服务器,然后调试器找到该服务器 - 否则它不会。

回答by Aravindhan R

Simple way to just go to the database-> security->login->right click on the login and add your name and check the service role as public and sysadmin. more reference Unable to start T-SQL Debugging

只需转到数据库-> 安全-> 登录-> 右键单击​​登录名并添加您的姓名并检查服务角色为 public 和 sysadmin 的简单方法。更多参考无法启动T-SQL调试

回答by Md Kauser Ahmmed

Run Microsoft SQL Server Management Studio as User Administratormode. You will not get this error while debugging. And You can debug stored procedure. This helps to solve my problem.

用户管理员模式运行 Microsoft SQL Server Management Studio 。调试时不会出现此错误。并且您可以调试存储过程。这有助于解决我的问题。