oracle 问题
set serveroutput on
set linesize 1000
set pages 0
declare
total_line_number number;
dop number;
skip number;
load number;
tail_of_mod number;
command varchar2(4000);
directory varchar2(4000);
begin
total_line_number := 348104868;
directory := '/home/oracle/adam';
dop := 20;
skip := 0;
load := 0;
tail_of_mod := mod(total_line_number,dop);
load := trunc(total_line_number/dop);
for i in 1..dop loop
if i = dop then
load := load + tail_of_mod;
end if;
command := 'nohup sqlldr tester/tester control='||directory||'/load.ctl log='||directory||'/test'||i||'.log READSIZE=20000000 BINDSIZE=20000000 direct=true parallel=true errors=99999 silent=errors,discards skip='||skip||' load='||load ||' &' ;
dbms_output.put_line(command);
skip := skip+load;
end loop;
end;
本文来自博客园,作者:diablo-427,转载请注明原文链接:https://www.cnblogs.com/diablo-427/p/17409593.html