I have a concurrent program which is generating PDF outputs in the $APPLOUT directory. I want to copy the PDF file and store it in a different directory (say, TEMP directory) and then rename it.
Can I use UTL_FILE.FCOPY operation for the same? Both the OUT directory and TEMP directory have entries in the DBA_DIRECTORIES table. So can I use the below:-
UTL_FILE.fcopy('APPS_OUTPUT_FILE_DIR', 'XX_GEN_DEF_216079239_1.PDF', 'ODPDIR', '251432-401-20-T.PDF');
This operation is throwing error so I am not sure where am I doing wrong. Can you please help?
Also, I tried the option of using a unix host concurrent program to copy and move the file. But I am getting a permission denied error at the copy statement:-
File Exist XX_GEN_DEF_216080232_1.PDF
cp: cannot create regular file `/trndshr/tsoadev2/temp/251432-401-20-T.PDF': Permission denied
Can you throw some light here?
Thanks for any help.
What error is utl_file.fcopy throwing?
Double check the permissions your Oracle user has on the OS folder.
Are both the Unix directories (not the Oracle directories that map to them) owned by Oracle?
What permission masks do they have in Unix?
Thanks Andrew. The unix error is now resolved. In the loop the script was trying to create a duplicate file so was the error.
Thanks Paul. Yes both the directories are owned by Oracle. The unix error is resolved.
This operation is throwing error so I am not sure where am I doing wrong.
What you are 'doing wrong' is you are NOT posting anything that SHOWS US:
1. WHAT you do
2. HOW you do it
3. WHAT results you get
You say 'operation is throwing error' but don't bother to post the EXACT error so we can see it.
Does that make sense to you?
I tried the option of using a unix host concurrent program to copy and move the file. But I am getting a permission denied error at the copy
I don't see any 'unix host' command or the result of any command.
If you get a permission exception then you don't have the proper privileges.
We can NOT see your screen. Unless you post the 3 things above how do you expect help?
This is resolved now. Thanks.
This issue is resolved. Thanks everyone.
Then mark the question as answered