11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

326 CHAPTER 7 ■ DATA PUMPExport and Import of Partitions<strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g adds the ability to allow partitions to be exported and imported with DataPump using the TRANSPORTABLE=ALWAYS option. In previous releases, the transportable tablespacemechanism of Data Pump could be specified only at the tablespace level.Now, <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g provides the mechanism to export/import partitions/subpartitionswithout having to move an entire table or exchange partitions by introducing the PARTITION_OPTIONS parameter. The default behavior is to departition a partitioned table export to a newtable at import time. If the TRANSPORTABLE option is not set during export or the partition nameis not specified as a filter, the expected behavior would be none.Allowable values for PARTITION_OPTIONS are as follows:• none: Creates the table as it was on the source database. This option cannot be used if thetransportable option was set with the partition/subpartition filter during the export.• departition: Creates each partition/subpartition as a new table. The new table namewill be a derived name from the table and partition name. If the export was performedwith the TRANSPORTABLE option and partition/subpartition was specified, the importmust be done using the departition option.• merge: Combines all partitions/subpartitions into a single table. This option cannot be usedif the TRANSPORTABLE option was set with the partition/subpartition filter during the export.Let’s take a look at an example of how to use the departition option to import a singlepartition of a table. Here we have a list-partitioned table called KB:SQL> create table kb2 (doc_id number,3 category varchar2(55),4 note varchar2(4000))5 partition by list (category)6 (7 partition p_dg values ('DG') tablespace kb1,8 partition p_plsql values ('PLSQL') tablespace kb2,9 partition p_default values (default) tablespace kb310* )/Table created.By querying the DBA_TAB_PARTITIONS view, you can confirm that the P_PLSQL partitionresides on the KB2 tablespace. We will perform a single row insert into the P_PLSQL partitionwith the DOC_ID of 1001:SQL> insert into kb2 values3 (1001, 'PLSQL', 'PL/SQL in <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g is faster and better!')4 /1 row created.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!