oracle 定时truncate表
[oracle@test ~]$ cat /home/oracle/shell/truncate_t_test_lo_log.sh
#!/bin/bash
source /home/oracle/.bash_profile
sqlplus -s test/test >> /home/oracle/shell/truncate_t_test_lo_log.log <<EOF
set feedback off heading off term off
set pages 1000 trim on trims on lines 32767 long 999999
set echo off
@/home/oracle/shell/truncate_t_test_lo_log.sql
[oracle@test ~]$ cat /home/oracle/shell/truncate_t_test_lo_log.sql
truncate table test.t_test_lo_log;
--定时任务
10 02 * * * /bin/sh /home/oracle/shell/truncate_t_test_lo_log.sh &> /dev/null
日积月累