Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

forcing dbms_output.put_line

Status
Not open for further replies.

CHUMPY

Programmer
Oct 8, 2002
37
GB
I have a package that is essentially a tool that performs a number of operations on a schema. Within this package I use the dbms_output.put_line function write back to the user the progress of the operations.

The problem is the output only appears when the whole procedure has finshed, not very good at informing the user of the progress of the tasks!

Is there anyway of forcing the dbms_output.put_line command to write back when the line is encountered rather than when the procedure is completed?

Thanks

Gareth
 
No. But perhaps you could have it email the user or write messages to a table or file. That way the user could monitor progress.

Doubtless one of our more esteemed members has a better way.
Santa/Dima?

Elbert, CO
0906 MST
 
Chumpy,

When I need to do either progress reporting or error isolation in PL/SQL, I use PL/SQL's "utl_file" package to write to a flat text file. Are you familiar with how to use that package (which opens, reads, writes, appends, and closes flat files per your needs)? If not, repost and Carp, Sem, and many others can give you some help/examples.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 16:25 (04Feb04) GMT, 09:25 (04Feb04) Mountain Time)
 
You could also write progress reports to a table which would hold your progress report messages.

You would only be able to view the messages if you do a commit after the insert of the progress message.

I don't know if that is feasible for your package.

Aryeh Keefe
 
You could use DBMS_PIPE to send messages to a monitor process. You will have to use to processes one to perform the cahgens the second the display the messages. It works find for me when I am debugging logrunning processes. You see the messages virtually immediately and ther are no buffer restrictions like with dbms_output.

regards
Leon
 
LParren,

Since I do not have the docs available for the "DBMS_..." family of packages, could you post a fully coded example of "DBMS_PIPES at Work"?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top