-
Call stored procedure from Unix Shell Script
Can you please let me know How to call stored procedure from Unix shell script?
Thanks!
-
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
Note:
Surround the first END with double angle brackets. The forum only shows single brackets when posted, that's why there are quotation marks.
Last edited by stecal; 12-17-2002 at 02:29 PM.
-
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
-
Re: Call stored procedure from Unix Shell Script
Originally posted by Sharma
Can you please let me know How to call stored procedure from Unix shell script?
Thanks!
The trend nowadays is to do it the other way around: execute OS commands from within PL/SQL :-)
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g,12c
email: ocp_9i@yahoo.com
-
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.
May direct it to device null..
$ sh runme.sh /dev/null 2>&1
-
double quotes are not needed for >> and <<
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|