Required Permissions to Debug a Stored Procedure in Query Analyzer

  • I have a stored procedure in a SQL 2000 database that I have to debug using the QA Debugger.

    I found the article below on this site, but what the Author describes is not happening.

    http://www.sqlservercentral.com/articles/Administering/qa2k_2/622/

    When I right click the stored procedure and choose debug, the T-SQL debugger does indeed appear. However choosing Execute results in the whole procedure running and I have no opportunity to set breakpoints or watches and step through the code.

    In fact the Step Into, Step Over, Step Out, Run to Cursor, Restart and Stop Debugging buttons on the toolbar are all greyed out. I think this is a permissions issue.

    I was wondering what are the required permissions in order to debug an SP that is owned by the SQL login doing the debugging ?

  • It's been awhile, but I think that the service account for SQL Server needs admin, or some high level of permissions. It might be that it needs to be a local admin.

    How is your server set up?

  • [font="Arial"]

    Hello,

    Maybe I'm missing something but it sounds like the debugger is not set up correctly or you are entering into the wrong debug mode at the outset.

    In the debugger don't use the open option unless you want the sproc to run through with out stopping. If you want to debug, use the debug option at the bottom of the choices.

    If the sproc requires parameters, the it will present a dialog screen for this purpose.

    One hint on dates parameters is to use {d'2007-01-01'} but if you are in open mode then the date parameter should be entered 2007-01-01.

    In any case, once the parameter dialog screen is happy, then you should be presented with your stored procedure script. The step thru, or execute to cursor should work. These will not work if the debugger is not installed properly on the server. That's a whole other subject.

    Hopefully I've understood your question correctly and this will help.

    Regards,

    Terry

    [/font]

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

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