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;
posted @ 2023-05-17 17:58  diablo-427  阅读(5)  评论(0编辑  收藏  举报