full database export and import(實戰)
全庫匯出,匯入實戰(資料庫版本需相同)
1、全庫匯出
[ora@dg-ss ~]$ exp system/oracle@test file=/home/ora/full.dmp full=y
2、檢視源庫的表空間
sys@TEST> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
DOUDOU
3、遷移dmp檔案到恢復庫
[ora@dg-ss ~]$ scp full.dmp ora@192.168.0.16:/home/ora
4、恢復庫建立表空間(源庫與恢復庫對比,如需建立表空間,請建立)
建立空間小技巧(源庫執行)
永久表空間
select 'create tablespace ' || tablespace_name ||' datafile '''||replace(file_name,'源庫資料檔案目錄/','目的庫資料檔案目錄/') ||'''size 500m autoextend on ;' from dba_data_files ;
臨時表空間
select 'create temporary tablespace ' || tablespace_name ||' tempfile '''||replace(file_name,’源庫資料檔案目錄/','目的庫資料檔案目錄/') ||'''size 500m autoextend on ;' from dba_temp_files ;
恢復庫
sys@TEST> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------------------------------------
SYSTEM
UNDOTBS1
SYSAUX
USERS
DOUDOU
TEMP
6、全庫匯入
[ora@dg-pp ~]$ imp system/oracle@test file=/home/ora/full.dmp full=y ignore=y
7、成功後,建議再次全庫匯出已做備份
附表:
不同版本的全庫匯入導致了oracle元件出現問題
EXP全庫 oracle:10.2.0.1
IMP全庫 oracle:10.2.0.4
sys@TEST> select comp_name, version, status from sys.dba_registry;
COMP_NAME VERSION STATUS
---------------------------------------- -------------------- --------------------
Oracle Enterprise Manager 10.2.0.4.0 VALID
Spatial 10.2.0.4.0 INVALID
Oracle interMedia 10.2.0.4.0 INVALID
OLAP Catalog 10.2.0.4.0 VALID
Oracle XML Database 10.2.0.4.0 VALID
Oracle Text 10.2.0.4.0 VALID
Oracle Expression Filter 10.2.0.4.0 VALID
Oracle Rule Manager 10.2.0.4.0 VALID
Oracle Workspace Manager 10.2.0.1.0 DOWNGRADED
Oracle Data Mining 10.2.0.4.0 VALID
Oracle Database Catalog Views 10.2.0.4.0 VALID
Oracle Database Packages and Types 10.2.0.4.0 VALID
JServer JAVA Virtual Machine 10.2.0.4.0 VALID
Oracle XDK 10.2.0.4.0 VALID
Oracle Database Java Packages 10.2.0.4.0 VALID
OLAP Analytic Workspace 10.2.0.4.0 VALID
Oracle OLAP API 10.2.0.4.0 VALID
解決方法:
sys@TEST> shutdown immediate;
sys@TEST> startup upgrade
sys@TEST> @?/rdbms/admin/catupgrd.sql----重新升級元件
sys@TEST> @?/rdbms/admin/utlrp.sql ---重新編譯plsql失效的包
sys@TEST> select comp_name, version, status from sys.dba_registry;
COMP_NAME VERSION STATUS
---------------------------------------- ---------- ----------
Oracle Enterprise Manager 10.2.0.4.0 VALID
Spatial 10.2.0.4.0 VALID
Oracle interMedia 10.2.0.4.0 VALID
OLAP Catalog 10.2.0.4.0 VALID
Oracle XML Database 10.2.0.4.0 VALID
Oracle Text 10.2.0.4.0 VALID
Oracle Expression Filter 10.2.0.4.0 VALID
Oracle Rule Manager 10.2.0.4.0 VALID
Oracle Workspace Manager 10.2.0.4.3 VALID
Oracle Data Mining 10.2.0.4.0 VALID
Oracle Database Catalog Views 10.2.0.4.0 VALID
Oracle Database Packages and Types 10.2.0.4.0 VALID
JServer JAVA Virtual Machine 10.2.0.4.0 VALID
Oracle XDK 10.2.0.4.0 VALID
Oracle Database Java Packages 10.2.0.4.0 INVALID
OLAP Analytic Workspace 10.2.0.4.0 VALID
Oracle OLAP API 10.2.0.4.0 VALID
Oracle Database Java Packages 失效,不使用暫不處理
總結:full database export and import 需資料庫版本相同
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2138027/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 10.2.0.1 exp 之 full database export and import(實戰)OracleDatabaseExportImport
- Oracle 12c full transportable export & importOracleExportImport
- export/importExportImport
- 完全可傳輸的匯出/匯入(full transportable export/import)ExportImport
- mysql export & importMySqlExportImport
- mysql import and exportMySqlImportExport
- Oracle 12c 使用(Full Transportable Export/Import)進行升級/遷移OracleExportImport
- import、require 、export、export default、exports、module exportsImportUIExport
- ES6 import exportImportExport
- oracle Export/Import工具使用OracleExportImport
- statistics的export與import!ExportImport
- DB2 export and importDB2ExportImport
- DLL的Export和ImportExportImport
- module.exports 、 exports 和 export 、 export default 、 importExportImport
- How to perform FULL System Export/ImportsORMExportImport
- Import Error: cannot import name ‘export_saved_modelImportErrorExport
- Export/import Datas To/from a Csv FileExportImport
- import,export的支援[nodejs]ImportExportNodeJS
- DataPump Export/Import Of LOBs Are Not Executed in ParallelExportImportParallel
- oracle Export and Import 簡介(轉)OracleExportImport
- Data Utilities : Export and Import Utilities (57)ExportImport
- Export And Import Between Different Oracle VersionsExportImportOracle
- oracle full database backupOracleDatabase
- 新手關於import/export的理解ImportExport
- ES6 module模組 import exportImportExport
- 1nd round export and import errorExportImportError
- imp full database (轉官檔)Database
- JS/TS 的 import 和 export 用法小結JSImportExport
- node識別es6的 import/exportImportExport
- DB2 export 與 import 相關操作DB2ExportImport
- 詳解es6的export和import命令ExportImport
- Run Out Of Space On UNDO Tablespace Using DataPump Import/ExportImportExport
- import、require、export、module.exports 混合使用詳解ImportUIExport
- 【metalink】Export/Import DataPump Parameter TRACE (文件 ID 286496.1)ExportImport
- 【轉載-ORACLE】ORA-6512 During Full ExportOracleExport
- Export and import right application or execute import imp-00010 error solveExportImportAPPError
- ES6模組化之export和import的用法ExportImport
- ES6規範import和export用法總結ImportExport