Shell script to execute Oracle procedure and trigerring email on success and failure
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 it should send the communication in all scenarios. We have funct file which has declared with all directories and we are referring here for the log file path directory. But when i tried to execute it getting this error message not found [No such file or directory] - ./local/dir1/funct.sh. Also can you help me out in the code logic as well?
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)
Hi ,
i have created an .sh file that has the following code:
#!/bin/ksh
sqlplus -s p1istuat/p1istuat@CWS_IST6 @Procedure_Execute.sql &
sqlplus -s p1istuat/p1istuat@CWS_IST6 << EOF
exit
EOF
The mentioned Procedure_Execute.sql file inside has the following code:
exec TEST;
... (5 Replies)
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)
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)
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)
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)
Hi ,
I am trying to automate a gather stats in shell script
#!/usr/bin/ksh
export ORACLE_HOME=/orcl/app/oracle/product/11.2.0.1/db_1
export PATH="$PATH:$ORACLE_HOME/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ORACLE_HOME/lib32"
export TNS_ADMIN=/opt/netprobe/config... (1 Reply)
Discussion started by: neil.k
1 Replies
LEARN ABOUT REDHAT
amdd
AMDD(8) System Manager's Manual AMDD(8)NAME
amdd - Amanda version of dd
SYNOPSIS
amdd [ -d ] [ if=input ] [ of=output ] [ bs=blocksize ] [ skip=count ] [ count=count ]
DESCRIPTION
Amdd provides just enough of the standard dd command for the needs of Amanda. This is handy when doing a full restore and the standard dd
program has not yet been found.
Amdd also provides access to the Amanda output drivers that support various tape simulations. This may be used for debugging or to convert
from one format to another.
See the amanda(8) man page for more details about Amanda. See the OUTPUT DRIVERS section of amanda(8) for more information on the Amanda
output drivers.
OPTIONS -d Turn on debugging output.
-llength
Set the output length. If the output driver limits the output size, this controls when end of tape will be simulated.
Length may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
if=input
Input to dd. Default is stdin.
of=output
Where to send the output of dd. Default is stdout.
bs=blocksize
Size of each record. Input records smaller than this will not be padded. Output records will be the same size as the corresponding
input record. Default is 512 bytes.
Blocksize may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
count=count
Number of records to copy. Default is all records until end of file.
skip=count
Number of records to skip before copying input to output. Default is zero.
AUTHOR
Marc Mengel <mengel@fnal.gov>
John R. Jackson <jrj@purdue.edu>
SEE ALSO amanda(8)AMDD(8)