标签:ext cte parameter tin limited size count ini parallel
-------------demo.ctl LOAD DATA INFILE * INTO TABLE DEPT APPEND FIELDS TERMINATED BY ‘,‘ ( DEPTNO, DNAME, LOC, LAST_UPDATA ) BEGINDATA 10,Sales,Virginia,2015-01-01 20,Accounting,Virginia,2016-01-01
使用external_table=generate_only会在日志文件中生成对应的脚本 sqlldr userid=scott/dcjet control=d:\tmp\demo.ctl log=d:\tmp\demo.log parallel=y external_table=generate_only
启用并行 DML: ALTER SESSION ENABLE PARALLEL DML 用于外部表的 CREATE TABLE 语句: ------------------------------------------------------------------------ CREATE TABLE "SYS_SQLLDR_X_EXT_DEPT2" ( "DEPTNO" NUMBER(38), "DNAME" VARCHAR2(100), "LOC" VARCHAR2(100), "LAST_UPDATA" DATE ) ORGANIZATION external ( TYPE oracle_loader DEFAULT DIRECTORY SYS_SQLLDR_XT_TMPDIR_00000 ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE CHARACTERSET ZHS16GBK BADFILE ‘SYS_SQLLDR_XT_TMPDIR_00000‘:‘demo.bad‘ LOGFILE ‘SYS_SQLLDR_XT_TMPDIR_00000‘:‘demo.log_xt‘ READSIZE 1048576 SKIP 12 FIELDS TERMINATED BY "," LDRTRIM REJECT ROWS WITH ALL NULL FIELDS ( "DEPTNO" CHAR(255) TERMINATED BY ",", "DNAME" CHAR(255) TERMINATED BY ",", "LOC" CHAR(255) TERMINATED BY ",", "LAST_UPDATA" CHAR(255) TERMINATED BY "," DATE_FORMAT DATE MASK ‘yyyy-mm-dd‘ ) ) location ( ‘demo.ctl‘ ) )REJECT LIMIT UNLIMITED 用于加载内部表的 INSERT 语句: ------------------------------------------------------------------------ INSERT /*+ append */ INTO DEPT2 ( DEPTNO, DNAME, LOC, LAST_UPDATA ) SELECT "DEPTNO", "DNAME", "LOC", "LAST_UPDATA" FROM "SYS_SQLLDR_X_EXT_DEPT2" 用于清除由以前的语句创建的对象的语句: ------------------------------------------------------------------------ DROP TABLE "SYS_SQLLDR_X_EXT_DEPT2"
标签:ext cte parameter tin limited size count ini parallel
原文地址:http://www.cnblogs.com/xuzhong86/p/7687841.html