Hi all,
In my concern they gave a task to me do cran job like
To write a shell script for
To connect a database
it should execute a query
it should save the output of the query
after getting the output it should send a mail to you inbox for every one hour
I can able to connect to database by wiriting the query plz help me in rest of the activity
!/usr/bin/ksh
sqlplus insivs/Siva#shan11@fincncor << EndofFile
#sqlplus custom/custom123@fincncor << EndOfFile
spool count.txt
select count(*) GUP from gup
/
select count(*) SOD from sod
/
select count(*) GUPSIS from gupsis@csis
/
select count(*) SODSIS from sodsis@csis
/
spool off
quit
#mailx -s "file" thelak.kumar@###.com < count.txt
Every thing is working fine but am not receiving the mail,i tried in so many ways,any help
be appericiated
Its possible to to send mail with attachment?
I have to add this check in CRON JOB too please help
Thanks