blat body.txt -to address@domain.com -cc address1@domain.com -cc address@domain.com -subject "check log %DATE%" -f address@domain.com -server mail_server_ip -charset gb2312 -debug
set heading on;
set verify off;
set wrap on;
set trimspool on;
set serveroutput on;
set escape on;
spool body.txt
COLUMN tdate NEW_VALUE _date NOPRINT
SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY') tdate FROM dual;
COLUMN date_time NEW_VALUE _date_time NOPRINT
SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS') date_time FROM dual;
prompt check time:&_date_time
prompt ;
prompt check server_212 job: select job,failures from user_jobs where job in (43,61,63,141,201,261,262)
select job,failures from user_jobs where job in (43,61,63,141,201,261,262);
prompt ;
prompt ;
prompt check server_123 job: select job,failures from user_jobs@tsps where job in (4,5,61,101)
select job,failures from user_jobs@tsps where job in (4,5,61,101);
prompt ;
prompt ;
prompt check sql1 :select count(1) from tb_tsps_mailplane_receipt t where t.d_date= trunc(sysdate-1);
select count(1) from tb_tsps_mailplane_receipt t where t.d_date= trunc(sysdate-1);
prompt ;
prompt ;
prompt check sql2 :select count(1) from tb_tsps_mailplane_receipt t where t.n_status<>1;
select count(1) from tb_tsps_mailplane_receipt t where t.n_status<>1;
prompt ;
prompt ;
prompt check sql3 :select count(1) from tb_sec_mail_summary xt where xt.d_plane_date= trunc(sysdate-1);
select count(1) from tb_sec_mail_summary xt where xt.d_plane_date= trunc(sysdate-1);
spool off
quit