Can you please let me know How to call stored procedure from Unix shell script?
Thanks!
Printable View
Can you please let me know How to call stored procedure from Unix shell script?
Thanks!
Note:Code:#!/bin/sh
sqlplus /nolog "<<" END ">>" $LOG 2>&1
connect sys/${SYS_PASS} as sysdba
set termout off
@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catproc.sql
END
Surround the first END with double angle brackets. The forum only shows single brackets when posted, that's why there are quotation marks.
I don't want query to display result/output when it is running from shell script. I thought set termout off will help it, but it doen't.
That's up to you. You can suppress the output. set serveroutput off
The trend nowadays is to do it the other way around: execute OS commands from within PL/SQL :-)Quote:
Originally posted by Sharma
Can you please let me know How to call stored procedure from Unix shell script?
Thanks!
May direct it to device null..Quote:
Originally posted by Sharma
I don't want query to display result/output when it is running from shell script. I thought set termout off will help it, but it doen't.
$ sh runme.sh /dev/null 2>&1
double quotes are not needed for >> and <<
Quote:
Originally posted by stecal
Note:
Surround the first END with double angle brackets. The forum only shows single brackets when posted, that's why there are quotation marks.