dbTalk Databases Forums  

SQL Stored Procedure Progress / Status

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss SQL Stored Procedure Progress / Status in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fin
 
Posts: n/a

Default SQL Stored Procedure Progress / Status - 03-29-2011 , 03:57 PM






Is there any possible way to get an SQL SP to report progress mid-
stream so to speak ?

I have a very lengthy SQL SP that performs many inserts, updates,
merges, calls other Functions etc and I am wondering if there is any
possible way to get it to report it's progress as if goes through the
various tasks. I have tried dynamic result sets in the middle of the
SP with something like "VALUES 'Progress 1'" but it does nothing at
all.

Any admin SP's, functions or anything that can report text back to the
CLP when running the SP ?

Reply With Quote
  #2  
Old   
Mark A
 
Posts: n/a

Default Re: SQL Stored Procedure Progress / Status - 03-30-2011 , 09:58 AM






"Fin" <tdavidge (AT) hotmail (DOT) com> wrote

Quote:
Is there any possible way to get an SQL SP to report progress mid-
stream so to speak ?

I have a very lengthy SQL SP that performs many inserts, updates,
merges, calls other Functions etc and I am wondering if there is any
possible way to get it to report it's progress as if goes through the
various tasks. I have tried dynamic result sets in the middle of the
SP with something like "VALUES 'Progress 1'" but it does nothing at
all.

Any admin SP's, functions or anything that can report text back to the
CLP when running the SP ?
You can insert rows into another table which reports the status, and then
query the table.

Reply With Quote
  #3  
Old   
Serge Rielau
 
Posts: n/a

Default Re: SQL Stored Procedure Progress / Status - 03-31-2011 , 07:01 AM



On 3/30/2011 10:58 AM, Mark A wrote:
Quote:
"Fin"<tdavidge (AT) hotmail (DOT) com> wrote in message
news:f9fa95c0-d3eb-4eb5-9632-72f8e048e174 (AT) d19g2000yql (DOT) googlegroups.com...
Is there any possible way to get an SQL SP to report progress mid-
stream so to speak ?

I have a very lengthy SQL SP that performs many inserts, updates,
merges, calls other Functions etc and I am wondering if there is any
possible way to get it to report it's progress as if goes through the
various tasks. I have tried dynamic result sets in the middle of the
SP with something like "VALUES 'Progress 1'" but it does nothing at
all.

Any admin SP's, functions or anything that can report text back to the
CLP when running the SP ?

You can insert rows into another table which reports the status, and then
query the table.


....using uncommitted read of course.
Another twist on this is to use an autonomous procedure for the same
purpose.
Finally you can send email. DB2 9.7 has a system defined module for
that, so no need to write your own.

Cheers
Serge



--
Serge Rielau
SQL Architect DB2 for LUW, IBM Toronto Lab
Blog: tinyurl.com/SQLTips4DB2
Wiki: tinyurl.com/Oracle2DB2Wiki
Twitter: srielau

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.