connecting to oracle thro informatica


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting connecting to oracle thro informatica
# 1  
Old 04-29-2008
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  
Old 04-29-2008
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

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Connecting to Oracle database

Hi guys, long time no typing :D I have problems when I try to connect to Oracle database from SQL Developer which is located on my Windows box. Server is running Solaris 11/11 and Oracle 11 enterprise. I can log in locally with sys account to database, start it up and shut it down but when I... (2 Replies)
Discussion started by: solaris_user
2 Replies

2. Shell Programming and Scripting

Help need Connecting to Oracle DB from Unix

I have a table called CLARIFICATION in one of my schema in Oracle Data Base. I have to connect to oracle Data Base from Unix and compare the one of the column(Exec_Date) in CLARIFICATION table with Sysdate.If Exec_Date = Sysdate go head and run rest of the script otherwise exit out with out... (2 Replies)
Discussion started by: veeru
2 Replies

3. Shell Programming and Scripting

Connecting to oracle database

Hai i want to connect to oracle database from user input and create a view. ${ECHO} "Debut Creating View" ${ECHO} "Please Enter the User Name:" read user_name ${ECHO} "Please Enter the Connection String:" read con_string ${ECHO} "Please Enter the Password:" read pwd... (3 Replies)
Discussion started by: shenthil76
3 Replies

4. Shell Programming and Scripting

Connecting to Oracle DB using sqlplus

Hi, I am very new to shell scripting and trying to write a simple shell script in which i am trying to achieve the following: 1. Connect to oracle database hosted on a different server 2. fire a query on the oracle db 3. store the output in a variable 4. use this variable for further logic... (26 Replies)
Discussion started by: shrutihardas
26 Replies

5. UNIX for Dummies Questions & Answers

Connecting to Oracle DB using sqlplus

Hi, I am very new to shell scripting and trying to write a simple shell script in which i am trying to achieve the following: 1. Connect to oracle database hosted on a different server 2. fire a query on the oracle db 3. store the output in a variable 4. use this variable for further logic... (1 Reply)
Discussion started by: shrutihardas
1 Replies

6. Shell Programming and Scripting

Connecting to ORACLE through SHELL

Hi, I am trying to connect to oracle database (9.2.0.7.0) through Sun solaris. But I am unable to do so. The content of my script is as follows: Shell Sript: RESULT=`$ORACLE_HOME/bin/sqlplus schema/'pwd'@db << EOF set echo on; set feedback on; @/home/count/qry.sql` echo... (10 Replies)
Discussion started by: fidelis
10 Replies

7. Shell Programming and Scripting

Help me Connecting CA::Autosys to oracle DB

Hi :), Am new to work with Autosys. I have Oracle installed in my computer. Please guide me how to configure and connect autosys with oracle database. thank you..!:) (0 Replies)
Discussion started by: bhuvaneshlal
0 Replies

8. Shell Programming and Scripting

Connecting CA::Autosys to oracle DB

Hi :), I have installed CA Autosys in my Unix system. It contains 3 ( .pm ) files namely AutoSys.pm, Job.pm, Status.pm ....... in a directory CA. Am trying to work with autosys for first time. Please guide in how do i connect autosys to oracle DB in my system. My oracle db name is XE.. Thank... (0 Replies)
Discussion started by: bhuvaneshlal
0 Replies

9. Shell Programming and Scripting

Connecting to Oracle Database

if; sql="select username from dba_users where username = '$FromUser';" check_FromUser=`ExecSql "$sql"` I want to connect to Oracle database & check the users in the database, store the value in check_FromUser. First how to connect to Oracle database from the shell script ? Appreciate your... (4 Replies)
Discussion started by: dreams5617
4 Replies

10. UNIX for Dummies Questions & Answers

Connecting to a Oracle Db using SunOS

Hi Guys, how do I connect to a Oracle Database from my machines running on Solaris 5 and 9. Do I need a Oracle client installed or is there any other way to connect to the Oracle Db without using the oracle client? Any inputs will be highly appreciated. (2 Replies)
Discussion started by: darmat0712
2 Replies
Login or Register to Ask a Question