Unix Technical Forum

select 'message'; not appearing

This is a discussion on select 'message'; not appearing within the SQL Server forums, part of the Microsoft SQL Server category; --> Greetings. I am trying to add some debug to a stored procedure. I put some statements like this throughout ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2008, 03:05 PM
Jeff Kish
 
Posts: n/a
Default select 'message'; not appearing

Greetings.

I am trying to add some debug to a stored procedure.

I put some statements like this throughout the code:

select 'some message here';

but I never see them.
I put them in a test procedure that works fine, so that I have a feeling that
when an insert fails in a down-stream try catch block, it messes up the
display of the information.

Can someone tell me how to best go about outputting debug I can see from a
stored procedure, or if I am even correct about try catch blocks throwing
errors, messing up the debug visibility.

I can post code if necessary. Just a general debug question here.
thanks
Jeff Kish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 03:05 PM
Erland Sommarskog
 
Posts: n/a
Default Re: select 'message'; not appearing

Jeff Kish (jeff.kish@mro.com) writes:
> I am trying to add some debug to a stored procedure.
>
> I put some statements like this throughout the code:
>
> select 'some message here';
>
> but I never see them.
> I put them in a test procedure that works fine, so that I have a feeling
> that when an insert fails in a down-stream try catch block, it messes up
> the display of the information.
>
> Can someone tell me how to best go about outputting debug I can see from a
> stored procedure, or if I am even correct about try catch blocks throwing
> errors, messing up the debug visibility.


I don't have any experience of the TRY-CATCH block messing up the output.
If the debug SELECT does not appear, my interpretation is that the
SELECT statement is never executed. That is, you never reach that part
of the code.

Seeing the actual code would make it easier to say what is going on.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2008, 03:05 PM
Jeff Kish
 
Posts: n/a
Default Re: select 'message'; not appearing

On Tue, 15 May 2007 21:37:39 +0000 (UTC), Erland Sommarskog
<esquel@sommarskog.se> wrote:

>Jeff Kish (jeff.kish@mro.com) writes:
>> I am trying to add some debug to a stored procedure.
>>
>> I put some statements like this throughout the code:
>>
>> select 'some message here';
>>
>> but I never see them.
>> I put them in a test procedure that works fine, so that I have a feeling
>> that when an insert fails in a down-stream try catch block, it messes up
>> the display of the information.
>>
>> Can someone tell me how to best go about outputting debug I can see from a
>> stored procedure, or if I am even correct about try catch blocks throwing
>> errors, messing up the debug visibility.

>
>I don't have any experience of the TRY-CATCH block messing up the output.
>If the debug SELECT does not appear, my interpretation is that the
>SELECT statement is never executed. That is, you never reach that part
>of the code.
>
>Seeing the actual code would make it easier to say what is going on.

thanks.
knowing nothing 'mysterious' is going on means I need to double check again
for ignorance on my part.

Jeff Kish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:24 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com