整理电脑时候看到了下面的这个,怕以后忘了,记录下来。主要是DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT这个过程。
begin
begin
DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT('RBS_TRANS_03');
exception
when others then
dbms_output.put_line('default rbs used for session.');
end;
dbms_output.put_line('start time: ' || to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'));
insert /*+ append */into zdsjk.yhwjfzdb_old y
select /*+ use_hash(b) */a.fzhbs, a.yhbs, a.zylx, a.fwhm, '200504', a.fydm, a.yhqfy, a.fy, sysdate, '0'
from zdsjk.yhsyzdb a, zdsjk.yhsywjfxxb b
where a.fzhbs = b.fzhbs;
dbms_output.put_line('end time: ' || to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'));
end;
/
阅读(1007) | 评论(0) | 转发(0) |