Home » Infrastructure » Unix » calling procedure in unix shell script-1
icon6.gif  calling procedure in unix shell script-1 [message #239913] Wed, 23 May 2007 11:24 Go to next message
jackusa
Messages: 6
Registered: May 2007
Junior Member
Hai All,

can any provide one example in unix shell script with
connect to oracle and executing procedure(UTL_FILE) written in oracle.
Re: calling procedure in unix shell script-1 [message #239919 is a reply to message #239913] Wed, 23 May 2007 11:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>can any provide one example in unix shell script with
Can you SEARCH this forum for this exact question asked earlier this week?
Re: calling procedure in unix shell script-1 [message #239957 is a reply to message #239913] Wed, 23 May 2007 13:57 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
#!/bin/ksh -x
# make env file avail to this script
. $HOME/.profile_mydb
$ORACLE_HOME/bin/sqlplus /NOLOG <<HERE
-- Exit with failure, if SQL, PL/SQL or OS error is raised in top level proc
WHENEVER SQLERROR EXIT FAILURE;
WHENEVER OSERROR EXIT FAILURE;
CONNECT oracle/password
@$ORACLE_HOME/rdbms/admin/exampleeeeeee.sql
Exit
Exit 0


save it with .sh and run it like

.my_script.sh

[Updated on: Wed, 23 May 2007 13:58]

Report message to a moderator

Previous Topic: sql and plsql inside shellscripts
Next Topic: Scripts to change environment
Goto Forum:
  


Current Time: Thu Apr 18 03:20:23 CDT 2024