Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 25th, 2003, 11:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Default Debugging in SQL 2000 QA

Can anyone enlighten me as to how the debugger in Query Analyser is supposed to work? I've tried setting breakpoints in the SQL code, as instructed, but execution never stops, and the proc just runs to completion. It's probably something blindingly obvious, but I can't see it!

Cheers,

Chris

There are two secrets to success in this world:
1. Never tell everything you know
__________________
There are two secrets to success in this world:
1. Never tell everything you know
 
Old June 25th, 2003, 11:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

It works for me. (You knew someone would say that, right? ;))

You right click the stored procedure, select debug, then set a breakpoint by clicking on the line and hitting F9 to set (toggle) a breakpoint on the selected line. You then hit F5 (or click GO). Execution stops for me at the line where the breakpoint is set.

When you enter the procedure in debug mode (after entering parameters, if any) by clicking on execute, you will be placed on the first executable line of the procedure, in effect at an invisible breakpoint on that first line.

(You're not setting a breakpoint there are you ? )

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old June 25th, 2003, 11:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Jeff, now I understand how my users feel :)!
Actually I wonder if there is something not quite right with the setup. As I said, as soon as I hit the execute button from the debug popup, it runs to completion. At that point, I can only hit 'GO' or toggle /clear breakpoints. Step into, over etc are greyed out. Setting breakpoints and hitting go just make the damn thing run to completion again. Perhaps I should try running a broken proc? ;)
Are you aware of any 'undocumented' settings that might be incorrect on the server?

Chris


There are two secrets to success in this world:
1. Never tell everything you know
 
Old June 25th, 2003, 12:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

I found this in BOL:

"The debugger supports traditional functionality such as setting breakpoints, defining watch expressions, and single stepping through procedures. This functionality is available when the SQL Server service uses a domain user account.

In a client/server environment, the client workstation running the debugger must be a member of the same domain as the computer running the corresponding instance of SQL Server."

Are you using the local system account for the instance of SQL Server? Set up a domain account just for SQL Server to use, and use that instead. Change the Log On account in the MSSQLSERVER service properties to use a domain account, not the Local System Account.



Jeff Mason
Custom Apps, Inc.
www.custom-apps.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
sql server debugging wendy elizabeth SQL Server 2000 0 June 28th, 2007 08:45 PM
SQL QA Analyzer error Adam H-W SQL Server 2000 4 July 14th, 2005 05:16 AM
looking for access 2000 to sql server 2000 sql/que method SQL Server 2000 0 July 7th, 2005 12:46 PM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
Windows 2000 and SQL 2000 in Korean Language mipo SQL Server 2000 0 February 19th, 2004 12:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.