我給你一些數(shù)據(jù)庫常用的導(dǎo)入導(dǎo)出命令吧:\x0d\x0a該命令在“開始菜單運(yùn)行CMD”中執(zhí)行\(zhòng)x0d\x0a一、數(shù)據(jù)導(dǎo)出(exp.exe)\x0d\x0a1、將數(shù)據(jù)庫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ù)庫orcl中scott用戶的對(duì)象導(dǎo)出\x0d\x0aexp scott/accp@orcl file=d:\daochu.dmp owner=(scott)\x0d\x0a\x0d\x0a3、將數(shù)據(jù)庫orcl中的scott用戶的表emp、dept導(dǎo)出\x0d\x0aexp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)\x0d\x0a\x0d\x0a4、將數(shù)據(jù)庫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ù)庫中。\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)
專業(yè)領(lǐng)域包括成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、商城網(wǎng)站定制開發(fā)、微信營銷、系統(tǒng)平臺(tái)開發(fā), 與其他網(wǎng)站設(shè)計(jì)及系統(tǒng)開發(fā)公司不同,創(chuàng)新互聯(lián)建站的整合解決方案結(jié)合了幫做網(wǎng)絡(luò)品牌建設(shè)經(jīng)驗(yàn)和互聯(lián)網(wǎng)整合營銷的理念,并將策略和執(zhí)行緊密結(jié)合,為客戶提供全網(wǎng)互聯(lián)網(wǎng)整合方案。
工具欄選擇“工具”--》“ODBC導(dǎo)入器”--》選擇“Excel Files”,輸入用戶密碼,連接--》選擇文件,雙擊目錄,選擇文件--》選擇sheet--》切換“到Oracle的數(shù)據(jù)”--》選擇表名以及數(shù)據(jù)對(duì)應(yīng)字段和類型--》點(diǎn)擊導(dǎo)入--》完成
將Excel另存為制表符分隔的txt,選擇文本導(dǎo)入器(text。。),選擇文件File,data to oracle設(shè)置對(duì)應(yīng)字段,一定要選擇好Nvarchar,import完成。
我給你一些數(shù)據(jù)庫常用的導(dǎo)入導(dǎo)出命令吧:
該命令在“開始菜單運(yùn)行CMD”中執(zhí)行
一、數(shù)據(jù)導(dǎo)出(exp.exe)
1、將數(shù)據(jù)庫orcl完全導(dǎo)出,用戶名system,密碼accp,導(dǎo)出到d:\daochu.dmp文件中
exp system/accp@orcl file=d:\daochu.dmp full=y
2、將數(shù)據(jù)庫orcl中scott用戶的對(duì)象導(dǎo)出
exp scott/accp@orcl file=d:\daochu.dmp owner=(scott)
3、將數(shù)據(jù)庫orcl中的scott用戶的表emp、dept導(dǎo)出
exp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)
4、將數(shù)據(jù)庫orcl中的表空間testSpace導(dǎo)出
exp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)
二、數(shù)據(jù)導(dǎo)入(imp.exe)
1、將d:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 orcl數(shù)據(jù)庫中。
imp system/accp@orcl file=d:\daochu.dmp full=y
2、如果導(dǎo)入時(shí),數(shù)據(jù)表已經(jīng)存在,將報(bào)錯(cuò),對(duì)該表不會(huì)進(jìn)行導(dǎo)入;加上ignore=y即可,表示忽略現(xiàn)有表,在現(xiàn)有表上追加記錄。
imp scott/accp@orcl file=d:\daochu.dmp full=y ignore=y
3、將d:\daochu.dmp中的表emp導(dǎo)入
imp scott/accp@orcl file=d:\daochu.dmp tables=(emp)
PL/SQL登錄到數(shù)據(jù)庫,使用tools工具進(jìn)行導(dǎo)入。使用plsql登錄到需要導(dǎo)入數(shù)據(jù)的數(shù)據(jù)庫。點(diǎn)擊工具欄上【tools】--【Import tables】
請(qǐng)點(diǎn)擊輸入圖片描述
點(diǎn)擊工具【SQL Inserts】(第二個(gè)選項(xiàng)),點(diǎn)擊選擇需要導(dǎo)入的數(shù)據(jù)庫腳本。
請(qǐng)點(diǎn)擊輸入圖片描述
選擇sql腳本的,點(diǎn)擊打開,即可打開數(shù)據(jù)庫腳本文件,數(shù)據(jù)庫腳本就可以預(yù)加載到plsq工具中。
請(qǐng)點(diǎn)擊輸入圖片描述
開始導(dǎo)入數(shù)據(jù)庫數(shù)據(jù)。選擇完sql腳本之后,點(diǎn)擊【Import】按鈕開始將腳本中的數(shù)據(jù)導(dǎo)入到數(shù)據(jù)庫中,這個(gè)操作執(zhí)行一次即可,如果數(shù)據(jù)量比較大,會(huì)出現(xiàn)卡頓。
請(qǐng)點(diǎn)擊輸入圖片描述
執(zhí)行完之后,沒有任何報(bào)錯(cuò)說明插入成功。【注意:一定記得點(diǎn)擊commit進(jìn)行提交數(shù)據(jù),否則數(shù)據(jù)不會(huì)提交到數(shù)據(jù)庫進(jìn)行存儲(chǔ)】
請(qǐng)點(diǎn)擊輸入圖片描述
查詢驗(yàn)證插入的數(shù)據(jù)。插入完之后,可以編寫sql語句對(duì)插入的數(shù)據(jù)進(jìn)行核對(duì)。執(zhí)行查詢sql看到剛才插入的數(shù)據(jù)。
請(qǐng)點(diǎn)擊輸入圖片描述
文章名稱:怎么導(dǎo)入數(shù)據(jù)oracle,怎么導(dǎo)入數(shù)據(jù)庫文件
鏈接URL:http://jinyejixie.com/article0/hssjio.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、軟件開發(fā)、靜態(tài)網(wǎng)站、網(wǎng)站設(shè)計(jì)、做網(wǎng)站、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)