imp的方式:
成都創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:做網(wǎng)站、網(wǎng)站設(shè)計(jì)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的西山網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
1. 獲取幫助
imp help=y
2. 導(dǎo)入一個(gè)完整數(shù)據(jù)庫(kù)
imp system/manager file=bible_db log=dible_db full=y ignore=y
3. 導(dǎo)入一個(gè)或一組指定用戶所屬的全部表、索引和其他對(duì)象
imp system/manager file=seapark log=seapark fromuser=seapark
imp system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)
4. 將一個(gè)用戶所屬的數(shù)據(jù)導(dǎo)入另一個(gè)用戶
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. 導(dǎo)入一個(gè)表
imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)
6. 從多個(gè)文件導(dǎo)入
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. 增量導(dǎo)入
imp system./manager inctype= RECTORE FULL=Y FILE=A
實(shí)現(xiàn)的方法和詳細(xì)的操作步驟如下:
1、第一步,如果要從Oracle實(shí)例orcl導(dǎo)出多個(gè)dmp文件表,則在打開(kāi)cmd窗口后,首先設(shè)置環(huán)境變量以將Oracle實(shí)例切換為orcl(設(shè)置ORACLE_SID
= orcl),然后登錄到sqlplus
,如下圖所示,然后進(jìn)入下一步。
2、其次,完成上述步驟后,可以使用sql語(yǔ)句“select *?from?dba_directories”以查看當(dāng)前實(shí)例下可用的dmp導(dǎo)出目錄。
導(dǎo)出dmp文件時(shí),可以選擇其中之一,如下圖所示,然后進(jìn)入下一步。
3、接著,完成上述步驟后,退出sqlplus并使用命令“expdp”導(dǎo)出需要的數(shù)據(jù)庫(kù)表dmp文件,如下圖所示,然后進(jìn)入下一步。
4、最后,完成上述步驟后,就可以將該文件導(dǎo)入實(shí)例orcl中的另一個(gè)用戶,如下圖所示。這樣,問(wèn)題就解決了。
我給你一些數(shù)據(jù)庫(kù)常用的導(dǎo)入導(dǎo)出命令吧:\x0d\x0a該命令在“開(kāi)始菜單運(yùn)行CMD”中執(zhí)行\(zhòng)x0d\x0a一、數(shù)據(jù)導(dǎo)出(exp.exe)\x0d\x0a1、將數(shù)據(jù)庫(kù)orcl完全導(dǎo)出,用戶名system,密碼accp,導(dǎo)出到d:\daochu.dmp文件中\(zhòng)x0d\x0aexp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、將數(shù)據(jù)庫(kù)orcl中scott用戶的對(duì)象導(dǎo)出\x0d\x0aexp scott/accp@orcl file=d:\daochu.dmp owner=(scott)\x0d\x0a\x0d\x0a3、將數(shù)據(jù)庫(kù)orcl中的scott用戶的表emp、dept導(dǎo)出\x0d\x0aexp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)\x0d\x0a\x0d\x0a4、將數(shù)據(jù)庫(kù)orcl中的表空間testSpace導(dǎo)出\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)\x0d\x0a\x0d\x0a二、數(shù)據(jù)導(dǎo)入(imp.exe)\x0d\x0a1、將d:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 orcl數(shù)據(jù)庫(kù)中。\x0d\x0aimp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、如果導(dǎo)入時(shí),數(shù)據(jù)表已經(jīng)存在,將報(bào)錯(cuò),對(duì)該表不會(huì)進(jìn)行導(dǎo)入;加上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導(dǎo)入\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp tables=(emp)
網(wǎng)頁(yè)名稱:怎么把表導(dǎo)入oracle 怎么把表導(dǎo)入到sql數(shù)據(jù)庫(kù)
URL鏈接:http://vcdvsql.cn/article48/hepdep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、網(wǎng)站改版、動(dòng)態(tài)網(wǎng)站、企業(yè)建站、營(yíng)銷型網(wǎng)站建設(shè)、定制網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)