The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Connecting to Oracle Database dreams5617 Shell Programming and Scripting 4 05-02-2008 09:37 AM
Connecting to Oracle from Ruby on Rails iBot Oracle Updates (RSS) 0 04-06-2008 02:10 AM
Having A Problem Connecting to Oracle Using Cron goodmis UNIX for Dummies Questions & Answers 1 03-20-2007 01:12 PM
Connecting to Oracle from Shell..What Am I doing Wrong dzyr4tt Shell Programming and Scripting 1 12-20-2006 10:05 PM
Connecting to a Oracle Db using SunOS darmat0712 UNIX for Dummies Questions & Answers 2 03-03-2005 10:17 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-29-2008
Registered User
 

Join Date: Apr 2008
Location: Bangalore
Posts: 14
connecting to oracle thro informatica

Hi

I have a shell script which is running fine in unix. But if i call the shell script thro informatica workflow post session command task it is not giving me the sum(amount) to a output text file

The sql_configh.sh file has uid@db/pwd

script_path="/path"
cd $script_path

connstr=`grep "uid@db" $script_path/sql_config.sh`

touch $script_path/sum_cr_amt.txt
chmod 777 $script_path/sum_cr_amt.txt


sqlplus -s > $script_path/sum_cr_amt.txt <<eof1
$connstr
select round(sum (entered_cr),2) entered_cr from table_name
where trunc(date_created)='04-jan-2008';

eof1

x=$?

if [ x -ne 0 ]
then
exit 1
fi
exit 0

I need your gr8 help

Thanks
Babu
Reply With Quote
Forum Sponsor
  #2  
Old 04-29-2008
Playing with Ubuntu Now!
 

Join Date: Oct 2005
Location: Chennai
Posts: 364
oracle_home

What errors do you get? Have you checked the logs? Probably sqlplus path is not defined and also, make sure that the ORACLE_HOME path is defined.
Define this in your script.
Code:
export ORACLE_HOME=/path/to/oracle/home
$ORACLE_HOME/bin/sqlplus ..... #rest of the stuff
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0