前幾天有個朋友在MSN上問
這讓我想起DCBA的一個工具ociuldr
通過ociuldr轉儲的數據
我簡單測試了一下
D:\OraDoc\OracleTools\ociuldr>ociuldr user=scott/tiger@eyglequery= select * from emp field=# record= x a file=emp txt
rows exported at : : rows exported at : :
output file emptxt closed at rows
創建好測試表
D:\OraDoc\OracleTools\ociuldr>sqlplus scott/tiger@eygleSQL*Plus: Release
Production on 星期二 月 : : Copyright (c)
Oracle All rights reserved 連接到:
Oraclei Enterprise Edition Release Production
With the Partitioning option
JServer ReleaseProduction SQL> create table empt as select * from emp where
= ; 表已創建
編寫簡單的控制文件
D:\OraDoc\OracleTools\ociuldr>cat actl
LOAD DATA
INFILEemp txt
INTO TABLE empt
APPEND
FIELDS TERMINATED BY# TRAILING NULLCOLS
(
EMPNO
ENAME CHAR
JOB CHAR
MGR
HIREDATE DATE
SAL
COMM
DEPTNO
)D:\OraDoc\OracleTools\ociuldr>sqlldr scott/tiger@eygle
control=a ctl SQL*Loader: Release
Production on 星期二 月 : : Copyright (c)
Oracle All rights reserved 達到提交點
邏輯記錄計數 D:\OraDoc\OracleTools\ociuldr>sqlplus scott/tiger@eygle
SQL*Plus: Release
Production on 星期二 月 : : Copyright (c)
Oracle All rights reserved 連接到:
Oraclei Enterprise Edition Release Production
With the Partitioning option
JServer ReleaseProduction SQL> set linesize
SQL> select * from empt;EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
SMITH CLERK 月 ALLEN SALESMAN 月 WARD SALESMAN 月 JONES MANAGER 月 MARTIN SALESMAN 月 BLAKE MANAGER 月 CLARK MANAGER 月 SCOTT ANALYST 月 KING PRESIDENT 月 TURNER SALESMAN 月 ADAMS CLERK 月 JAMES CLERK 月 FORD ANALYST 月 MILLER CLERK 月 已選擇
行 SQL>
dcba說將在下一版增加自動控制文件生成的功能
From:http://tw.wingwit.com/Article/program/Oracle/201311/18783.html