To Log DBMS in a file from procedure [message #646725] |
Thu, 07 January 2016 08:16 |
|
rohit_shinez
Messages: 139 Registered: January 2015
|
Senior Member |
|
|
Hi Guys,
Is there a way to log DBMS_OUTPUT.PUT_LINE from procedure to log file
procedure test(p_in date,p1_in date)
is
begin
DBMS_OUTPUT.PUT_LINE('Process started');
.
.
.
end
|
|
|
|
|
|
|
Re: To Log DBMS in a file from procedure [message #646738 is a reply to message #646725] |
Thu, 07 January 2016 10:19 |
|
Michel Cadot
Messages: 68647 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Now the question raises: what is your actual goal?
To spool what is displayed from SQ*Plus when recorded using dbsm_output?
To log into a file (from what?) what was recorded in dbms_output by called procedures?
To log into a file what do your procedures?
...?
Or in simple words, why your test procedure uses DBMS_OUTPUT which purpose is to be displayed on a screen and not UTL_FILE which purpose is to write into a file?
[Updated on: Fri, 08 January 2016 14:30] Report message to a moderator
|
|
|
Re: To Log DBMS in a file from procedure [message #646789 is a reply to message #646738] |
Fri, 08 January 2016 13:56 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
Our make a logging procedure that uses pragma autonomous_transaction; to store the logging into a log table so no matter what happens to the procedure, the log is saved. If you use DBMS_OUTPUT, it is not displayed if the job aborts.
|
|
|
|
|
|