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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

316 CHAPTER 7 ■ DATA PUMPConnected 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 "SYS"."SYS_EXPORT_FULL_01": full=yes userid='/******** AS SYSDBA'dumpfile=dbadir:full.compress.dmp compression=allEstimate in progress using BLOCKS method...Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATATotal estimation using BLOCKS method: 238.5 MB......Even though the estimated size from Data Pump is 238.5MB, the actual size of the dumpfile is a little less than 84MB, as you see here:-rw-r----- 1 oracle oinstall 87973888 Sep 23 09:31 full.compress.dmpPerforming the same export without the compression option produces a file that is substantiallylarger. The following Data Pump export produces a file called full.dmp approximately248.6MB in size:DBA<strong>11</strong>g > expdp full=yes userid="'/ as sysdba'" dumpfile=dbadir:full.dmp-rw-r----- 1 oracle oinstall 260665344 Sep 23 08:48 full.dmpComparing the file sizes, the noncompressed dump file is 248.6MB in size, while thecompressed dump file is approximately 83.9MB in size. You clearly see that the compressionoption for Data Pump can save you a significant amount of space. DBAs may wonder how DataPump compression compares to compression utilities like gzip. Using the gzip utility, we compressthe full.dmp file. The size of the full.dmp.gz compresses down to 72.99MB:-rw-r----- 1 oracle oinstall 76539609 Sep 23 08:48 full.dmp.gzYou can see that the gzip compression performs slightly better than the Data Pump compressionusing the compression=all option. The compression difference is negligible as you considerthe ease of use factor. In conclusion, you should replace Unix pipes with Data Pump compression.■Note By specifying the user ID of "'/ as sysdba'", export and import dumps can be automatedwithout having to supply a password in the automation script. Please note that it is a single tick surroundedby a double quote on each side.Let’s continue our example and perform a Data Pump export against a single table. In thisexample, the CUST table is created as an image of the CUSTOMER table in the SH schema. In addition,the primary key is dropped, and data is quadrupled to examine the level of compressionthat <strong>Oracle</strong> is capable of producing for a table with 222,000 rows. Here we will perform a tablelevelexport of the SH.CUST table:

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

Saved successfully!

Ooh no, something went wrong!