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 DEBIAN
net::dns::sec::tools::dnssectools
dnssectools(3pm) User Contributed Perl Documentation dnssectools(3pm)NAME
Net::DNS::SEC::Tools::dnssectools - General routines for the DNSSEC-Tools package.
SYNOPSIS
use Net::DNS::SEC::Tools::dnssectools;
dt_adminmail($subject,$msgbody,$recipient);
$zspath = dt_cmdpath('zonesigner');
$ftype = dt_findtype($path);
DESCRIPTION
The dnssectools module provides a general set of methods for use with DNSSEC-Tools utilities.
INTERFACES
The interfaces to the dnssectools module are given below.
dt_adminmail(subject,msgbody,recipient)
This routine emails a message to the administrative user listed in the DNSSEC-Tools configuration file.
dt_adminmail() requires two parameters, both scalars. The subject parameter is the subject for the mail message. The msgbody
parameter is the body of the mail message.
A third parameter, recipient, may be given to specify the message's recipient. If this is not given, then the recipient will be taken
from the admin-email record of the DNSSEC-Tools configuration file. If recipient is "nomail", then no message will be sent and success
will be returned.
Return values:
1 - the message was created and sent.
0 - an invalid recipient was specified.
It relies on the the following dnssec-tools.conf configuration parameters:
admin-email
The email address that the mail should come from.
mailer-type
Should be one of: sendmail, smtp, qmail. This option is not required and will default to trying sendmail and qmail to deliever the
mail. If mailer-server is set to a defined value but mailer-type is not, then mailer-type will default to
mailer-server
The server, if admin-mail is set to smtp, that the mail should be delivered to.
dt_cmdpath(command)
This routine returns the path to a specified DNSSEC-Tools command. command should be the name only, without any leading directories.
The command name is checked to ensure that it is a valid DNSEC-Tools command,
Return values:
The absolute path to the command is returned if the command
is valid.
Null is returned if the command is not valid.
dt_filetype(path)
This routine returns the type of the file named in path. The rollrec and keyrec records contained therein are counted and a type
determination is made.
Return values:
"keyrec" - At least one keyrec record was found and no
rollrec records were found.
"rollrec" - At least one rollrec record was found and
no keyrec records were found.
"mixed" - At least one rollrec record and at least one
keyrec record were found.
This is most likely an erroneous file.
"unknown" - No rollrec records nor keyrec records
were found.
"nofile" - The specified file does not exist.
COPYRIGHT
Copyright 2006-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
AUTHOR
Wayne Morrison, tewok@tislabs.com
SEE ALSO Mail::Send.pm(3), Net::DNS::SEC::Tools::conf.pm(3)POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 309:
=back without =over
perl v5.14.2 2012-06-28 dnssectools(3pm)