i am new to shell scripting..
I had a requirement that needs to find whether the database was backed up or not in last 24 hrs .i am tring to query it in my catalog database if i query
select owner from from dba_objects where object_name='rc_database';
it will give me all the databases that are reciding on thar catalog database
and i need to query
select BACKUP_TYPE,START_TIME,COMPLETION_TIME from metat.rc_backup_piece where start_time > (sysdate -1);
gives the back ups started since last day out put is like this for this query (metat is the one of the database name)
in this way the loop need to run for all the database names that we get from the rc_database view ,
the o/p for this statement looks like
B START_TIM COMPLETIO
- --------- ---------
L 16-AUG-10 16-AUG-10
D 16-AUG-10 16-AUG-10
L 16-AUG-10 16-AUG-10
D 16-AUG-10 16-AUG-10
so if no lines are selected for this start_time then need to get a mail for the group.
THANKS ALL PLEASE HELP ME OUT