November 27, 2003 at 4:31 am
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
November 27, 2003 at 5:55 am
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
K. Brian Kelley
@kbriankelley
November 27, 2003 at 5:57 am
It seems to be consistant for particular servers now.
November 27, 2003 at 6:01 am
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
K. Brian Kelley
@kbriankelley
November 27, 2003 at 6:03 am
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 !)
November 27, 2003 at 6:09 am
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
K. Brian Kelley
@kbriankelley
November 27, 2003 at 6:19 am
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
November 27, 2003 at 6:41 am
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
K. Brian Kelley
@kbriankelley
November 27, 2003 at 7:03 am
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
November 27, 2003 at 7:27 am
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
K. Brian Kelley
@kbriankelley
November 27, 2003 at 7:31 am
Thanks for the assistance. I'll give it a go shortly
cheers
Andy
November 28, 2003 at 2:01 am
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
December 1, 2003 at 5:17 pm
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