Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing on Console in DB2 Store Procedures

999 views
Skip to first unread message

vj

unread,
May 6, 2005, 1:59:10 PM5/6/05
to
Is there a way out to Print on the console during the execution of
Stored Procedures.

Serge Rielau

unread,
May 6, 2005, 2:12:40 PM5/6/05
to
vj wrote:
> Is there a way out to Print on the console during the execution of
> Stored Procedures.
>
During the execution: No, at least no built-in one.
For debugging (I presuem that's what you want to do)
you can use a temp table.. There was a thread just yesterday about logging.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

amurchis

unread,
May 19, 2005, 6:57:19 PM5/19/05
to
Keep in mind any stored procedure is running inside a DB2 server
process, which in essence means the procedure code is running inside a
server daemon process -- in other words, background processes. Daemon's
typically have their STDOUT & STDERR outputs disabled (to use a unix
term, piped to /dev/null) -- as:

1) For a multi-user system, which display gets the output?
2) Who's to say there is actually a console to display the output on?

Your best bet to see any output from a procedure is to open a file
inside that procedure, and direct any output of the procedure to that file.

0 new messages