Problems with Query Analyzer

  • Hi,

    I've been trying to do some debugging of stored procedures in Query Analyzer. Previously, I've just right clicked the SP on the menu and it's fired up the debugger and then paused ready to step through.

    However, connecting to some servers, it either waits a while before bringing up the debug window and then looses connection or more annoyingly, even connecting to a local site, it fires up the debugger and then runs it. No pausing or anything.

    Any suggestions as to what might cause these sort of problems ?

    As I say, i've been able to do it in the past, just not now.

    cheers

    Andy

  • Is this consistent for a particular server or intermittent?

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • It seems to be consistant for particular servers now.

  • Are those servers running with the service under LocalSystem or are they using a local/domain account?

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • They're running with the default install I believe. Is that what you mean ? If not, how can I find out (I'm not a DBA, more a developer !)

  • Default would be to run under LocalSystem, and debugging requires an actual login, whether local or domain. If you have access to the server, check the account the MSSQLServer service is running under by either bringing up Computer Management and going to services or if you are local, you can shortcut and just Start | Run and execute services.msc. Otherwise, your sysadmin should be able to look this up if you don't have access.

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Hi,

    Ok, the server is set to login with "localsystem" account. I can connect to the SQL Server with Query Analyzer or Enterprise manager using a login with the system administrator permission. Is this what you mean ?

    cheers

    Andy

  • If the service is set to start under the LocalSystem account, debugging won't work. Either a domain or local account will need to be created and SQL Server configured to run under it. Best way to make the change, once you have the account is through Enterprise Manager. You can set the account under the Security tab of Server Properties.

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Hi,

    So when I create an account on windows, what permissions does it need to have ? Anything specific ?

    cheers for all the help btw !

    Andy

  • If you want to dup what permissions you already have, you'd put the account in the local Administrators group for the system. Make the account change through EM because it handles changing permissions on the files and in the registry as well as granting the service account sysadmin rights to the system.

    With that said, if you have the option to run as less than with administrative privileges this is generally best. There are a couple of topics in Books Online that covers the pros and cons of doing so. But basically, the Principle of Least Privilege says to give accounts only what rights they need and nothing more and typically most SQL Servers don't need full administrative rights.

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Thanks for the assistance. I'll give it a go shortly

    cheers

    Andy

  • I have a server that has the same problem. However, I have two copies of Windows 2000 on my PC. One for general work and one for software development using ,NET. Query Analyzer will not debug when I am in the "general" copy of Windows, but it does when I am in my software devel copy of Windows.

    So it can be a client issue - but I have not found out what, so far. I have the latest service packs for every thing on both copies of Windows - so far as I know.

    Hope this helps you to track down the issue. Perhaps it will help me!

    David

  • We had a similar problem in which each time you would try to debug a SP, the debugger would just execute without stopping anywhere.

    We fixed it by running :

    exec sp_sdidebug 'legacy_on'

    Apparently, for some reason, we have to run that SP everytime we reboot the server. Otherwise we can't debug properly.

    Hope this helps

Viewing 13 posts - 1 through 12 (of 12 total)

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