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.

330 CHAPTER 7 ■ DATA PUMP10* as select * from docsSQL> /Table created.In <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g, you can modify this script to take advantage of the new COMPRESSIONand ENCRYPTION options. You do this by supplying additional options to the ACCESS PARAMETERSclause. See the following example of creating a compressed external table. Please pay particularattention to the ACCESS PARAMETERS clause:1 create table docs2 organization external3 (4 type oracle_datapump5 default directory dbadir6 access parameters7 (logfile logdir:docs compression enabled)8 location ('docs.dmp')9 )10* as select * from documentsSQL> /Table created.In addition to specifying the COMPRESSION option, you can also specify both COMPRESSIONand ENCRYPTION options, as shown in the following example:SQL> create table docs2 organization external3 (4 type oracle_datapump5 default directory dbadir6 access parameters7 (logfile logdir:docs compression enabled encryption enabled)8 location ('docs.dmp')9 )10 as select * from documents<strong>11</strong> /Table created.To use the encryption option, TDE must be set up first; otherwise, you will receive an ORA-28365 alert indicating that the wallet is not open. For information about how to enable TDE,please refer to Chapter 5.Now, let’s read the external table based on the encrypted and compressed dump file. Thefollowing query confirms that the data content is accurate and accounted for:

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

Saved successfully!

Ooh no, something went wrong!