spool del_usr_tab.log
sqlplus "/ as sysdba" <<EOF
set timing on
set time on
set serverout on
DECLARE
v_counter number:=0;
BEGIN
for v_number in 1..100000 loop
delete from test.users where DATE < '20130301' ;
if ( MOD(v_number ,10 ) = 0 ) then
commit;
DBMS_OUTPUT.PUT_LINE( sysdate);
end if;
end loop;
END;
/
commit;
EOF
沒有留言:
張貼留言