The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 12:37 PM
Connecting to Oracle from Ruby on Rails iBot Oracle Updates (RSS) 0 04-06-2008 05:10 AM
Having A Problem Connecting to Oracle Using Cron goodmis UNIX for Dummies Questions & Answers 1 03-20-2007 04:12 PM
Connecting to Oracle from Shell..What Am I doing Wrong dzyr4tt Shell Programming and Scripting 1 12-21-2006 01:05 AM
Connecting to a Oracle Db using SunOS darmat0712 UNIX for Dummies Questions & Answers 2 03-03-2005 01:17 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-29-2008
ksmbabu ksmbabu is offline
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
  #2 (permalink)  
Old 04-29-2008
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0