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.

CHAPTER 7 ■ DATA PUMP 327Document identifier 1001 will be established as the baseline data for this demonstration.Behind the scenes, the KB2 tablespace is converted into a read-only tablespace. Next, we unloadthe P_PLSQL partition of the KB table using Data Pump export with the TRANSPORTABLE=ALWAYSoption, as shown here:DBA<strong>11</strong>g > expdp tables=sh.kb:p_plsql userid=sh/sh \directory=dbadir dumpfile=p_plsql.dmp \logfile=logdir_p_plsql.log \reuse_dumpfiles=Y \transportable=alwaysExport: Release <strong>11</strong>.1.0.6.0 - Production on Saturday, 01 September, 2007 23:46:03Copyright (c) 2003, 2007, <strong>Oracle</strong>. All rights reserved.Connected to: <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g Enterprise Edition Release <strong>11</strong>.1.0.6.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsStarting "SH"."SYS_EXPORT_TABLE_01": tables=sh.kb:p_plsql userid=sh/********directory=dbadir dumpfile=p_plsql.dmp logfile=logdir_p_plsql.logtransportable=alwaysProcessing object type TABLE_EXPORT/TABLE/PLUGTS_BLKProcessing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/END_PLUGTS_BLKMaster table "SH"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded******************************************************************************Dumpfile set for SH.SYS_EXPORT_TABLE_01 is:/home/oracle/p_plsql.dmp******************************************************************************Datafiles required for transportable tablespace KB2:+DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817Job "SH"."SYS_EXPORT_TABLE_01" successfully completed at 23:46:14The Data Pump export log indicates that the KB2 tablespace datafile resides in the DATAdiskgroup in the ASM instance. The datafile, +DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817, isrequired to transport the KB2 tablespace.We will now take the Data Pump export file p_plsql.dmp and the +DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817 datafile and perform a copy of the datafile followed by an import intoanother database. The easiest way to take a datafile out of ASM is to copy the datafile out ofASM to the file system using the cp command (another <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g new feature,discussed in detail in Chapter 9). Here the +DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817 file iscopied to the /tmp directory on the operating system:ASMCMD [+] > cp -irf +DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817 /tmp/kb2.dbfsource +DATA/dba<strong>11</strong>g/datafile/kb2.294.632183817target /tmp/kb2.dbfcopying file(s)...file, /tmp/kb2.dbf, copy committed.

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

Saved successfully!

Ooh no, something went wrong!