Call and redirect output of Oracle stored procedure from unix script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Call and redirect output of Oracle stored procedure from unix script
# 1  
Old 03-24-2010
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

Code:
isql -U$MYDBLOG -D$MYDBNAME -S$MYDBSVR -P$MYDBPWD -o$MYFILE<< %% 
proc_my_test 8
go

%%

Thanks in advance - jak

Last edited by Scott; 03-24-2010 at 06:29 PM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To call Oracle procedure by reading parameter file in UNIX

hi Guys, is there a way to pass parameter into oracle store procedure by reading date range in file and increment accordingly. Something like this file.txt 01-JAN-2015 03-JAN-2015 sqlplus -s user/pwd@DB execute TEST( to_date( '01-JAN-2015, 'dd.mm.yyyy' ), to_date( '03-JAN-2015', ... (1 Reply)
Discussion started by: rohit_shinez
1 Replies

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

3. Shell Programming and Scripting

Calling Oracle stored procedure from ksh script

Friends, I'm newbie with ksh so wanting some help.... 1. I'm trying to call oracle stored procedure from ksh script by taking variable value from runtime, feed into script and execute procedure. 2. Put name1 and name2 value from script run replacing $3 & $4 I'm trying to put name1 in... (4 Replies)
Discussion started by: homer4all
4 Replies

4. Shell Programming and Scripting

Need to run Oracle stored procedure from UNIX env

Hi Everyone, I want to create a script where i need to run the oracle stored procedure from unix script and get the output(sequence number ) into a variable which i will pass in my datastage job. Below is my stored procedure:- DECLARE P_TRANSTYPE VARCHAR2(20); ... (4 Replies)
Discussion started by: prasson_ibm
4 Replies

5. Shell Programming and Scripting

How to call stored procedure with CLOB out parameter from shell script?

I have written a stored procedure in oracle database, which is having a CLOB OUT parameter. How can i call this stored procedure from shell script and get the CLOB object in shell script variable? (0 Replies)
Discussion started by: vel4ever
0 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

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

8. Shell Programming and Scripting

Need to call stored procedure from unix script

Hi Guys, I have a stored procedure which has 5 out parameters. I need to call the stored procedure from the script. When i use the following in my script, db2 "CALL FCFM.PART_MASTER_TMP($Return_code,$Message,$Message1,$SQL,$Load_count)" >> $LOG_FILE I am getting an error.. Please... (1 Reply)
Discussion started by: mac4rfree
1 Replies

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

10. 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
Login or Register to Ask a Question
DB2_PROCEDURES(3)							 1							 DB2_PROCEDURES(3)

db2_procedures - Returns a result set listing the stored procedures registered in a database

SYNOPSIS
resource db2_procedures (resource $connection, string $qualifier, string $schema, string $procedure) DESCRIPTION
Returns a result set listing the stored procedures registered in a database. PARAMETERS
o $connection - A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. o $qualifier - A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string. o $schema - The schema which contains the procedures. This parameter accepts a search pattern containing _ and % as wildcards. o $procedure - The name of the procedure. This parameter accepts a search pattern containing _ and % as wildcards. RETURN VALUES
Returns a statement resource with a result set containing rows describing the stored procedures matching the specified parameters. The rows are composed of the following columns: +------------------+---------------------------------------------------+ | Column name | | | | | | | Description | | | | +------------------+---------------------------------------------------+ | PROCEDURE_CAT | | | | | | | The catalog that contains the procedure. The | | | value is NULL if this table does not have cata- | | | logs. | | | | | PROCEDURE_SCHEM | | | | | | | Name of the schema that contains the stored pro- | | | cedure. | | | | | PROCEDURE_NAME | | | | | | | Name of the procedure. | | | | |NUM_INPUT_PARAMS | | | | | | | Number of input (IN) parameters for the stored | | | procedure. | | | | |NUM_OUTPUT_PARAMS | | | | | | | Number of output (OUT) parameters for the stored | | | procedure. | | | | | NUM_RESULT_SETS | | | | | | | Number of result sets returned by the stored pro- | | | cedure. | | | | | REMARKS | | | | | | | Any comments about the stored procedure. | | | | | PROCEDURE_TYPE | | | | | | | Always returns 1, indicating that the stored pro- | | | cedure does not return a return value. | | | | +------------------+---------------------------------------------------+ SEE ALSO
db2_column_privileges(3), db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_special_columns(3), db2_statistics(3), db2_table_privileges(3), db2_tables(3). PHP Documentation Group DB2_PROCEDURES(3)