Oracle11gr2資料泵新特性(五)
Oracle的11gr2版本中,並沒有對資料泵做出多大的改動,主要是增加了對原始版本引數的支援,並且去掉了一些小的限制。
這一篇介紹資料泵對版本的支援。
Oracle11gr2資料泵新特性(一):http://yangtingkun.itpub.net/post/468/491243
Oracle11gr2資料泵新特性(二):http://yangtingkun.itpub.net/post/468/491323
Oracle11gr2資料泵新特性(三):http://yangtingkun.itpub.net/post/468/491371
Oracle11gr2資料泵新特性(四):http://yangtingkun.itpub.net/post/468/491420
在11.2中,Oracle增加了版本的功能,而資料泵也支援對指定版本的匯出,或將物件匯入到指定的版本中。
SQL> conn yangtk/yangtk
已連線。
SQL> select sys_context('USERENV', 'CURRENT_EDITION_NAME') from dual;
SYS_CONTEXT('USERENV','CURRENT_EDITION_NAME')
-----------------------------------------------------------------------
ORA$BASE
SQL> select synonym_name
2 from user_synonyms;
SYNONYM_NAME
------------------------------
S_1
SQL> create edition my_edition;
版本已建立。
SQL> alter session set edition = my_edition;
會話已更改。
SQL> create synonym s_my_edition for t;
同義詞已建立。
SQL> host
[oracle@bjtest ~]$ expdp yangtk/yangtk directory=d_output dumpfile=my_edition.dp include=synonym source_edition=my_edition
Export: Release 11.2.0.1.0 - Production on 星期一 9月 14 08:10:53 2009
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
連線到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
啟動 "YANGTK"."SYS_EXPORT_SCHEMA_01": yangtk/******** directory=d_output dumpfile=my_edition.dp include=synonym source_edition=my_edition
正在使用 BLOCKS 方法進行估計...
處理物件型別 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的總估計: 0 KB
處理物件型別 SCHEMA_EXPORT/SYNONYM/SYNONYM
已成功載入/解除安裝了主表 "YANGTK"."SYS_EXPORT_SCHEMA_01"
******************************************************************************
YANGTK.SYS_EXPORT_SCHEMA_01 的轉儲檔案集為:
/home/oracle/my_edition.dp
作業 "YANGTK"."SYS_EXPORT_SCHEMA_01" 已於 08:11:02 成功完成
[oracle@bjtest ~]$ impdp yangtk/yangtk directory=d_output dumpfile=my_edition.dp target_edition=ora\$base
Import: Release 11.2.0.1.0 - Production on 星期一 9月 14 08:13:08 2009
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
連線到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已成功載入/解除安裝了主表 "YANGTK"."SYS_IMPORT_FULL_01"
啟動 "YANGTK"."SYS_IMPORT_FULL_01": yangtk/******** directory=d_output dumpfile=my_edition.dp target_edition=ora$base
處理物件型別 SCHEMA_EXPORT/SYNONYM/SYNONYM
ORA-31684: 物件型別 SYNONYM:"YANGTK"."S_1" 已存在
作業 "YANGTK"."SYS_IMPORT_FULL_01" 已經完成, 但是有 1 個錯誤 (於 08:13:11 完成)
[oracle@bjtest ~]$ exit
exit
SQL> select synonym_name
2 from user_synonyms;
SYNONYM_NAME
------------------------------
S_1
S_MY_EDITION
由於版本MY_EDITION是ORA$BASE的子版本,因此可以看到父版本建立的同義詞。匯出MY_EDITION版本的同義詞時,匯出了S_1和S_MY_EDITION兩個物件。
而匯入到目標版本ORA$BASE時,由於S_1已經存在,因此只將同義詞S_MY_EDITION匯入到目標版本中。
資料泵的匯出和匯入版本功能,只是指定了匯出或匯入的版本物件,而在資料泵儲存的檔案中並沒有儲存版本對應的資訊,因此在匯入的時候,如果沒有指定TARGET_EDITION,則Oracle就會匯入到預設版本下,而和匯出時指定的版本沒有關係。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-614568/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12C新特性-資料泵新引數(LOGTIME)Oracle
- Oracle 12C新特性-資料泵新引數(VIEWS_AS_TABLES)OracleView
- 殺停資料泵
- 資料庫升級之-資料泵資料庫
- 資料泵重建使用者
- 資料泵匯出匯入
- Oracle資料庫(資料泵)遷移方案(上)Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(下)Oracle資料庫
- 使用資料泵(expdp、impdp)遷移資料庫流程資料庫
- 大資料開發-Flink-1.13新特性大資料
- Oracle expdp資料泵遠端匯出Oracle
- oracle邏輯備份之--資料泵Oracle
- 使用impdp,expdp資料泵進入海量資料遷移
- Oracle資料庫的邏輯備份工具-expdp資料泵Oracle資料庫
- Automatic Reference Counting(ARC)特性學習(iOS5新特性學習之五)iOS
- Oracle Data Pump 11G 資料泵元件Oracle元件
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- 史上最全Oracle資料泵常用命令Oracle
- Oracle資料泵(Oracle Data Pump) 19cOracle
- Oracle資料泵的匯入和匯出Oracle
- 12c新特性,線上move資料檔案
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- 資料泵的TRANSFORM引數說明及使用ORM
- Oracle 12.2新特性: PDB級閃回資料庫(Flashback PDB)Oracle資料庫
- 新特性解讀 | MySQL 8.0.31 匯入直方圖存量資料MySql直方圖
- 細緻入微:如何使用資料泵匯出表的部分列資料
- 資料遷移(1)——通過資料泵表結構批量遷移
- 【Datapump】Oracle資料泵遷移資料命令參考(expdp/impdp說明)Oracle
- 定量,變數柱塞泵的工作原理,分類,工作特性變數
- 新特性
- OGG之 各種資料泵初始化指令碼指令碼
- 【資料泵】EXPDP匯出表結構(真實案例)
- 【ASK_ORACLE】重灌Oracle資料泵(Datapump)工具的方法Oracle
- Oracle 12.2 新特性:線上PDB資料庫克隆(Pluggable Hot Clone)Oracle資料庫
- MySQL 8.0 20個 InnoDB 及資料字典相關的新特性MySql
- 資料庫週刊18│4月資料庫排行;PG是最好的資料庫;TiDB 4.0新特性資料庫TiDB
- Oracle用資料泵匯入資料包12899的錯誤碼解決方法Oracle
- 資料泵datapump(expdp/impdp)的parfile用法,避免跳脫字元字元
- 資料泵匯出匯入物化檢視(ORA-39083)