. Source your environment file here##########################
sqlplus -s 'apps/*********'<<EOF >> /prdapp01/oracle/Monitoring_logs/log_weblogicbkg_deffer.log
spool /usr/tmp/weblogicbkg_deffer.log
select to_char(sysdate, 'DD-MON-YY HH:MI:SS AM')"Date" from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED'and trunc(begin_date)=trunc(SYSDATE) group by item_type;
/**select 'Complete Deferred List' from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED' group by item_type;**/
spool off
quit;
EOF
sqlplus -s 'apps/*********'<<EOF >> /prdapp01/oracle/Monitoring_logs/log_weblogicbkg_deffer.log
spool /usr/tmp/weblogicbkg_deffer.log
select to_char(sysdate, 'DD-MON-YY HH:MI:SS AM')"Date" from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED'and trunc(begin_date)=trunc(SYSDATE) group by item_type;
/**select 'Complete Deferred List' from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED' group by item_type;**/
spool off
quit;
EOF