Sponsored Content
Top Forums Shell Programming and Scripting Automation of Email Solicitation Post 302231663 by jakred on Wednesday 3rd of September 2008 01:07:48 AM
Old 09-03-2008
Error Automation of Email Solicitation

INEED TO PERFORM THESE BELLOW POINTS IN UNIX SHELL SCRIPT.
INEED TO CALL THE PROCEDURE dbadmin.truncate_table.
INEED TO CHECK THE COUNT BEFORE AND AFTER THE PROCEDURE EXECUTION(THIS SHOULD BE HANDELED IN UNIX SCRIPT)
1) invoke batch profile to run sqlplus on XXXXX server.
2) execute truncate table xtra.xtra_card_email_request using procedure dbadmin.truncate_table .

the procedure is already done and stored.
We used to run the following steps earlier:
Please see the steps executed on Aug email solicitation.
**********************************************************************
calling the environiment manually which consists of following steps
**********************************************************************
$ . /usr/local/etc/profile.rmbatch.evr
Sourcing profile.rmbatch.evr
Sourcing ~xipcadm/netcomm/etc/xipc.env
XXXXXXX
sid=YYYYY
pwd=/home/offhours/crmdboh
(XXXXXserver) userid> sqlplus USERID/PASSWORD(need to invoke the sqlplus on the unix server)

SQL*Plus: Release 10.1.0.5.0 - Production on Fri Aug 1 05:49:28 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> set timing on
SQL> set serveroutput on
SQL> set time on
***********************************************************
NEED TO CHECK THE COUNT OF RECORDS PRESENT BEFORE PROCEDURE RAN
***********************************************************
05:51:18 SQL> select count(*) from XTRA.XTRA_CARD_EMAIL_REQUEST;
COUNT(*)
----------
1571730
Elapsed: 00:00:03.75
*******************************************************************
SUCESSFULL RUN OF THE PROCEDURE
*******************************************************************
06:00:03 SQL> exec dbadmin.truncate_table('XTRA','XTRA_CARD_EMAIL_REQUEST');
-- TRUNCATING Table
truncate table XTRA.XTRA_CARD_EMAIL_REQUEST;
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.11
***************************************************************
cHECKING THE RECORDS COUNT AFTER RUNNING THE PROCEDURE
****************************************************************
06:00:07 SQL> select count(*) from XTRA.XTRA_CARD_EMAIL_REQUEST;
COUNT(*)
----------
7
Elapsed: 00:00:00.00
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

2. OS X (Apple)

X11 automation?

I'm a newbie on OS X and Mac, I bought my first Mac (a Mini) in october last year, so bare with me. :) I usually run X11 to have aixterm displayed on my Mac, what I would like to do is to set a specific xhost + every time I start X11, for example xhost +10.0.0.2 every time I start X11. Also,... (1 Reply)
Discussion started by: dlundh
1 Replies

3. Shell Programming and Scripting

Help in automation...

Hi All, I need to run the same command on many servers. I am using ssh for the same. Following is the script that I am using to fire the same command on multiple machines. #!/bin/bash # Linux/UNIX box with ssh key based login #SERVERS="iqmevrick,iqmango" # SSH User name USR="root" #... (1 Reply)
Discussion started by: nua7
1 Replies

4. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

5. Shell Programming and Scripting

scp automation

hi there , i want to use the scp to transfer the file from one machine to another machine non-stop. i have put it in a .sh file. but everytime i run it and it prompts me to input password. pc3@pc3-desktop:~/Documents$ ./sample3.sh pc-main@192.168.1.117's password: screenshot.jpg ... (4 Replies)
Discussion started by: Ericyue
4 Replies

6. UNIX for Advanced & Expert Users

Need help in automation

Hi, I wanted to automate the scp command where i do not want to enter the password each time. So thought of using expect command. Script is executing without any issues but files are not copied to remote server. Can any one help me? Below is my shell script.. #!/bin/ksh ... (6 Replies)
Discussion started by: balasubramani04
6 Replies

7. UNIX for Dummies Questions & Answers

CUPs automation

A little background information: We are a company that uses Sharp MFP devices for everyone to print on. We have a lot of MAC BYOD devices. All printing is done through a product called PaperCut which is ran on a Windows 2008 R2 server. Sharp charges our company for each print job done in... (1 Reply)
Discussion started by: jdmorecraft
1 Replies

8. Shell Programming and Scripting

Automation script

Hello All , I came across a tricky solution to devolop . Here is a part of the requirement automation . I have different set of server say : Web ( has 4 servers under it ) , App ( has 4 servers under it ) , DB ( has 2 servers under it ) Above each i have different load balancers , Say : Web... (4 Replies)
Discussion started by: radha254
4 Replies

9. UNIX for Beginners Questions & Answers

Automation script for email alert when a job get complete with status successful.

Guyz, Please let me know about script which is to be sending an automatic email to particular mail id's when a monotoring job get complete with status successful. (1 Reply)
Discussion started by: Rehan Ahmad
1 Replies

10. Post Here to Contact Site Administrators and Moderators

UNIX automation

I am using netteza server and i have a list of table names. I need to fetch all the data from these tables and need to create seperate zip files and store in a folder in the server. How can we automate this process. (1 Reply)
Discussion started by: nikhilthms97
1 Replies
Email::Sender(3pm)					User Contributed Perl Documentation					Email::Sender(3pm)

NAME
Email::Sender - a library for sending email VERSION
version 0.110005 SYNOPSIS
my $message = Email::MIME->create( ... ); # produce an Email::Abstract compatible message object, # e.g. produced by Email::Simple, Email::MIME, Email::Stuff use Email::Sender::Simple qw(sendmail); use Email::Sender::Transport::SMTP qw(); use Try::Tiny; try { sendmail( $message, { from => $SMTP_ENVELOPE_FROM_ADDRESS, transport => Email::Sender::Transport::SMTP->new({ host => $SMTP_HOSTNAME, port => $SMTP_PORT, }) } ); } catch { warn "sending failed: $_"; }; OVERVIEW
Email::Sender replaces the old and sometimes problematic Email::Send library, which did a decent job at handling very simple email sending tasks, but was not suitable for serious use, for a variety of reasons. Most users will be able to use Email::Sender::Simple to send mail. Users with more specific needs should look at the available Email::Sender::Transport classes. Documentation may be found in Email::Sender::Manual, and new users should start with Email::Sender::Manual::QuickStart. IMPLEMENTING
Email::Sender itelf is a Moose role. Any class that implements Email::Sender is required to provide a method called "send". This method should accept any input that can be understood by Email::Abstract, followed by a hashref containing "to" and "from" arguments to be used as the envelope. The method should return an Email::Sender::Success object on success or throw an Email::Sender::Failure on failure. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-06 Email::Sender(3pm)
All times are GMT -4. The time now is 12:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy