首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 數據庫知識 >  >> Oracle 資料庫 >> Oracle 資料庫基礎

Oracle exp/imp 高級選項速查手冊:分卷、增量、SYSDBA

     編輯:Oracle 資料庫基礎

本文將 exp/imp 高級選項濃縮為速查手冊,涵蓋分卷導出導入、增量導出三模式(歷史版本)、SYSDBA 傳輸表空間三大核心場景,命令即拿即用。

一、分卷導出導入:突破 2GB/4GB 文件限制

# 導出:每卷 1000MB,自動按序生成 1.dmp, 2.dmp...
exp user/pwd file=1.dmp,2.dmp,3.dmp filesize=1000m log=exp.log full=y

# 導入:必須按導出順序指定卷文件
imp user/pwd file=1.dmp,2.dmp,3.dmp filesize=1000m \
  tables=target_table fromuser=src_user touser=dest_user commit=y ignore=y

二、增量導出/導入:僅適用 Oracle 9i 及之前版本

⚠️ 現代環境請使用 RMAN 增量備份或 Data Pump

  • 前置條件:必須以 SYS 或 SYSTEM 身份執行
  • Oracle 9i 起 exp 移除 inctype 支持
模式含義命令
完全全庫基線exp user/pwd file=/dir/xxx.dmp log=xxx.log inctype=complete
增量上次任意備份後變更exp user/pwd file=/dir/xxx.dmp log=xxx.log inctype=incremental
累計上次完全備份後所有變更exp user/pwd file=/dir/xxx.dmp log=xxx.log inctype=cumulative

導入:imp usr/pwd FULL=y inctype=system/restore/incremental

  • SYSTEM:僅系統對象
  • RESTORE:所有用戶對象

三、SYSDBA 模式:表空間傳輸(TTS)專用通道

  • 用途:Oracle 技術支持、可傳輸表空間元數據導出導入
  • 關鍵語法:userid="sys/pwd as sysdba"(SQL*Plus 需三重引號)
  • 必須參數:transport_tablespace=y、tablespaces=...、datafiles=...
  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved