Home » SQL & PL/SQL » SQL & PL/SQL » How to copy a file from a directory to another using PL/SQL...URGENT
How to copy a file from a directory to another using PL/SQL...URGENT [message #40441] Tue, 08 October 2002 11:28 Go to next message
Vikash
Messages: 17
Registered: April 2002
Junior Member
hello to all,

I am currently doing a Bsc project on oracle using PL/SQL. I am implementing a system to send attachment based on an intranet. Well I dont know the command of how to copy a file from one directory to another using PL/SQL... Can anyone help me...its urgent
Re: How to copy a file from a directory to another using PL/SQL...URGENT [message #40443 is a reply to message #40441] Tue, 08 October 2002 13:44 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
You can't in 8i, you need to run the copy/move from the OS level. You can invoke the OS command from pl/sql - see the following URLS:
(you need DBA assistance for this one to se up the Java privs)

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:952229840241
(no need for DBA access if you have access to execute dbms_pipe)
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:16212348050

If your webserver and database are on different hosts, then you can't just use a straight copy/move - you need can do it through rsh.
Re: How to copy a file from a directory to another using PL/SQL...URGENT [message #40445 is a reply to message #40443] Tue, 08 October 2002 13:58 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
In 9.2 (9ir2), utl_file has new functionality to copy, rename and delete files. FCOPY, FRENAME, FREMOVE. I believe it can handle binary files too - unlike in 8i.
Previous Topic: PL/SQL Block
Next Topic: Subqueries in detail
Goto Forum:
  


Current Time: Thu Dec 18 19:43:39 CST 2025