Home » SQL & PL/SQL » SQL & PL/SQL » Calling procedure from unix shell scripts-URGENT (oracle 9i)
Calling procedure from unix shell scripts-URGENT [message #327002] Fri, 13 June 2008 06:04 Go to next message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
hi ,
i need a help from you..
i am working with oracle and unix..Also i am new to this .
i need to develop a MENU using SHELL SCRIPTS and from that i have to call my procedures and functions ... simply telling mean my front end is UNIX and back end is ORACLE .....
can anybody help me .. it`s urgent ..
Thanks in advance.......


Re: Calling procedure from unix shell scripts-URGENT [message #327004 is a reply to message #327002] Fri, 13 June 2008 06:09 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Mmmm..... how exactly does 'Create a menu using unix shell scripts' count as an Oracle problem?
Re: Calling procedure from unix shell scripts-URGENT [message #327006 is a reply to message #327002] Fri, 13 June 2008 06:14 Go to previous messageGo to next message
sarwagya
Messages: 87
Registered: February 2008
Location: Republic of Nepal
Member
Try it if it helps
#!/bin/bash
# oracle environment variables
ORACLE_BASE=/oracle
ORACLE_HOME=your_oracle_home
ORACLE_SID=your_sid
TZ=NPT
LD_LIBRARY_PATH=/lib:$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH TZ
##
CUR_PATH=path_to_your_oracle_script

$ORACLE_HOME/bin/sqlplus database_user/database_password<<EOS
	@${CUR_PATH}/your_procedure_file_name
EOS


Re: Calling procedure from unix shell scripts-URGENT [message #327008 is a reply to message #327002] Fri, 13 June 2008 06:43 Go to previous messageGo to next message
saikumar_mudigonda
Messages: 23
Registered: June 2008
Location: hyderabad
Junior Member
may be it is helpful.

sqlplus -s $db_login/$db_passwd@$oracle_sid << EOF>/dev/null 
SET HEAD OFF
SET FEEDBACK OFF
SET ECHO OFF
SET VERIFY OFF
SET SERVEROUTPUT ON size 100000
exec YOURPROCEDURE (PARAMETERS);
exit
EOF
Re: Calling procedure from unix shell scripts-URGENT [message #330375 is a reply to message #327002] Mon, 30 June 2008 00:06 Go to previous message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
Thanks Friends..its working now
Previous Topic: rounding off column value
Next Topic: convert error to a table format
Goto Forum:
  


Current Time: Tue Dec 06 02:25:17 CST 2016

Total time taken to generate the page: 0.11785 seconds