Sponsored Content
Full Discussion: SQL commands in Scripting
Top Forums Shell Programming and Scripting SQL commands in Scripting Post 302380007 by chandancsc on Monday 14th of December 2009 01:31:41 AM
Old 12-14-2009
SQL commands in Scripting

Hi ,

Daily I sneding report to client about the status of State 2 jobs in Control M .

I would like to schedule it via cron . I am using teh following command :

sudo su - <control M server Name>
then reach to the control M server

then run

#isql
<It ask for the password >

Password :

When I give the password I execute the following command

1> select JOBNAME from CMR_AJF where STATE='2'
2> go

It gives the following out put

JOBNAME
----------------------------------------------------------------
AI_BRS_BNP_CompanyOption_PDF
AI_BRS_BNP_DiscountSecurityBlock_PDF
AI_BRS_BNP_EquityListedBlock_PDF
AI_BRS_BNP_FixedInterest_PDF
AI_UNITPRICE_Transfer
(5 rows affected)


Inormally paste this in my mail box and send an email to the client.

How I will write a script by which I can send the the output in one file and then outomatcially send mail via mailx.

Thanks in Advance
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sql with shell scripting

Hi, I want to extract data from database table to a flat file using shell scripting. For loading data from file to a table, I had used SQL Loader. How can I do the vice versa using shell scripting. Thanks in advance (3 Replies)
Discussion started by: sendhil
3 Replies

2. Shell Programming and Scripting

Shell scripting and SQL

Hi, I have a file that has contents like this: SQL> select * from details; NAME REG -------------------- ---------- Mani 1 Santosh 2 Manju 3 Mukesh 4 SQL> spool off; ... (5 Replies)
Discussion started by: sendhilmani123
5 Replies

3. Shell Programming and Scripting

SQL Commands in Unix

Hi gurus, Being a newbie not sure whether iam asking the right question? can we use oracle commands in unix for ex: to read a count on a table. if so, what needs to be configured and etc.. any kind of help is appreciated. Thanks sish (6 Replies)
Discussion started by: sish78
6 Replies

4. Shell Programming and Scripting

how to sql commands in shell script

hi, plz let me know one example in using sql command in shell script thanks inadvance -bali. (1 Reply)
Discussion started by: balireddy_77
1 Replies

5. Shell Programming and Scripting

sql scripting help

I would like to run the following as bash script sql -U history update feed_domain_configuration set enabled=1 where domain='lon' and vendor_name='<lond' -sam (3 Replies)
Discussion started by: sam786
3 Replies

6. AIX

how can i install sqlplus and execute some sql commands

hi everybody, i am Talip, a begginner at unix based systems and i have a problem (actually, we may think myself as the problem, in this situation). i am not sure if this is the correct platform for my questions. if it is not please forgive me about this inappropriate mail. what i have: *... (2 Replies)
Discussion started by: talipk
2 Replies

7. Shell Programming and Scripting

SQL commands in a shell scripting

Hi, I need to write a shell script file that does 1)Connects to DB using SQL plus 2)Do some SQL query like select * from.... 3)Based on the output that I got from the sql query I will have to write a if else loop. Plz let me know how to write the shell scripting for this. Thanks for... (1 Reply)
Discussion started by: villain41
1 Replies

8. UNIX Desktop Questions & Answers

Multiple SQL Commands

Hello Experts !!! Im new to this so, please bear with me ! I have the following 2 sql statements create table CMD_NEW_USER as Select FD.EMPLOYEE, FD.PASTUSER, ..... FROM REPORTS FS, TASKLIST FD WHERE FS.EMPLOYEEID = FD.EMPLOYEEID ; create table CMD_OLD_USER as Select FD.EMPLOYEE,... (4 Replies)
Discussion started by: OMLEELA
4 Replies
EZ-IPUPDATE(8)							Dynamic DNS client						    EZ-IPUPDATE(8)

NAME
ez-ipupdate - dynamic DNS client SYNOPSIS
ez-ipupdate [options] DESCRIPTION
This manual page documents briefly the ez-ipupdate dynamic DNS client. OPTIONS
ez-ipupdate follows the usual GNU command line syntax, with long options starting with two dashes (`-'). -a, --address <ip address> string to send as your ip address -b, --cache-file <file> file to use for caching the ipaddress -c, --config-file <file> configuration file, almost all arguments can be given with: <name>[=<value>] to see a list of possible config commands try "echo help | ez-ipupdate -c -" -d, --daemon run as a daemon periodicly updating if necessary -e, --execute <command> shell command to execute after a successful update -f, --foreground when running as a daemon run in the foreground -F, --pidfile <file> use <file> as a pid file -g, --request-uri <uri> URI to send updates to -h, --host <host> string to send as host parameter -i, --interface <iface> which interface to use -L, --cloak_title <host> some stupid thing for DHS only -m, --mx <mail exchange> string to send as your mail exchange -M, --max-interval <# of sec> max time in between updates -N, --notify-email <email> address to send mail to if bad things happen -o, --offline set to off line mode -p, --resolv-period <sec> period to check IP if it can't be resolved -P, --period <# of sec> period to check IP in daemon mode (default: 1800 seconds) -q, --quiet be quiet -r, --retrys <num> number of trys (default: 1) -R, --run-as-user <user> change to <user> for running, be ware that this can cause problems with handeling SIGHUP properly if that user can't read the config file. also it can't write it's pid file to a root directory -Q, --run-as-euser <user> change to effective <user> for running, this is NOT secure but it does solve the problems with run-as-user and config files and pid files. -s, --server <server[:port]> the server to connect to -S, --service-type <server> the type of service that you are using try one of: null ezip pgpow dhs dyndns dyndns-static dyndns-custom ods tzo easydns easydns- partner gnudip justlinux dyns hn zoneedit heipv6tb -t, --timeout <sec.millisec> the amount of time to wait on I/O -T, --connection-type <num> number sent to TZO as your connection type (default: 1) -U, --url <url> string to send as the url parameter -u, --user <user[:passwd]> user ID and password, if either is left blank they will be prompted for -w, --wildcard set your domain to have a wildcard alias -z, --partner <partner> specify easyDNS partner (for easydns-partner services) --help display this help and exit --version output version information and exit --credits print the credits and exit --signalhelp print help about signals AUTHOR
This manual page was written by Sam Hocevar <sam@zoy.org> for the Debian GNU/Linux system (but may be used by others). ez-ipupdate - 3.0.11b7 February 2003 EZ-IPUPDATE(8)
All times are GMT -4. The time now is 07:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy