博客
关于我
Oracle DBA课程系列笔记(20)
阅读量:793 次
发布时间:2023-02-24

本文共 1611 字,大约阅读时间需要 5 分钟。

Oracle SQL Loader ????????????????????? Oracle ???????????? SQL Loader ??????????????????????

1. SQL Loader ?????

???? SQL Loader???????????????

sqlldr [username]/[password] control=control_file.log

?? control_file ?????????????????????

2. ??????

????? SQL Loader ??????????? .ctl ????????????????????

load datainfile '/path/to/datafile.dat'appendinto table empfields terminated by ,(  empno,  ename,  job,  mgr,  hiredate,  comm,  sal,  deptno)begindata7369,SMITH,CLERK,7902,17-DEC-80,8000,,207499,ALLEN,SALESMAN,7698,20-FEB-81,1600,300,307521,WARD,SALESMAN,7698,22-FEB-81,1250,500,30...
  • load data??? SQL Loader ???????
  • infile??????????????
  • append????????????????
  • into table emp???????????
  • fields terminated by ,??????????
  • begindata??????????

3. ?? SQL Loader

??????????????????????

sqlldr scott/tiger control=emp.ctl log=emp.log
  • scott/tiger?Oracle ???????
  • control=emp.ctl????????
  • log=emp.log????????

4. ??????

???????????? emp.log ??????????

Commit point reached - logical record count 14

??????????????????????????

5. ?????

?? SQL ???????????

analyze table emp compute statistics;select table_name, num_rows, blocks, empty_blocks from user_tables where table_name = 'EMP';
  • analyze table emp compute statistics;?????????????
  • select table_name, num_rows, blocks, empty_blocks from user_tables where table_name = 'EMP';??????????

6. ??????

????????????????

sqlldr scott/tiger control=emp.ctl log=emp.log direct=y
  • direct=y??? SQL Loader ???????????

7. ??????

??????????? emp.bad ?????????????????

sqlldr scott/tiger control=emp.ctl log=emp.log direct=y

??????????????? Oracle SQL Loader ?????????????????????????

转载地址:http://xppfk.baihongyu.com/

你可能感兴趣的文章