Home » Developer & Programmer » Forms » host comman on linux
host comman on linux [message #480827] Wed, 27 October 2010 07:50 Go to next message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
My database as well as application on linux.
I want to excute this commond on linux.I need equivalent code.
host('cmd /c E:\data\temp\ITC1'.bat');

code of ITC1.bat is
echo off
sqlldr userid=user_name/pass@database control=E:\data\temp\ITC1.ctl log=E:\data\temp\log\ITC1.log

echo ........

control file as well as bat file exist in respective folders.
pl help me.
Re: host comman on linux [message #480833 is a reply to message #480827] Wed, 27 October 2010 08:13 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
jai_g wrote on Wed, 27 October 2010 08:50
My database as well as application on linux.
I want to excute this commond on linux.I need equivalent code.
host('cmd /c E:\data\temp\ITC1'.bat');

code of ITC1.bat is
echo off
sqlldr userid=user_name/pass@database control=E:\data\temp\ITC1.ctl log=E:\data\temp\log\ITC1.log


You'll have to change it to use the correct path for linux.
Remove the "cmd /c" part.
I do not see how this could have worked for you as te quotes are unbalanced.
You also have to use the correct path in the shell script.
The shell script has to be executable (chmod 755).

Re: host comman on linux [message #480837 is a reply to message #480833] Wed, 27 October 2010 08:26 Go to previous messageGo to next message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
Hi,
I am new to linux. I can not understand executable (chmod 775). i create this script within form it self.
Re: host comman on linux [message #480843 is a reply to message #480837] Wed, 27 October 2010 09:14 Go to previous messageGo to next message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
Dear,
I tried duly removing "CMD /C", but there is no data loaded in the table.
The host commond is "host('cmd /c E:\data\temp\ITC1.bat');".
Re: host comman on linux [message #480844 is a reply to message #480843] Wed, 27 October 2010 09:15 Go to previous messageGo to next message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
The changed host commond is "host('/data/temp/ITC1.sh');".
Re: host comman on linux [message #480845 is a reply to message #480844] Wed, 27 October 2010 09:20 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So does it work now?
Re: host comman on linux [message #480856 is a reply to message #480844] Wed, 27 October 2010 14:22 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
1. That shell script will have the have execute rights on it (chmod 755).
2. That shell script will have to give linux paths, not windows paths.
3. That shell script will probably have to have ORACLE_HOME, PATH and ORACLE_SID set. Calling an additional shell may not know any of your environment variables.
4. you may need to give full literal path for sqlldr
Re: host comman on linux [message #480869 is a reply to message #480856] Wed, 27 October 2010 23:31 Go to previous messageGo to next message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
I included the home path to sqlldr, still no data loaded in the table.
Re: host comman on linux [message #480915 is a reply to message #480869] Thu, 28 October 2010 02:26 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
There's lots of things that can go wrong here so:
1) If you call sqlloader directly on the linux box does it work?
2) If you call the shell script directly does it work?
Re: host comman on linux [message #480945 is a reply to message #480915] Thu, 28 October 2010 07:11 Go to previous message
jai_g
Messages: 23
Registered: July 2009
Location: India
Junior Member
I was sucess.
I insert in begining of shell script as
#!/bin/bash
export ORACLE_SID=my_sid
export ORACLE_HOME=my_home
export PATH=my_home/bin.

thanks for all helping me
Previous Topic: dynamic form according to rows in another table
Next Topic: problem_with_my_smartBar_and_iconic_buttons
Goto Forum:
  


Current Time: Fri Sep 20 04:52:49 CDT 2024