06-17-2008
Hi vins,
You are already got the above 90% stuff for executing the Stored Procedure from Shell Script. Why you are repeating the question ?????
RETVAL=`sqlplus -s USERNAME/PASSWORD@DBNAME <<EOF
SET SERVEROUTPUT ON SIZE 100000
Declare
OUT_STATUS NUMBER;
OUT_MSG VARCHAR2(200);
Begin
ODS_SP_REMOVE_PRE_SUB_DUP(OUT_STATUS, OUT_MSG);
dbms_output.put_line ('KeepThis '||OUT_STATUS ||' '||nvl(OUT_MSG,''));
End;
/
SET SERVEROUTPUT OFF
EXIT;
EOF`
X=`echo $RETVAL | grep KeepThis | awk '{print $2}'`
Y=`echo $RETVAL | grep KeepThis | awk '{print $3}'`
echo "Procedure: ODS_SP_REMOVE_PRE_SUB_DUP output is: "
echo "OUT_STATUS= $X"
echo "OUT_MSG= $Y "
Note: Set the Environmentol variables ($ORACLE_HOME, $PATH, $ORACLE_BASE, $ORACLE_SID, $TNS_ADMIN)are must before call the Oracle Stored Procedure.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here is a snippet of my code:
if
then
echo "\n Deleting all reports older than 24 hours. \n" >> $logfile
ls -l $FileName >> $logfile
... (1 Reply)
Discussion started by: mh53j_fe
1 Replies
2. Shell Programming and Scripting
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
hi,
this is urgent..can i run a shell script from store procedure without using java. (8 Replies)
Discussion started by: arnabb4u
8 Replies
4. Shell Programming and Scripting
Hi everyone!
I'm new with Shell Scripting, and I have to do a shell script to call a procedure, which have 2 input parameters, the directory(from server) and the txt file (which have informations to update/insert in DB).
I have to create a shell script to execute that procedure for each txt... (5 Replies)
Discussion started by: renatoal
5 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
How to execute the stored procedure from shell script and is there any possibility to print the dbms output in a log file. (2 Replies)
Discussion started by: dineshmurs
2 Replies
7. Shell Programming and Scripting
HI,
i want to write a script (Linux) that:
1) connect to a database oracle
2) execute some store procedure.
Can anybody help me, please?
Thanks a lot
Andrew (3 Replies)
Discussion started by: manichino74
3 Replies
8. Shell Programming and Scripting
Hi Gurus,
Want to execute a shell script from a oracle procedure and get the status of the same, any assistance in this regard will be appreciated.
proc_data.sh is script name which I want to execute from oracle procedure
It should work something like below
procedure test
begin... (1 Reply)
Discussion started by: palanisvr
1 Replies
9. Shell Programming and Scripting
i have the following code inside a shell script .prog in oracle server when i call the program
DBMS_OUTPUT.PUT_LINE(x_return_status|| ln_rep_req_id);
will return 0 , it is very strange , i try to submit the concurrent request in oracle , and it can successfully executed, what am i missing ? i... (1 Reply)
Discussion started by: feilhk
1 Replies
10. UNIX for Beginners Questions & Answers
Here is the shell script which need to trigger a stored procedure and when the record count is 0 then it should capture in the log that 0 duplicate records are found and if it's more than 0 then log with no of records. Also if there is any sqlerror then it should write the same in the log file and... (17 Replies)
Discussion started by: senmng
17 Replies
LEARN ABOUT DEBIAN
apache::session::store::oracle
Apache::Session::Store::Oracle(3pm) User Contributed Perl Documentation Apache::Session::Store::Oracle(3pm)
NAME
Apache::Session::Store::Oracle - Store persistent data in a Oracle database
SYNOPSIS
use Apache::Session::Store::Oracle;
my $store = new Apache::Session::Store::Oracle;
$store->insert($ref);
$store->update($ref);
$store->materialize($ref);
$store->remove($ref);
DESCRIPTION
Apache::Session::Store::Oracle fulfills the storage interface of Apache::Session. Session data is stored in a Oracle database.
SCHEMA
To use this module, you will need at least these columns in a table called 'sessions':
id varchar2(32) # or however long your session IDs are.
a_session long
To create this schema, you can execute this command using the sqlplus program:
CREATE TABLE sessions (
id varchar2(32) not null primary key,
a_session long
);
If you use some other command, ensure that there is a unique index on the table's id column.
CONFIGURATION
The module must know what datasource, username, and password to use when connecting to the database. These values can be set using the
options hash (see Apache::Session documentation). The options are DataSource, UserName, and Password.
Example:
tie %hash, 'Apache::Session::Oracle', $id, {
DataSource => 'dbi:Oracle:database',
UserName => 'database_user',
Password => 'K00l'
};
Instead, you may pass in an already-opened DBI handle to your database.
tie %hash, 'Apache::Session::Oracle', $id, {
Handle => $dbh
};
The last option is LongReadLen, which specifies the maximum size of the session object. If not supplied, the default maximum size is 8 KB.
AUTHOR
This modules was written by Jeffrey William Baker <jwbaker@acm.org>
A fix for the commit policy was contributed by Michael Schout <mschout@gkg.net>
SEE ALSO
Apache::Session, Apache::Session::Store::DBI
perl v5.10.1 2010-10-18 Apache::Session::Store::Oracle(3pm)