`
edwards0307
  • 浏览: 27386 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

oracle loading and unloading

阅读更多

1.method of loading

 

     Conventional path: employ SQL inserts on our behalf to load data.

  

     Direct path: does not use SQL in this mode; it formats database blocks directly.

 

     The direct path load allows you to read data from a flat file and write it directly to format-
ted database blocks, bypassing the entire SQL engine, undo generation and, optionally, redo
generation at the same time.

 

      conventional:insert into dept values();

      direct: insert /*+ append */ into dept values();

 

2.tools:SQL*LOADER/exp-imp

 

   SQL*LOADER:

   sqlldr userid=hr/hr control=demo.ctl

   demo.ctl

   load data

   infile *

   into table dept

   FIELDS TERMINATED BY ','

   (deptno,dname,loc)

   begindata

   10,Sales,Virginia
   20,Accounting,Virginia

 

   1)Load Delimited Data

      一.FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'

      二.FIELDS TERMINATED BY WHITESPACE

      三.FIELDS TERMINATED BY x'09'
         (DEPTNO, dummy1 filler, DNAME, dummy2 filler, LOC)

      10,Sales,"Virginia,USA"
      20,Accounting,"Va, ""USA"""

      10      Sales       Virginia

   2)Load Fixed Format Data

      一.( DEPTNO      position(1:2),
            DNAME       position(3:16),
            LOC         position(17:29),
            ENTIRE_LINE position(1:29)
           )

      二.( DEPTNO      position(1:2),
          DNAME       position(*:16),
          LOC         position(*:29),
          ENTIRE_LINE position(1:29)
          )

      三.( DEPTNO      position(1) char(2),
            DNAME       position(*) char(14),
            LOC         position(*) char(13),
            ENTIRE_LINE position(1) char(29)
          )

         10Accounting    Virginia,USA

   3)Load Dates

          LAST_UPDATED date 'dd/mm/yyyy'

         10,Sales,Virginia,1/5/2000

   4)Load Data Using Functions

          TRAILING NULLCOLS

          DNAME        "upper(:dname)"

          ENTIRE_LINE  ":deptno||:dname||:loc||:last_updated"

   5)Load Data with Embedded Newlines

        一.COMMENTS     "replace(:comments,'\\n',chr(10))"

        二.INFILE demo.dat "fix 80"

        10,Sales,Virginia,This is the Sales\nOffice in Virginia
        20,Accounting,Virginia,This is the Accounting\nOffice in Virginia

        三.INFILE demo.dat "var 3"  

        05510,Sales,Virginia,This is the Sales
        Office in Virginia
        06520,Accounting,Virginia,This is the Accounting
        Office in Virginia

        四.select utl_raw.cast_to_raw('|'||chr(10)) from dual;

        UTL_RAW.CAST_TO_RAW('|'||CHR(10))
         --------------------------------------------------------------------------------
          7C0A

       INFILE demo.dat "str X'7C0A'"

       10,Sales,Virginia,This is the Sales
       Office in Virginia|
       20,Accounting,Virginia,This is the Accounting
       Office in Virginia|

分享到:
评论

相关推荐

    【船级社】 RINA Rules for loading and unloading arrangements and for

    【船级社】 RINA Rules for loading and unloading arrangements and for other lifting appliances on board ships.pdf

    Oracle Solaris 9 man pages section 9: DDI and DKI Kernel Functio

    7. **Module Loading and Unloading**:描述了如何使用KMOD(Kernel Module)机制动态加载和卸载驱动程序。 8. **Device Registration**:解释了如何注册设备节点,使其在/dev目录下可见,以便用户空间程序可以访问...

    Catenary-line-Optimization-of-wheel-loading-and-un_系统设计方案_PDF_

    悬链线上车轮装卸机器人的优化设计Catenary line Optimization of wheel loading and unloading robot

    物流实务英语英汉双语PPT课件.pptx

    Proper packaging can reduce damage, ensure product integrity, and facilitate efficient loading and unloading. 3. **仓储 (Warehousing)** - Warehousing is the temporary storage of goods before they ...

    助理物流师(三级)-物流英语(精选试题).doc

    loading and unloading)的效率,同时也优化了存储(C. storing)和运输(D. transport)流程。集装箱化使得不同运输方式之间的转换更为便捷,降低了物流成本,提升了整体供应链的效率。 2. Freight forwarder...

    oracle truncate恢复

    Unloading table: DB_JJ_INFO_TEMP,object ID: 33547 ``` 9. **在线表空间**: 将表空间重新上线。 ```sql SQL> alter tablespace test online; 表空间已更改。 ``` 10. **导入数据**: 使用 `sqlldr` ...

    railmops:模型运算处理系统

    and request empty cars/wagons to be supplied, or full cars/wagons to be sentMOPS replicates loading and unloading times, and ensures that a commodity can only be loaded/unloaded into appropriate cars...

    class-un-loading.tar.gz

    在IT行业中,类卸载(Class Unloading)是Java虚拟机(JVM)内存管理的一个重要概念,尤其是在探讨垃圾收集(Garbage Collection)和应用程序性能优化时。标题" class-un-loading.tar.gz "暗示了这个压缩包可能包含...

    食品的装卸与搬运培训教材.pptx

    装卸搬运的概念分为三个层次:装载(loading and unloading)是指将物品放入运输设备或从设备中卸下,搬运(handling / carrying)是在同一场所内进行的水平移动,而装卸搬运则是指这两者结合的活动,包括堆码、取出...

    经典小巧的表格组件 EhLib4.14

     editing, sorting, filtrations and unloading changed given on  the server back. Components do not include drivers to access to server.  To ensure functionality of components it is sufficiently to ...

    EhLib-delphi

     editing, sorting, filtrations and unloading changed given on  the server back. Components do not include drivers to access to server.  To ensure functionality of components it is sufficiently to ...

    热压成型机液压系统设计-液压与机械设计制造及自动化专业-本科毕业论文.doc

    Furthermore, the use of advanced technology, such as microelectronics and computer integration, allows for better monitoring, control, and automation of the process, reducing human error and ...

    物流英语常用50句(DOC 4).doc

    7. **物流的具体构成**:“Logistics consists of warehousing, transportation, loading and unloading, handling, carrying, packaging, processing, distribution and logistics information.” 物流是由多个具体...

    深入java虚拟机(inside the java virtual machine)

    Unloading and Finalization of Classes On the CD-ROM The Resources Page 8 The Linking Model Dynamic Linking and Resolution Resolution and Dynamic Extension Constant Pool Resolution Resolution of ...

    Solaris 10 System Administration Essentials

    7.6.1 Loading and Unloading Modules 189 7.6.2 fmd Statistics 191 7.6.3 Con?guration Files 192 7.7 Fault Management Directories 193 7.8 Solaris Fault Management Downloadable Resources 193 7.8.1 Solaris...

    二级减速器课程设计说明书reducer design specification.doc

    It can put the material on a certain conveying line and form a conveying process of material from the initial feeding point to the final unloading point. It can not only carry out the transport of ...

    物流学概论考试复习(必考).pdf

    “loading and unloading”指的是装卸货物的活动,而“handling/carrying”可能指搬运,这两项活动是物流过程中对货物理清、装卸和搬运的总称。它们都对成本、效率和安全性有重要影响。 “storing::Inventory”表明...

    Mask 98 for PRwin98

    Loading ... Definition of Shareware Why Register Mask? How to Register Mask ... Distribution Quick Start ----------- In Program Manager, choose 'Run' from the File menu and enter 'x:\path\...

Global site tag (gtag.js) - Google Analytics