imp的方式:
成都創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設、高性價比雞東網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式雞東網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設找我們,業(yè)務覆蓋雞東地區(qū)。費用合理售后完善,10余年實體公司更值得信賴。
1. 獲取幫助
imp help=y
2. 導入一個完整數(shù)據(jù)庫
imp system/manager file=bible_db log=dible_db full=y ignore=y
3. 導入一個或一組指定用戶所屬的全部表、索引和其他對象
imp system/manager file=seapark log=seapark fromuser=seapark
imp system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)
4. 將一個用戶所屬的數(shù)據(jù)導入另一個用戶
imp system/manager file=tank log=tank fromuser=seapark touser=seapark_copy
imp system/manager file=tank log=tank fromuser=(seapark,amy)
touser=(seapark1, amy1)
5. 導入一個表
imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)
6. 從多個文件導入
imp system/manager file=(paycheck_1,paycheck_2,paycheck_3,paycheck_4)
log=paycheck, filesize=1G full=y
7. 使用參數(shù)文件
imp system/manager parfile=bible_tables.par
bible_tables.par參數(shù)文件:
#Import the sample tables used for the Oracle8i Database Administrator's
Bible. fromuser=seapark touser=seapark_copy file=seapark log=seapark_import
8. 增量導入
imp system./manager inctype= RECTORE FULL=Y FILE=A
以excel導入為例:
操作步驟如下:
1.準備數(shù)據(jù):在excel中構造出需要的數(shù)據(jù)
2.將excel中的數(shù)據(jù)另存為文本文件(有制表符分隔的)
3.將新保存到文本文件中的數(shù)據(jù)導入到pl*sql中
在pl*sql中選擇tools--text importer,在出現(xiàn)的窗口中選擇"Data from Textfile",然后再選擇"Open data file",
在彈出的文件選擇框中選中保存有數(shù)據(jù)的文本文件,此時將會看到data from textfile中顯示將要導入的數(shù)據(jù)
4.在configuration中進行如下配置
注:如果不將"Name in header"勾選上會導致字段名也當做記錄被導入到數(shù)據(jù)庫中,從而導致數(shù)據(jù)錯誤
5.點擊data to oracle,選擇將要導入數(shù)據(jù)的表,并在fields中將文本中的字段與表中的字段進行關聯(lián)
6.點擊import按鈕進行導入
7.查看導入的數(shù)據(jù)
OK,至此數(shù)據(jù)導入成功。
我給你一些數(shù)據(jù)庫常用的導入導出命令吧:\x0d\x0a該命令在“開始菜單運行CMD”中執(zhí)行\(zhòng)x0d\x0a一、數(shù)據(jù)導出(exp.exe)\x0d\x0a1、將數(shù)據(jù)庫orcl完全導出,用戶名system,密碼accp,導出到d:\daochu.dmp文件中\(zhòng)x0d\x0aexp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、將數(shù)據(jù)庫orcl中scott用戶的對象導出\x0d\x0aexp scott/accp@orcl file=d:\daochu.dmp owner=(scott)\x0d\x0a\x0d\x0a3、將數(shù)據(jù)庫orcl中的scott用戶的表emp、dept導出\x0d\x0aexp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)\x0d\x0a\x0d\x0a4、將數(shù)據(jù)庫orcl中的表空間testSpace導出\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)\x0d\x0a\x0d\x0a二、數(shù)據(jù)導入(imp.exe)\x0d\x0a1、將d:\daochu.dmp 中的數(shù)據(jù)導入 orcl數(shù)據(jù)庫中。\x0d\x0aimp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、如果導入時,數(shù)據(jù)表已經(jīng)存在,將報錯,對該表不會進行導入;加上ignore=y即可,表示忽略現(xiàn)有表,在現(xiàn)有表上追加記錄。\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp full=y ignore=y\x0d\x0a\x0d\x0a3、將d:\daochu.dmp中的表emp導入\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp tables=(emp)
實現(xiàn)的方法和詳細的操作步驟如下:
1、第一步,如果要從Oracle實例orcl導出多個dmp文件表,則在打開cmd窗口后,首先設置環(huán)境變量以將Oracle實例切換為orcl(設置ORACLE_SID
= orcl),然后登錄到sqlplus
,如下圖所示,然后進入下一步。
2、其次,完成上述步驟后,可以使用sql語句“select *?from?dba_directories”以查看當前實例下可用的dmp導出目錄。
導出dmp文件時,可以選擇其中之一,如下圖所示,然后進入下一步。
3、接著,完成上述步驟后,退出sqlplus并使用命令“expdp”導出需要的數(shù)據(jù)庫表dmp文件,如下圖所示,然后進入下一步。
4、最后,完成上述步驟后,就可以將該文件導入實例orcl中的另一個用戶,如下圖所示。這樣,問題就解決了。
當前文章:oracle怎么樣導入表,oracle如何將excel導入到表里
網(wǎng)站URL:http://aaarwkj.com/article14/dssjege.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、網(wǎng)站策劃、品牌網(wǎng)站建設、關鍵詞優(yōu)化、網(wǎng)站建設、網(wǎng)站內鏈
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)