create table tim (tn int,itime timestamp); |
declare stime timestamp; dtime timestamp; etime timestamp; begin for i in 1 .. 10 loop stime := systimestamp; insert into tim values (i, systimestamp); etime := systimestamp; select itime into dtime from tim where tn = i; dbms_output.put_line('start time: ' || to_char(stime,'HH24:MI:SS:FF') || ' doing time: ' || to_char(dtime,'HH24:MI:SS:FF') || ' end time:' || to_char(etime,'HH24:MI:SS:FF')); dbms_lock.sleep(2.9); commit; end loop; end; |
start time: 15:10:06:986235000 doing time: 15:10:06:987493000 end time:15:10:06:987962000 start time: 15:10:09:894372000 doing time: 15:10:09:894505000 end time:15:10:09:894738000 start time: 15:10:12:796921000 doing time: 15:10:12:797057000 end time:15:10:12:797293000 start time: 15:10:15:698497000 doing time: 15:10:15:698642000 end time:15:10:15:698856000 start time: 15:10:18:601077000 doing time: 15:10:18:601222000 end time:15:10:18:601451000 start time: 15:10:21:502664000 doing time: 15:10:21:502803000 end time:15:10:21:503044000 start time: 15:10:24:405294000 doing time: 15:10:24:405435000 end time:15:10:24:405673000 start time: 15:10:27:307828000 doing time: 15:10:27:307979000 end time:15:10:27:308193000 start time: 15:10:30:209477000 doing time: 15:10:30:209619000 end time:15:10:30:209865000 start time: 15:10:33:112033000 doing time: 15:10:33:112173000 end time:15:10:33:112397000 |
select tn,to_char(itime,'HH24:MI:SS:FF') ITIME ,dump(itime,16) HEX_ITIME from tim;
|
alter system dump logfile '/u01/oradata/orcl/redo01.log'; |
REDO RECORD - Thread:1 RBA: 0x000026.0000000c.0010 LEN: 0x02a0 VLD: 0x0d SCN: 0x0000.000b727b SUBSCN:
本文转自maclean_007 51CTO博客,原文链接:http://blog.51cto.com/maclean/1276793
|