Thursday, January 22, 2009

Copying Files using PLSQL

Hi all
Most of the time we have requirement of moving files….we normally use the Shell script to move the files…
It is not mandatory we need to use shell scripts.
There are plsql api’s which can move files from one location to other location..

I think every one is aware of UTL_FILE .even it has some limitations…like the directory strucuture used by it should be in the UTL_FILE_PATH in init.ora …or Directory object should exist for that path…

For copying the file..
Utl_File.Fcopy ( src_location => p_file_location
,src_filename => p_file_name
, dest_location => p_arch_location,
dest_filename => p_arch_file );

For removing the file..:


We can use this package when the directories are fixed and only file movement should happen..if you want to create directories at run time
I think shell scripting is a better option…


Sridevi Koduru said...
This comment has been removed by the author.
Anonymous said...

I Facing problem while executing this package.

As both directories are preset on server and it is correct.

Cause: FDPSTP failed due to ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 270
ORA-06512: at "SYS.UTL_FILE", line 1243

Is there any setup issue?

Sridevi Koduru said...
This comment has been removed by the author.
Sridevi Koduru said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at | +91 - 9581017828.

oracle fusion financials training said...

Oracle fusion financials online training institute we have our branch over all the India.
Oracle Fusion Cloud HCM Online Training in Hyderabad, Bangalore, Delhi, Chennai, Katakana, Pune,
Mumbai, Ahmadabad, Gorgon, Noida, India, Dubai, UAE, USA, Kuwait, UK, Singapore, Saudi Arabia,
Canada, Oracle Fusion HCM Online Trainings
thanks for sharing information for more information please visit site
oracle fusion financials training
oracle fusion financials online training
oracle fusion Procurement training training
oracle fusion procurement online training

erptree 6666 said...

your site is genuine to view sir
thank you for your valluable information sir

Iwebworld Info said...

this blog providing good information To learn NodeJS AngularJS MongoDB Training contact: