新聞中心
oracle 如何導入導出表
在數(shù)據(jù)庫中導出表后導入,是一個完整的操作,內(nèi)容中的oracle 11g是安裝在windows 上的。
oracle的imp/exp就相當于oracle數(shù)據(jù)的還原與備份,利用這個功能我們可以構(gòu)建兩個相同的數(shù)據(jù)庫,一個用于正式的,一個用戶測試,一般情況下,我們常用的是將服務(wù)器的數(shù)據(jù)導出來,放在本地進行測試,以便發(fā)現(xiàn)問題并改正。
1.如何導出表和數(shù)據(jù)庫:
1.打開 cmd 進入到 exp.exe 所在目錄
2. 語法: exp userid=用戶名/密碼@哪個數(shù)據(jù)庫 tables=(表名) file=本地存放路徑
例: exp userid=scott/test@orcl tables=(test) file=d:\test.dmp
1.導出表結(jié)構(gòu):
exp userid=scott/test@orcl tables=(test) file=d:\test.dmp rows=n
2.導出方案:
exp userid=scott/test@orcl owner=方案名稱 file=d:\***.dmp
3.導出數(shù)據(jù)庫
去掉tables 就可以了 exp userid=scott/test@orcl full=y inctype=complete file=d:\test.dmp
exp常用選項介紹:
userid:指定導出時的用戶名,口令,鏈接字符串
tables: 指定導出的表
owner: 指定導出的方案
fully=y: 導入全部內(nèi)容
inctype: 用于指定執(zhí)行導出操作的增量類型
rows: 用于指定是否到處表中的數(shù)據(jù)
file: 用于指定導出文件名
2.導入:
1.導入表:
2.導入數(shù)據(jù)庫:
imp userid=scott/test@orcl full=y file=d:\test.dmp
文章名稱:oracle導入導出表時因一個分號引發(fā)的慘案-創(chuàng)新互聯(lián)
本文URL:http://fisionsoft.com.cn/article/cccdoj.html