Oracle中的sql loader

字號:


    oracle 的sql loader用來將操作系統(tǒng)上的數(shù)據(jù)文件中的內(nèi)容加載到oracle數(shù)據(jù)庫中.
    要使用sql loader,需要先創(chuàng)建一個控制文件,里面告訴sql loader在啟動了sql loader之后的加載數(shù)據(jù)的策略.
    新建一個studentdataload.ctl文件,寫入
    load data
    infile 'studentdata.txt'
    into table studentinfo
    fields terminated by '|'
    (num,name,classnum,tel,address)
    然后在控制臺啟動sql loader,寫入用戶名密碼(加載數(shù)據(jù)用),以及控制文件名.
    sqlldr control=studentdata.ctl log=load.log
    使用sql loader 方法就簡單多了.