Unable to start the Transact-SQL debugger, could not connect to the database engine instance

梦想与她 提交于 2021-01-21 12:06:33

问题


I have been trying to run debugging within SQl server management studio and for some reason the debugger has just stopped working.

This is the message I get:

Unable to start the Transact-SQL debugger, could not connect to the database engine instance 'server-sql'. Make sure you have enabled the debugging firewall exceptions and are using a login that is a member of the sysadmin fixed server role. The RPC server is unavailable.

Before this I get two messages, one requesting firewall permissions and the next says 'usage' with some text that makes little sense.

I have looked at the other similar answers on there for the same message which suggest adding the login as a sysadmin but that is already set. I also tried adding sysadmin to another account but that also didn't work.


回答1:


In the end I was able to start it by right clicking and selecting run as administrator.




回答2:


I encountered 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.




回答3:


In my case, I received this error message:

Unable to start the Transact-SQL debugger, could not connect to the computer "local".

I end up close the existing connection, then reconnect to my local SQL server using IP 127.0.0.1 and it works.




回答4:


This happened to me and I could not find the resolution anywhere. My firewall is disabled so I knew that couldn't be the issue.

According to Microsoft: Configure firewall rules before running the TSQL Debugger:

The server needs to communicate back to the client via RPC. The account under which SQL Server service is running should have authenticate permissions to the client.

We had a group policy that was preventing this:

Deny access to this computer from the network (Local account, Guests)

In order to resolve the issue, I had to add the SQL Server service account to the local group "Remote Desktop Users" on my desktop. Hope this helps someone else resolve this frustrating issue.




回答5:


What helped me, was from here:

SQL Server Management Studio must be running under a Windows account that is a member of the sysadmin fixed server roll.

The Database Engine Query Editor window must be connected by using either a Windows Authentication or SQL Server Authentication login that is a member of the sysadmin fixed server role.

So, I've added sysadmin role to my windows account and run ssms as administrator. Debugger started working normally.




回答6:


I try with the following steps, but it did not work (maybe because I'm on a PC in a office and I don't have control of the firewall). But you can try the following.

  1. Check the users role:

    IF IS_SRVROLEMEMBER ('sysadmin') = 1
    print 'Current user''s login is a member of the sysadmin role'
    
  2. Follow these instructions: configure the transact-SQL Debugger

  3. Run SQL Server Management Standard Edition 64 bits (with SQL Server Account)



回答7:


In addition to above works, what make our 2 computers remote debug able, was running: (right click on Window's Start button)

System--> Advanced System Properties-->Computer Name-->Click on Network ID... button

and running that wizard to join workgroup on both computers.
I found this solution by looking at my Windows' Event Viewer and looking for a solution to errors with NetBT Source, that is related to workgroup and computer Name.
Update: after some days, it stop working again.




回答8:


I had the same problem and double checked al recommended settings. At some point I disabled the firewall on the database server and it worked like a charm. By enabling and checking the Firewall log I noticed this entry:

2019-10-31 16:07:50 DROP TCP 192.168.xxx.xxx 192.168.xxx.xxx 65231 61214 52 S 56576751 0 8192 - - - RECEIVE

When I allowed TCP port 61214 (Inbound rule) and switched the firewall back on, it worked. I don't know why this port is needed, maybe some here on SO?

Anyway, maybe the firewall log can be of help too.



来源:https://stackoverflow.com/questions/24491024/unable-to-start-the-transact-sql-debugger-could-not-connect-to-the-database-eng

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!