Sponsored Content
Top Forums Shell Programming and Scripting Need to run Oracle stored procedure from UNIX env Post 302751565 by prasson_ibm on Friday 4th of January 2013 06:35:57 AM
Old 01-04-2013
Quote:
Originally Posted by posix
Create a function for the sql activity say sql_function.
I hope using the array you can capture the output.
Code:
 
set -A var_array $(sql_function)

Traverse the array you will get the output.
Hi Posix,

Thanks for your prompt reply!

Can you please modify my script and add this code you have given because i am new in calling stored procedure from unix.

Thanks
Prasoon
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Shell arrays in oracle stored procedure

Is it possible to pass unix shell arrays in Oracle stored procedure? Is yes, how? Thanks (6 Replies)
Discussion started by: superprogrammer
6 Replies

3. Shell Programming and Scripting

Calling an Oracle Stored Procedure from Unix shell script

hai, can anybody say how to call or to execute an oracle stored procedure in oracle from unix... thanks in advance.... for ur reply.... by, leo (2 Replies)
Discussion started by: Leojhose
2 Replies

4. Shell Programming and Scripting

Invoking Oracle stored procedure in unix shell script

Here's a shell script snippet..... cd $ORACLE_HOME/bin Retval=`sqlplus -s <<eof $TPDB_USER/april@$TPD_DBCONN whenever SQLERROR exit 2 rollback whenever OSERROR exit 3 rollback set serveroutput on set pages 999 var status_desc char(200) var status_code... (1 Reply)
Discussion started by: hidnana
1 Replies

5. Shell Programming and Scripting

how to pass the values to unix shell from the oracle stored procedure.

Hi i am calling a stored procedure from unix shell like this call test_proc('0002','20100218'); the stored procedure was giving output like this dbms_output.put_line(' processed earlier'); i want to see the output in the unix shell where i called. Thanks barani (6 Replies)
Discussion started by: barani75
6 Replies

6. Shell Programming and Scripting

how to call oracle stored procedure from unix shell

Hi i want to call a oracle stored procedure from unix (using bash shell). consider this is my oracle stored procedure with parameter create procedure testproc(name IN varchar, age IN Number, id OUT Number ) AS begin id=1; dbms_output.put.line('successfull validation') end;... (6 Replies)
Discussion started by: barani75
6 Replies

7. Shell Programming and Scripting

Call and redirect output of Oracle stored procedure from unix script

Hi, Can you assist me in how to redirect the output of oracle stored procedure from unix script? Something similar to what i did for sybase isql -U$MYDBLOG -D$MYDBNAME -S$MYDBSVR -P$MYDBPWD -o$MYFILE<< %% proc_my_test 8 go %% Thanks in advance - jak (0 Replies)
Discussion started by: jakSun8
0 Replies

8. Shell Programming and Scripting

run oracle procedure in unix scripts

for j in $(du -h $1| awk '{printf("%100-s \n",$2)}') do for a in $(ls -time $(find $j -name '*.txt') | awk '{printf("\n%s %s %s %s %s",$4,$7,$8,$10,$11)}') do echo "$a">output.txt done done exit 0 echo "Password : xxxxxx " > LOG/BGH_$3.out (0 Replies)
Discussion started by: utoptas
0 Replies

9. Shell Programming and Scripting

Run stored procedure from shell script

Hello all, I am trying to run stored procrdure from shell script which takes one argument. And also I want to verify in the script whether the script executed successfully. However the Stored procedure is not running from shell script. Manually if I run it update the data in the table. Can... (29 Replies)
Discussion started by: PriyaSri
29 Replies

10. Shell Programming and Scripting

ksh and Oracle stored procedure output in logfile

Friends, I pass some runtime arguments (date, number) through ksh script to Oracle procedure, use input value and pass it on to procedure. Oracle procedure gets input value, run query and logs everything in the logfile. I'm facing with couple of challenges 1. Even though I pass all... (5 Replies)
Discussion started by: homer4all
5 Replies
SGE_SHEPHERD(8) 				      Sun Grid Engine Administrative Commands					   SGE_SHEPHERD(8)

NAME
sge_shepherd - Sun Grid Engine single job controlling agent SYNOPSIS
sge_shepherd DESCRIPTION
sge_shepherd provides the parent process functionality for a single Sun Grid Engine job. The parent functionality is necessary on UNIX systems to retrieve resource usage information (see getrusage(2)) after a job has finished. In addition, the sge_shepherd forwards signals to the job, such as the signals for suspension, enabling, termination and the Sun Grid Engine checkpointing signal (see sge_ckpt(1) for details). The sge_shepherd receives information about the job to be started from the sge_execd(8). During the execution of the job it actually starts up to 5 child processes. First a prolog script is run if this feature is enabled by the prolog parameter in the cluster configura- tion. (See sge_conf(5).) Next a parallel environment startup procedure is run if the job is a parallel job. (See sge_pe(5) for more infor- mation.) After that, the job itself is run, followed by a parallel environment shutdown procedure for parallel jobs, and finally an epilog script if requested by the epilog parameter in the cluster configuration. The prolog and epilog scripts as well as the parallel environment startup and shutdown procedures are to be provided by the Sun Grid Engine administrator and are intended for site-specific actions to be taken before and after execution of the actual user job. After the job has finished and the epilog script is processed, sge_shepherd retrieves resource usage statistics about the job, places them in a job specific subdirectory of the sge_execd(8) spool directory for reporting through sge_execd(8) and finishes. sge_shepherd also places an exit status file in the spool directory. This exit status can be viewed with qacct -j JobId (see qacct(1)); it is not the exit status of sge_shepherd itself but of one of the methods executed by sge_shepherd. This exit status can have several mean- ings, depending on in which method an error occurred (if any). The possible methods are: prolog, parallel start, job, parallel stop, epi- log, suspend, restart, terminate, clean, migrate, and checkpoint. The following exit values are returned: 0 All methods: Operation was executed successfully. 99 Job script, prolog and epilog: When FORBID_RESCHEDULE is not set in the configuration (see sge_conf(5)), the job gets re-queued. Otherwise see "Other". 100 Job script, prolog and epilog: When FORBID_APPERROR is not set in the configuration (see sge_conf(5)), the job gets re-queued. Oth- erwise see "Other". Other Job script: This is the exit status of the job itself. No action is taken upon this exit status because the meaning of this exit status is not known. Prolog, epilog and parallel start: The queue is set to error state and the job is re-queued. Parallel stop: The queue is set to error state, but the job is not re-queued. It is assumed that the job itself ran successfully and only the clean up script failed. Suspend, restart, terminate, clean, and migrate: Always successful. Checkpoint: Success, except for kernel checkpointing: checkpoint was not successful, did not happen (but migration will happen by Sun Grid Engine). RESTRICTIONS
sge_shepherd should not be invoked manually, but only by sge_execd(8). FILES
sgepasswd contains a list of user names and their corresponding encrypted passwords. If available, the password file will be used by sge_shepherd. To change the contents of this file please use the sgepasswd command. It is not advised to change that file manu- ally. <execd_spool>/job_dir/<job_id> job specific directory SEE ALSO
sge_intro(1), sge_conf(5), sge_execd(8). COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ SGE_SHEPHERD(8)
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy