【實驗】【PARTITION】exp匯出分割槽表資料
1.建立分割槽表
sec@ora10g> create table t_partition_range (id number,name varchar2(50))
2 partition by range(id)(
3 partition t_range_p1 values less than (10) tablespace tbs_part01,
4 partition t_range_p2 values less than (20) tablespace tbs_part02,
5 partition t_range_p3 values less than (30) tablespace tbs_part03,
6 partition t_range_pmax values less than (maxvalue) tablespace tbs_part04
7 );
Table created.
2.模擬插入資料
sec@ora10g> insert into t_partition_range values (5,'Andy1');
1 row created.
sec@ora10g> insert into t_partition_range values (15,'Andy2');
1 row created.
sec@ora10g> insert into t_partition_range values (25,'Andy3');
1 row created.
sec@ora10g> insert into t_partition_range values (35,'Andy4');
1 row created.
sec@ora10g> insert into t_partition_range values (45,'Andy5');
1 row created.
sec@ora10g> commit;
Commit complete.
3.查詢每一個分割槽中包含的資料
sec@ora10g> select * from t_partition_range partition(t_range_p1);
ID NAME
---------- --------------------------------------------------
5 Andy1
sec@ora10g> select * from t_partition_range partition(t_range_p2);
ID NAME
---------- --------------------------------------------------
15 Andy2
sec@ora10g> select * from t_partition_range partition(t_range_p3);
ID NAME
---------- --------------------------------------------------
25 Andy3
sec@ora10g> select * from t_partition_range partition(t_range_pmax);
ID NAME
---------- --------------------------------------------------
35 Andy4
45 Andy5
4.exp匯出分割槽表資料
4.1.匯出一個分割槽演示
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range:t_range_p1
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:08:31 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
Export terminated successfully without warnings.
4.2.匯出兩個分割槽演示
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range:t_range_p1,t_partition_range:t_range_p2
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:08:01 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
. . exporting partition T_RANGE_P2 1 rows exported
Export terminated successfully without warnings.
4.3.全部匯出效果
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:16:08 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
. . exporting partition T_RANGE_P2 1 rows exported
. . exporting partition T_RANGE_P3 1 rows exported
. . exporting partition T_RANGE_PMAX 2 rows exported
Export terminated successfully without warnings.
-- The End --
sec@ora10g> create table t_partition_range (id number,name varchar2(50))
2 partition by range(id)(
3 partition t_range_p1 values less than (10) tablespace tbs_part01,
4 partition t_range_p2 values less than (20) tablespace tbs_part02,
5 partition t_range_p3 values less than (30) tablespace tbs_part03,
6 partition t_range_pmax values less than (maxvalue) tablespace tbs_part04
7 );
Table created.
2.模擬插入資料
sec@ora10g> insert into t_partition_range values (5,'Andy1');
1 row created.
sec@ora10g> insert into t_partition_range values (15,'Andy2');
1 row created.
sec@ora10g> insert into t_partition_range values (25,'Andy3');
1 row created.
sec@ora10g> insert into t_partition_range values (35,'Andy4');
1 row created.
sec@ora10g> insert into t_partition_range values (45,'Andy5');
1 row created.
sec@ora10g> commit;
Commit complete.
3.查詢每一個分割槽中包含的資料
sec@ora10g> select * from t_partition_range partition(t_range_p1);
ID NAME
---------- --------------------------------------------------
5 Andy1
sec@ora10g> select * from t_partition_range partition(t_range_p2);
ID NAME
---------- --------------------------------------------------
15 Andy2
sec@ora10g> select * from t_partition_range partition(t_range_p3);
ID NAME
---------- --------------------------------------------------
25 Andy3
sec@ora10g> select * from t_partition_range partition(t_range_pmax);
ID NAME
---------- --------------------------------------------------
35 Andy4
45 Andy5
4.exp匯出分割槽表資料
4.1.匯出一個分割槽演示
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range:t_range_p1
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:08:31 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
Export terminated successfully without warnings.
4.2.匯出兩個分割槽演示
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range:t_range_p1,t_partition_range:t_range_p2
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:08:01 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
. . exporting partition T_RANGE_P2 1 rows exported
Export terminated successfully without warnings.
4.3.全部匯出效果
ora10g@testdb /exp$ exp sec/sec file=sec.dmp tables=t_partition_range
Export: Release 10.2.0.1.0 - Production on Fri Jul 10 16:16:08 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T_PARTITION_RANGE
. . exporting partition T_RANGE_P1 1 rows exported
. . exporting partition T_RANGE_P2 1 rows exported
. . exporting partition T_RANGE_P3 1 rows exported
. . exporting partition T_RANGE_PMAX 2 rows exported
Export terminated successfully without warnings.
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-608844/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【實驗】【PARTITION】RANGE分割槽表截斷表分割槽(Truncate Partition)
- 【實驗】【PARTITION】RANGE分割槽表移動表分割槽(Move Partition)
- 【實驗】【PARTITION】RANGE分割槽表合併分割槽
- 【實驗】【PARTITION】RANGE分割槽表增加分割槽
- 【實驗】【PARTITION】RANGE分割槽表刪除分割槽
- 【實驗】【PARTITION】RANGE分割槽表重新命名錶分割槽(Rename Partition)
- 匯入匯出 Oracle 分割槽表資料Oracle
- Oracle Interval Partition 自動分割槽表-實驗Oracle
- 【實驗】【PARTITION】RANGE分割槽表未指定maxvalue分割槽將無法插入相關資料
- 【實驗】【PARTITION】RANGE分割槽建立
- 使用expdp匯出分割槽表中的部分分割槽資料
- 使用PARTITION_OPTIONS引數控制資料泵分割槽表匯入
- 【實驗】【PARTITION】交換分割槽時分割槽表有主鍵目標表亦需有主鍵
- 實驗】【PARTITION】RANGE分割槽建立【轉】
- [oracle] expdp 匯出分割槽表的分割槽Oracle
- 分割槽表PARTITION table
- 分割槽表匯入資料庫資料庫
- Oracle查詢Interval partition分割槽表內資料Oracle
- Oracle分割槽表(Partition Table)Oracle
- 分割槽表PARTITION table(轉)
- MySQL 分割槽表 partition線上修改分割槽欄位MySql
- partition 分割槽表重新命名
- oracle分割槽partition及分割槽索引partition index(一)Oracle索引Index
- 非分割槽錶轉換為分割槽表和partition indexIndex
- 【EXP】使用EXP的QUERY選項匯出表中部分資料
- 資料匯入匯出EXP/IMP
- exp/imp匯出匯入資料
- partition 分割槽表移動到其他表空間
- 分割槽表入無分割槽的資料庫資料庫
- oracle資料匯出匯入(exp/imp)Oracle
- 資料泵匯入分割槽表長時間HANG住
- 分割槽表UNUSED列後的EXCHANGE PARTITION操作
- ORACLE 範圍分割槽 partition-range分割槽Oracle
- oracle分割槽及分割槽索引partition_partition index_維護(一)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(二)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(三)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(四)Oracle索引Index
- 用EXP/IMP從高版本資料庫匯出至低版本資料庫匯入實驗資料庫