This content has been marked as final. Show 4 replies
AnkitV wrote:Calling procedure must terminate before data is actually written to the file.
I have 3 statements and I am writing some thing to a file using UTL_FILE.PUT_LINE after each statement is over. Each statement takes mentioned time to complete.
I am opening file in append mode.
statement1 (takes 2 mins)
statement2 (takes 5 mins)
statement3 (takes 10 mins)
I noticed that I am able to see contents written by UTL_FILE.PUT_LINE only after statement3 is over, not IMMEDIATELY after statement1 and statement2 are done ?
Can anybody tell me if this is correct behavior or am I missing something here ?
It is expected & correct behavior.
You might try dbms_application_info if you want "real time" monitoring of such code.
Use can use utl_file.fflush to have the database writer write output from the file buffer to the file. If you do this too often it can seriously hamper the performance.
See docs: http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/u_file.htm#i1003404
Thanks a lot for reply.