ORCALE資料庫imp與exp

2021-08-30 09:32:07 字數 2754 閱讀 9851

oracle中imp命令詳解

oracle的匯入實用程式(import utility)允許從資料庫提取資料,並且將資料寫入作業系統文

件。imp使用的基本格式:imp[username[/password[@service]]],以下例舉imp常用用

法。 1. 獲取幫助

imp help=y

2. 匯入乙個完整資料庫

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. 將乙個使用者所屬的資料匯入另乙個使用者

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. 使用引數檔案

imp system/manager parfile=bible_tables.par

bible_tables.par引數檔案:

#import the sample tables used for the oracle8i database administrator's

#bible.

fromuser=seapark touser=seapark_copy file=seapark log=seapark_import

8. 增量匯入(9i中已經取消)

imp system./manager inctype= rectore full=y file=a

oracle imp/exp幫助說明

c:documents and settingsadministrator>exp help=y

export: release 9.2.0.1.0 - production on 星期三 7月 28 17:04:43 2004

通過輸入 exp 命令和使用者名稱/口令,您可以

後接使用者名稱/口令的命令:

例程: exp scott/tiger

或者,您也可以通過輸入跟有各種引數的 exp 命令來控制「匯出」

按照不同引數。要指定引數,您可以使用關鍵字:

格式: exp keyword=value 或 keyword=(value1,value2,...,valuen)

例程: exp scott/tiger grants=y tables=(emp,dept,mgr)

或 tables=(t1: p1,t1: p2),如果 t1 是分割槽表

userid 必須是命令列中的第乙個引數。

關鍵字 說明(預設) 關鍵字 說明(預設)

userid 使用者名稱/口令 full 匯出整個檔案 (n)

buffer 資料緩衝區大小 owner 所有者使用者名稱列表

file 輸出檔案 (expdat.dmp) tables 表名稱列表

compress 匯入到乙個區 (y) recordlength io 記錄的長度

grants 匯出許可權 (y) inctype 增量匯出型別

indexes 匯出索引 (y) record 跟蹤增量匯出 (y)

direct 直接路徑 (n) triggers 匯出觸發器 (y)

log 螢幕輸出的日誌檔案 statistics 分析物件 (estimate)

rows 匯出資料行 (y) parfile 引數檔名

consistent 交叉表的一致性 (n) constraints 匯出的約束條件 (y)

object_consistent 只在物件匯出期間設定為讀的事務處理 (n)

feedback 每 x 行的顯示進度 (0)

filesize 每個轉儲檔案的最大大小

flashback_scn 用於將會話快照設定回以前狀態的 scn

flashback_time 用於獲取最接近指定時間的 scn 的時間

query 用於匯出表的子集的 select 子句

resumable 遇到與空格相關的錯誤時掛起 (n)

resumable_name 用於標識可恢復語句的文字字串

resumable_timeout resumable 的等待時間

tts_full_check 對 tts 執行完整的或部分相關性檢查

tablespaces 要匯出的表空間列表

transport_tablespace 匯出可傳輸的表空間元資料 (n)

template 呼叫 ias 模式匯出的模板名

在沒有警告的情況下成功終止匯出。

orcale 備份與還原資料庫

orcale 資料庫備份資料的命令用exp.exe,還原資料庫命令imp.exe 一 備份資料庫 exp 格式 exp 使用者名稱 密碼 資料庫 owner 擁有者 file c dmp eg1 資料庫test完全匯出,使用者名稱 test,密碼 test,擁有者 tb test 匯出到d daoc...

Orcale資料庫基礎

orcale資料庫的主要特點 orcale資料型別 char資料型別 當需要固定長度的字串時,使用char資料型別。這種資料型別的列長度可以是1 2000位元組,如果在定義時未指明大小,其預設占用1位元組。varchar2資料型別 varchar2資料型別支援可變長度的字串。該資料型別的大小為1 4...

Oracle資料庫遷移(expdp與impdp)

1 原資料庫備份,備份為dmp檔案 1.1 sqlplus以dba 方式進入,建立邏輯目錄,該命令不會再硬碟中建立真正的目錄,使用dba賬戶建立 需要在d盤先將目錄建好 create or replace directory dmp as d dmp 1.2檢視是否正確建立 硬碟中也要有這個目錄,o...