Skip to Main Content

Oracle Forms

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Copy File From Windows OS To Linux Using Host Built-In

awadSep 2 2014 — edited Sep 11 2014

Dear All,

My company has archiving system that saves the files into application server (Windows server 2003 OS) file system. I want to send emails from database which run in Linux Redhat OS.

In order to send attachments I need to transfer files from application server to directory in database server which I use to create DIRECTORY object to be used in SEND_MAIL procedure.

I download Putty PSCP tool and add the path to the application server's PATH variable. I was able to copy files using cmd directly, but when I tried HOST built-in inside my form nothing happened.

I am using Oracle forms 10g , Oracle database 10g. I used the following code :

LCopy_Cmd := 'cmd /c pscp -pw rootpwd '||l_file_path ||' root@10.2.2.11:/mail_arch';

Host(LCopy_Cmd);

IF FORM_SUCCESS THEN

     MSG_ALERT('True');

ELSE

     MSG_ALERT('False');

END IF;

The code showing 'False' and nothing copied.

I also tried to give full path to pscp.exe with no benefits.

Any Ideas please ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2014
Added on Sep 2 2014
6 comments
1,965 views