all groups > sql server odbc > july 2005 >
You're in the

sql server odbc

group:

Profiler defaults to master database



Profiler defaults to master database Bruce D. Meyer
7/13/2005 8:50:34 AM
sql server odbc: I am not even sure I can do what I am hoping but, I need to debug a complex
sql query. I was hoping to be able to load it in profiler and step through
it. oddly, right off the bat it errors out telling me the table I am
referencing is not found in the database master, which is correct. My ODBC
connection is clearly set to change default database to the correct
database. I have tried this on two different computers using a system dsn
odbc connection that works perfectly for enterprise manager and query
analyzer.

Any help, web site references etc are appreciated.

Bruce D. Meyer

Re: Profiler defaults to master database Andrew J. Kelly
7/13/2005 8:59:58 AM
You can't step thru a query in profiler. It is not a debugger. It simply
outputs the commands that are run. If you want to see what it is doing you
can use Query Analyzer and set the db there and then use the graphical
showplan to see the plan.

--
Andrew J. Kelly SQL MVP


[quoted text, click to view]

Re: Profiler defaults to master database Bruce D. Meyer
7/13/2005 9:46:37 AM
Is that the 'QUERY, SHOW EXECUTION PLAN' option?
I am trying that now.
I was hoping for a vb like 'set break point, single step like environment
where I could view variable values as they were processed' tool.

I really hate to hassle folks on a newsgroup for newbie stuff. Is there a
tool like this available, or is what I am now viewing the best built in aid
available to me?

Thanks for you assistance, and any web sites you think I should review if
needed, are welcome.

--Bruce Meyer

[quoted text, click to view]

Re: Profiler defaults to master database David Gugick
7/13/2005 11:45:31 AM
[quoted text, click to view]

There is a T-SQL debugger built into Query Analyzer. It won't provide
the performance detail that Profiler or examining the execution plan
will, but if you need to verify the code and algorithms used in the
procedure, it may help. It requires some server support. See this KB
article for information:

http://support.microsoft.com/default.aspx?scid=kb;en-us;280101

--
David Gugick
Quest Software
www.imceda.com
www.quest.com
Re: Profiler defaults to master database Bruce D. Meyer
7/13/2005 1:34:53 PM
Thank-you.
I just ran across something called TOAD for SQL Editor. Made by a company
named uhm... QUEST. Trying that also.

:-)

Bruce Meyer


[quoted text, click to view]

AddThis Social Bookmark Button