Solved

alternatives to UTL_FILE

Posted on 2002-03-19
6
1,353 Views
Last Modified: 2008-01-16
We have used UTL_FILE package to extract records i.e. insert statements of a schema on oracle server 8.1.6 on win NT4. Now we want alternatives that can get us inserts on clinet machine/application server. Basically we
want to run the extract jobs on the application server and it should write the file onto the application box and not the database box. Is there a method to use other built in packages OR self created packages OR a complicated PL/SQL procedure which uses SQL, PL/SQL and dynamic SQL. I have a insert genrating query which can be caught in spooling but this is quite manual and error prone. Please help me to solve this practical problem.
---sesh2002
0
Comment
Question by:sesh2002
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:mouatts
ID: 6880547
This seems to be a bit obvious so maybe I'm missing something, but why not just mount the disk you want the file written to on the DB box then you can still use UTL_FILE?

Steve
0
 
LVL 4

Accepted Solution

by:
jtrifts earned 50 total points
ID: 6882184
UTL_FILE as you have pointed out is a server-side package that therefore functions on the server.

For use on the client machine, you can use the Oracle built-in TEXT_IO from within an Oracle form.

Alternatively you may use Oracle Reports from the client, and then either print the output or store the output for later printing.

Finally, you might consider keeping the file generation using UTL_FILE, but set up a share for the client to view the directory where output is written.

If you are mingling NT clients with UNIX servers, then you can achieve the same result by setting up a SAMBA share (aka SAMBA link) which enables an NT user to view UNIX folders from within an Explorer window).

Hope this helps,
JT
0
 

Expert Comment

by:naikrakesh
ID: 6884440
I guess JT is correct here. UTL_FILE_DIR can be aaaigned a value " * " and can be made to write to virtually any directory if one wants to also mounted file systems.

Rakesh
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 11

Expert Comment

by:mouatts
ID: 6886397
Funny I though I suggested using a share first. Well I won't be answering anymore of your questions.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 6886442
mouatts,
if points are what you're concerned about please go to the post on http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=oracle&qid=20279975

and you will find 50 points waiting for you ...

Having been with E-E for so long, I would have thought the points would be "beside the point".  I was not trying to poach -- merely add to the discussion.

I do hope you will not withold your experience and knowledge over a possible misappropriation of 5 points.

Kind regards,
JT
0
 
LVL 11

Expert Comment

by:mouatts
ID: 6888320
Jtrifts my problem is not with you, nor is it for the points, I hadn't even noticed how many points where on offer. More simply I am just getting a little tired of answering peoples questions and then someone else getting the credit down the line.

Steve
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now