Skip to Main Content

SQL & PL/SQL

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!

UTL_FILE function in Oracle PL/SQL package.

832160Dec 20 2012 — edited Dec 20 2012
Hi,

We have a server-client type of environment, where there is no database on client. we use a oraclq client to connect to the server.
and i have a package which uses utl_file functionality to prepare html files some thing like below:

-------------------------------------------------------------------------------------------------------------------
fileHandler := UTL_FILE.FOPEN(gTEMPDIR, filename, 'w');

utl_file.put_line(fileHandler, '<script language="javascript">');
utl_file.put_line(fileHandler, '');
utl_file.put_line(fileHandler, 'function break_frames()');
utl_file.put_line(fileHandler, '{');
utl_file.put_line(fileHandler, 'if (top.location != location)');
-------------------------------------------------------------------------------------------------------------------
This is basically a migration assignment that i have been working on, where i am migrating a application which was built over a single server (i.e. same server is the application server as well as the database server) to a environment where the database is loacated on a different server.
this package worked in older environment as it was a single server, but now in new architecture we are not allowed to write anything into the database server, which is why the above utl_file is failing.

Is there anyway we can use utl_file or any other functionality of oracle to write to the client (instead of server although database is located on server)?

setting up a database on client is the last option which i am thinking of, because if i set up database on client, there are many other application processes which need to be altered.

one of the idea in my mind(but not sure how to go ahead with this):
use dbms.output to execute a shell script located in client side. this shell script will perform the funciotn of writing the html file.
regards,
PalB.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2013
Added on Dec 20 2012
4 comments
636 views