Oracle procedure is not executing in uix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Oracle procedure is not executing in uix
# 1  
Old 11-19-2008
Oracle procedure is not executing in uix

Hi Guys,

I am trying to tun a oracle proedure throgh unix shell script but it is not running i dont know why ? i have tested this procedure in sqlplus and it was working fine.
can you see the script and sql file and let me know where is my mistake.

script:bm_chart_table_loading.sh

#!/usr/bin/sh
sqlplus -s redknee/chrome9 @myproc.sql
exit 0;
ipcg1:/opt/redknee/home/oracle/Procedures_Execution[!]>cat myproc.sql
begin
proc_insert_bmchart1;
end;
/
exit 0;

sql file:myproc.sql

begin
proc_insert_bmchart1;
end;
/
# 2  
Old 11-19-2008
chk ur sqlplus

check whether its istalled or not

you can use command
Quote:
which sqlplus
# 3  
Old 11-19-2008
Hi

It is fine and sql plus is also working fine.
# 4  
Old 11-19-2008
Quote:
Originally Posted by shary
Hi Guys,

I am trying to tun a oracle proedure throgh unix shell script but it is not running i dont know why ? i have tested this procedure in sqlplus and it was working fine.
can you see the script and sql file and let me know where is my mistake.

script:bm_chart_table_loading.sh

#!/usr/bin/sh
sqlplus -s redknee/chrome9 @myproc.sql ( This line will run the commands in file 'myproc.sql' after connecting to oracle as redknee)
exit 0; ( This line will cause an exit from the script, below lines won't be executed )
ipcg1:/opt/redknee/home/oracle/Procedures_Execution[!]>cat myproc.sql
begin
proc_insert_bmchart1;
end;
/
exit 0;

sql file:myproc.sql

begin
proc_insert_bmchart1;
end;
/


You can use 'sh -vx bm_chart_table_loading.sh' to debug ur script and find the flow
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stored Procedure not executing

below code is not executing the stored procedure,not sure what the issue.Even sqllog is blank.please help me its very urgent. sqlplus -s $connect_str@$DB_ORACLE_SID >> ${SQL_LOG_FILE} << EOF set serverout on set feed off set head off set pages 0 set colsep , set tab off set lin 150... (3 Replies)
Discussion started by: katakamvivek
3 Replies

2. Shell Programming and Scripting

SP2-0642 error while executing procedure from shell script

hi all, i have a unix script where i am calling a database procedure from it. while executing the procedure i am getting an error: but when i tried to call the same procedure manually then it ran successfully, i goggled this issue and found timezone.dat file missing at... (0 Replies)
Discussion started by: lovelysethii
0 Replies

3. Shell Programming and Scripting

Processing values from Oracle procedure

Hi all, My oracle procedure returns more than one value. i need to get one value at a time upto ending value ina shell script. Please help me..... (9 Replies)
Discussion started by: pmreddy
9 Replies

4. Programming

Oracle Procedure approach

HI All , I am new to oracle procedures. Please help me for the approach to satify the requirement. I need to create procedures. with parameters passed ( say report,type,identities,country ) It should also call sql query within the procedures and passed parameters should be used in where clause... (2 Replies)
Discussion started by: Perlbaby
2 Replies

5. Shell Programming and Scripting

Executing procedure using script

Hi, I want to have a automted script to exceute 20 procedures one by one. Suppose below is one procedure once it get executed script will write "PL/SQL procedure successfully completed." to a log for ex- exec dbms_stats.gather_table_stats(); Now later procedure starts executing... (1 Reply)
Discussion started by: sv0081493
1 Replies

6. Shell Programming and Scripting

Executing oracle procedure using cronjob

Hi, Below is the code to execute the procedure "dbms_job.broken" from the shell script. on executing manually, it works properly without any error. but it is not working when scheduled using the cronjob. #!/usr/bin/bash user_name="oracdb" password="ora123" tns="localdb"... (2 Replies)
Discussion started by: milink
2 Replies

7. Shell Programming and Scripting

Executing Procedure from shell script..

Hello, I created a sql file to create a Procedure, and it was successfully created. I created a sql file to execute the procedure, and it did without any errors, but i dont see the data been updated. The Execute procedure.sql script is: BEGIN set serveroutput on size 1000000 execute... (5 Replies)
Discussion started by: msrahman
5 Replies

8. Shell Programming and Scripting

passing variable to oracle procedure

using the script below I want to pass a parameters thorugh my sql call(@/unixsxxx/xxxx/helpenv.sql emptab ) as input into an oracle procedure xxxx_package.proc1(%1,emptab); . I tried %1 but it does not work. Any suggestions. #!bin/ksh set -x # export... (0 Replies)
Discussion started by: TimHortons
0 Replies

9. UNIX for Dummies Questions & Answers

calling Oracle procedure from Unix

Does anyone know how to call an Oracle stored procedure from a Unix script? (1 Reply)
Discussion started by: ssmiths001
1 Replies

10. UNIX for Advanced & Expert Users

Oracle stored procedure.

I am using sqlplus. I have the stored procedure name. How can i print the stored procedure content? (2 Replies)
Discussion started by: kamil
2 Replies
Login or Register to Ask a Question