[20160910]12c sqlldr express.txt
[20160910]12c sqlldr express.txt
--Oracle 12c introduces Sql*Loader Express features, which allow users to run sqlldr with minimum configuration.
--透過例子來說明:
SCOTT@test01p> @ ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.1.0.1.0 Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
D:\tmp>cat emp1.dat
cat emp1.dat
7369,SMITH,CLERK,7902,1980/12/17,800,,20
7499,ALLEN,SALESMAN,7698,1981/2/20,1600,300,30
7521,WARD,SALESMAN,7698,1981/2/22,1250,500,30
7566,JONES,MANAGER,7839,1981/4/2,2975,,20
7654,MARTIN,SALESMAN,7698,1981/9/28,1250,1400,30
7698,BLAKE,MANAGER,7839,1981/5/1,2850,,30
7782,CLARK,MANAGER,7839,1981/6/9,2450,,10
7788,SCOTT,ANALYST,7566,1987/4/19,3000,,20
7839,KING,PRESIDENT,,1981/11/17,5000,,10
7844,TURNER,SALESMAN,7698,1981/9/8,1500,0,30
7876,ADAMS,CLERK,7788,1987/5/23,1100,,20
7900,JAMES,CLERK,7698,1981/12/3,950,,30
7902,FORD,ANALYST,7566,1981/12/3,3000,,20
7934,MILLER,CLERK,7782,1982/1/23,1300,,10
SCOTT@test01p> create table emp1 as select * from emp where 1=0;
Table created.
D:\tmp>sqlldr scott/btbtms@test01p table=emp1
sqlldr scott/btbtms@test01p table=emp1
SQL*Loader: Release 12.1.0.1.0 - Production on Fri Sep 9 21:28:44 2016
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
Express Mode Load, Table: EMP1
Path used: External Table, DEGREE_OF_PARALLELISM=AUTO
Table EMP1:
14 Rows successfully loaded.
Check the log files:
emp1.log
emp1_%p.log_xt
for more information about the load.
--只要檔案命名為表名.dat,格式使用逗號分割,也就是csv模式.就ok了.
SCOTT@test01p> select * from emp1 where rownum<=2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20
7499 ALLEN SALESMAN 7698 1981-02-20 00:00:00 1600 300 30
--Oracle 12c introduces Sql*Loader Express features, which allow users to run sqlldr with minimum configuration.
--透過例子來說明:
SCOTT@test01p> @ ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.1.0.1.0 Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
D:\tmp>cat emp1.dat
cat emp1.dat
7369,SMITH,CLERK,7902,1980/12/17,800,,20
7499,ALLEN,SALESMAN,7698,1981/2/20,1600,300,30
7521,WARD,SALESMAN,7698,1981/2/22,1250,500,30
7566,JONES,MANAGER,7839,1981/4/2,2975,,20
7654,MARTIN,SALESMAN,7698,1981/9/28,1250,1400,30
7698,BLAKE,MANAGER,7839,1981/5/1,2850,,30
7782,CLARK,MANAGER,7839,1981/6/9,2450,,10
7788,SCOTT,ANALYST,7566,1987/4/19,3000,,20
7839,KING,PRESIDENT,,1981/11/17,5000,,10
7844,TURNER,SALESMAN,7698,1981/9/8,1500,0,30
7876,ADAMS,CLERK,7788,1987/5/23,1100,,20
7900,JAMES,CLERK,7698,1981/12/3,950,,30
7902,FORD,ANALYST,7566,1981/12/3,3000,,20
7934,MILLER,CLERK,7782,1982/1/23,1300,,10
SCOTT@test01p> create table emp1 as select * from emp where 1=0;
Table created.
D:\tmp>sqlldr scott/btbtms@test01p table=emp1
sqlldr scott/btbtms@test01p table=emp1
SQL*Loader: Release 12.1.0.1.0 - Production on Fri Sep 9 21:28:44 2016
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
Express Mode Load, Table: EMP1
Path used: External Table, DEGREE_OF_PARALLELISM=AUTO
Table EMP1:
14 Rows successfully loaded.
Check the log files:
emp1.log
emp1_%p.log_xt
for more information about the load.
--只要檔案命名為表名.dat,格式使用逗號分割,也就是csv模式.就ok了.
SCOTT@test01p> select * from emp1 where rownum<=2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20
7499 ALLEN SALESMAN 7698 1981-02-20 00:00:00 1600 300 30
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2124769/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sqlplus和sqlldr工具安裝SQL
- Oracle sqlldr工具功能測試OracleSQL
- Oracle OCP(55):SQLLDR—CTL檔案OracleSQL
- Oracle OCP(56):SQLLDR-樣例OracleSQL
- 一次sqlldr匯入慢的解決過程SQL
- 12C打psu
- Oracle 12c系列(十) | 12c中的Recovering Tables and Table PartitionsOracle
- sqlldr標準輸出未處理導致批處理掛起問題SQL
- 【OCM】Oracle 12C OCMU 12c OCM升級考試大綱Oracle
- Oracle 12c Automatic ReoptimizationOracle
- Oracle 12C安裝Oracle
- 12C 線上MOVE
- 12c pdb基本操作
- 【12c】12c RMAN新特性之recover table(表級別恢復)
- Oracle 12c升級指南Oracle
- Spring Boot和WebLogic 12cSpring BootWeb
- 12C Oracle ASM Filter DriverOracleASMFilter
- Oracle 12C Statistics on Column GroupsOracle
- 安裝Cloud Control 12cCloud
- 【12c cdb pdb】實驗
- sysbench壓測Oracle 12COracle
- benchmark 壓測Oracle 12cOracle
- Manage SQL Plan Baselines in Oracle 12cSQLOracle
- [20181026]12c Attribute Clustering特性.txt
- Oracle 12c CDB&PDBs管理Oracle
- 12C SQL Translation Framework.txtSQLFramework
- [20181010]12c clone pdb.txt
- oracle 12c rman備份pdbOracle
- Oracle 12c系列(五)|PDB RefreshOracle
- Oracle 12c系列(六)|Relocate a PDBOracle
- oracle 12c release 2 安裝Oracle
- Oracle 12C 官方文件地圖Oracle地圖
- Oracle 12C新特性-History命令Oracle
- Oracle 12C新特性In-MemoryOracle
- 12C RAC 修改監聽埠
- Oracle 12c 兩個新特性Oracle
- [20190524]DISABLE TABLE LOCK(12c).txt
- [20190703]12c Hybrid histogram.txtHistogram
- [20190624]12c group by優化 .txt優化