Oracle DBA课程系列笔记(20)
发布日期:2025-04-29 10:55:16 浏览次数:20 分类:精选文章

本文共 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 ?????????????????????????

上一篇:oracle dblink 创建使用 垮库转移数据
下一篇:uniapp超全user-agent判断 包括微信开发工具 hbuilder mac windows 安卓ios端及本地识别

发表评论

最新留言

做的很好,不错不错
[***.243.131.199]2026年05月31日 11时12分01秒