Oracle11g 資料備份遷移恢復 資料幫浦

2021-10-18 17:53:02 字數 2494 閱讀 8154

rman最小的粒度是資料檔案,資料幫浦最小粒度是表中的特定行,所以之間不能替代,可以互為補充。

create directory home as '/home/oracle';

指定目錄下的檔案

dumpfile=home:ext.dmp 或者 directory=home dumpfile=ext/dmp

預設路徑data_pump_dir

select * from dba_directories;

grant read.write on direcotry home to hr;

需要具有datapump_exp_full_database或者dba許可權

expdp system/oracle cluster=n compression=all full=y parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

cluster=n #僅允許使用乙個資料庫例項上執行,限制了對rac環境中其他節點使用

compression=all #壓縮

full=y #完全模式匯出,包含所有使用者業務資料

parallel=2 #並行度

nologfile=y #不產生日誌

dumpfile=ex%u.dmp #%u表示01-10,根據並行度匯出ex01和ex02檔案

reuse_dumpfiles=y #目錄中同名檔案將覆蓋

expdp system/oracle cluster=n tablespace=users,example parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

expdp system/oracle cluster=n schemas=hr,oe parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

expdp system/oracle cluster=n tables=hr.employees,hr.departments parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

expdp system/oracle cluster=n tables=hr.employees query=hr.employees:\"where job_id\=\'it_prog\'" parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

expdp system/oracle cluster=n flashback_time=\"systimestamp \-interval \'10\' minute\" tables=hr.employees,hr.departments parallel=2 nologfile=y dumpfile=ex%u.dmp reuse_dumpfiles=y

impdp system/oracle cluster=n full=y nologfile=y dumpfile=ex01.dmp,ex02.dmp

impdp system/oracle cluster=n tablespaces=example nologfile=y dumpfile=ex%u.dmp

impdp system/oracle cluster=n schemas=hr nologfile=y dumpfile=ex%u.dmp

impdp system/oracle cluster=n tables=hr.employees nologfile=y dumpfile=ex%u.dmp

impdp system/oracle cluster=n tables=hr.employees query=******x nologfile=y dumpfile=ex%u.dmp

remap_table\remap_schema

exclude

alter tablespace users read only;

expdp system/oracle transport_tablespace=users nologfile=y dumpfile=tts.dmp reuse_dumpfiles=y

可傳輸表空間匯出只包含物件的資料字典描述。實際資料還在表空間資料檔案中。

transport_fill_check=y #自包含性檢查,即不存在依賴

cp ***x/ddd.dbf /ddd/ddd/xa.tts

alter tablespace users read write;

drop tablespace users including contents and datafile;

impdp \'/ as sysdba\' transport_datafiles=/ddd/ddd/xa.tts nologfile=y dumpfile=tts.dmp

select tablespace_name, status,plugged_in

from dba_tablespaces;

alter tablespace users read write;

Oracle 11g 遷移資料檔案

一 基礎環境 作業系統 windows 或 linux 資料庫版本 oracle database 11g r2 二 解決問題 1 我們在進行備份資料庫或者進行複雜的操作的時候,表空間自動擴充套件功能開啟的時候,會提示磁碟空間不足。2 將資料檔案分散到不同的磁碟,以提高資料庫的 i o 效能。三 操...

Oracle 11g筆記 備份 恢復

備份 恢復 匯出 匯入 exp imp oracle10g看資料幫浦 data pump 提公升了效能,使用expdb impdb命令的dbms datapump包 離線備份 資料庫 聯機備份 資料庫處於archivelog模式。alter tablespace users begin backup...

oracle11g資料庫備份收藏

使用exp匯出資料時,當表沒有資料的時候,表結構會匯出報錯,這個時候使用expdp匯出 用expdp匯出資料時,習慣按照使用者匯出,例如 expdp 使用者 密碼 oracleid schemas 使用者 dumpfile 檔名 logfile 匯出日誌。此時expdp可以這樣寫 expdp 使用者...