Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Spool to multiple files

Dennis HancyJan 30 2025

Hello,

I have a PL/SQL package where I need to spool output to various client-side folders/files.

In general, I realize I can use something like this:

set serveroutput on;
spool C:\Temp\spoolTest.txt;
exec myPackage.mainProc; 
spool off;

However, within this package, I need the output to spool to different folders/files based on system requirements.

Is there a way to accomplish this using spool? I am guessing we cannot change the spool file name on the fly within the PL/SQL. Is there another approach we can use instead?

Thank you!

Dennis

This post has been answered by Solomon Yakobson on Jan 31 2025
Jump to Answer
Comments
Post Details
Added on Jan 30 2025
4 comments
76 views