Debugging with VS2005

  • I have some developers who would like to debug t-sql in vs2005.  One is a sysadmin and it works fine - this is the microsoft recommended solution .  This one developer can have sysadmin, but the others cannot.  I read a blog post from a sql server team developer that you can grant execute to master.dbo.sp_enable_sql_debug extended sp.  

    Do I need to do something else here?  Are we taking the wrong approach? 

    My commands and results -

    grant

    execute on sys.sp_enable_sql_debug to [samtest]

    go

    execute as login = 'samtest'

    go

    master

    .dbo.[sp_enable_sql_debug]

    Msg 229, Level 14, State 5, Procedure sp_enable_sql_debug, Line 1

    EXECUTE permission denied on object 'sp_enable_sql_debug', database 'mssqlsystemresource', schema 'sys'.

  • anyone?

  • Sam,

    We are having the same issue. Did you have any luck finding a way to allow your developers to debug t-sql in vs2005 without granting them the sysadmin role?

  • Not sure if it helps, I have the error running a rather complex setup... (SQL 2008 ent 64 bit running against a second SQL 2008 ent 64 bit on an SBS 2003 SP2 network - servers are all Win Ent 2003)

    The subnet server is logged into a wireless access point that blocks port 68 (so other dhcp servers cannot take advantage of the subnet dhcp) and port 53 (to block the client computer from sending IP packets from port 53 onto the network).

    Wireless runs a dhcp subset that is separate from the domain. I have internet access from the wireless and the ability to initialize a sql query over port 1433 from my non-wired position on the network... (from the WAP sub-net) - I run an exception in the windows firewall and this may not be allowed by group policy in your domain, but it is worth a try.

    Intermittently, I receive the Error:

    The EXECUTE permission was denied on the object 'sp_enable_sql_debug', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229), if I try to run the query over an RDP (remote desktops mmc) on the wired sql server.

    A couple of months back, when the WAP was authenticating correctly with an IAS Radius login, the error did not occur. The test system had to be rebuilt and after rebuild, the IAS has not been cooperating thus, no authentication directly to the domain from the server on the WAP, so we substitute with anything else that might work.

    How this translates into an answer for you is not for me to say - this is all experimental changes that change the environment frequently, but the error is similar and at the moment the environment we are using is stable for further testing.

    From the feel of my setup, I would say that it does have to do with the user (test with domain administrator using sysadmin on both wired and subnet wireless machines was attempted and was allowed) so perhaps if you can enable a service account with network privelege between the two machines, you can solve the issue. Normally a service account is delegated to the sa so chances are that won't work either.

    The first thing that happens when the query runs on the remote machine is that the msvsmon.exe tries to execute and create the permission between the machines. (1 cancel remote debugging, 2 unblock from local subnet, or 3 unblock remote debugging)

    My suggestion is to check the firewall to see if there a method to open port 1433 or 1434 somewhere in the chain. For example if the local machine firewall is blocking 1433 or 1434 try named pipes which will allow a channel to exist between the servers.

    For example, by enabling named pipes, the server on the subnet (without a named pipe) can access the server on the (wired) domain with a named pipe, but given the same conditions for the RDP where the actual domain server is open in the RDP (remote desktops mmc), the same query cannot run because it is requesting a protocol for the server that attempts to use subnet authentication that does not try to access the named pipe. You may be able to create a service broker and use that. I can't say how that works because I have not tried to do that.

    I am confused by the issue. Maybe someone else reading this has a better picture they can provide.

    Jamie

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply