Home » SQL & PL/SQL » SQL & PL/SQL » Ftping using oracle procedure (unix)
Ftping using oracle procedure [message #396765] Wed, 08 April 2009 00:27 Go to next message
ashi1234
Messages: 3
Registered: April 2009
Junior Member
Hi
I am executing a shell script from oracle plsql by executecmd. This shell contains the ftp scripts. when i am executing from server, I am getting ftp failed message but when i am running from client using sqlplus, i am able to ftped successfully. Can someone help me.
Re: Ftping using oracle procedure [message #396766 is a reply to message #396765] Wed, 08 April 2009 00:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I am executing a shell script from oracle plsql by executecmd.
We do not know what the script contain.

>This shell contains the ftp scripts.
So you say.

>when i am executing from server, I am getting ftp failed message
So you say
What errors?

>but when i am running from client using sqlplus, i am able to
ftped successfully. Can someone help me.

Help you with what?



Re: Ftping using oracle procedure [message #396875 is a reply to message #396766] Wed, 08 April 2009 04:40 Go to previous messageGo to next message
ashi1234
Messages: 3
Registered: April 2009
Junior Member
Hi BlackSwan,

Thanks for you reply.

The shell script is being called from below procedure:

mppspp1.Oscmd(K_FTP_COMMAND || ' ' || K_FILE_NAME );

where K_FTP_COMMAND='/sites/vsna/site/live/ftp/scripts/./transfer_edw_file.ksh'
and K_FILE_NAME='VSNAEDWSAL'.

errors:

02:00:50 INFO IT58817-P00021: 250 SenderId: "VSNAP" ReceiverId: "IG3" FileName: "VSNAEDWSAL" RefNo: "TCPIP" STRIPLF

02:00:50 INFO IT58817-P00021: waitForRequest...

02:00:50 ERROR IT58817-P00021: FTPServer: IOException, Client Connection closed.

The shell scripts is attached here.

When i am running this from cron, i am getting above error, but when i am running from SQLplus, the file is getting transfered to destination server.

Please let me know if you need more information.


[Updated on: Wed, 08 April 2009 04:43]

Report message to a moderator

Re: Ftping using oracle procedure [message #396886 is a reply to message #396875] Wed, 08 April 2009 05:23 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Why do you think that this is an Oracle problem?

What happens when you run the command manually from the Server?
Re: Ftping using oracle procedure [message #396890 is a reply to message #396886] Wed, 08 April 2009 05:40 Go to previous messageGo to next message
ashi1234
Messages: 3
Registered: April 2009
Junior Member
When i ran the scripts from unix manually, it is being ftped successfully.
Re: Ftping using oracle procedure [message #396892 is a reply to message #396890] Wed, 08 April 2009 05:46 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
HI,Hope this will help you..


http://www.oracle-base.com/articles/9i/FTPFromPLSQL9i.php

Regards
Sriram
Re: Ftping using oracle procedure [message #397052 is a reply to message #396765] Wed, 08 April 2009 13:41 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>When i am running this from cron

I suspect the problem is due to incorrect or missing environmental variable.

At the top of the script add the following line:
env | sort -o /tmp/ftp.env

Then compare your interactive (working) environment to cron's (which fails).

make the one which fails as close as possible to one that works.
Previous Topic: UTL_FILE
Next Topic: SQL help
Goto Forum:
  


Current Time: Sun Nov 03 01:36:46 CST 2024