#!/bin/bash
source /etc/profile
source ~/.bash_profile
#################################
#00 01 * * * /bin/bash /utxt/soft/tools/rm_oracle.sh >>/utxt/soft/tools/rm_oracle.log 2>&1
#################################
lyd_rm_dt=`date -d "-5 day" +%Y%m%d`
flow_rm_dt=`date -d "-5 day" +%Y%m%d`
echo "start time: `date +"%Y-%m-%d %H:%M:%S"`"
sqlplus rdjk/[email protected] << EOF
alter TABLE t_kpi_lyd DROP PARTITION P$lyd_rm_rq1;
alter TABLE t_kpi_flow_direction DROP PARTITION P$flow_rm_dt;
COMMIT;
quit
EOF
echo "end time: `date +"%Y-%m-%d %H:%M:%S"`"
时间: 2024-10-03 21:14:16