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.

CHAPTER 7 ■ DATA PUMP 325SELECT dbms_random.value(100000000,999999999) into v_ssn FROM dual;return v_ssn;end;end;/You can customize functions similar to the remap_ssn function to custom-tailor sensitivetables for your corporate databases.■Tip Perform data remapping during the export operation so that the data at rest on the file system doesnot include any sensitive information. It is much easier to steal a dump file than it is to get privileges to accessthe database.Remapping a Table<strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g provides the ability to import a table into another table using the REMAP_TABLE option. The REMAP_TABLE option can be used to change the name of a specific table(partitioned and nonpartitioned) during import.Some restrictions that you may need to consider are as follows:• If partitioned tables were exported in transportable mode, then each partition andsubpartition must be promoted to its own table. The transportable mode is a new<strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g feature that specifies whether a table/partition/subpartition istransportable.• Tables will not be remapped if they already exist even if the TABLE_EXISTS_ACTION is set totruncate or append.• The export has to be performed in a nontransportable mode.The following are two examples of specifying the REMAP_TABLE parameter, one withoutpartitions and the other with partitions where exports occur in the transportable mode:impdp dumpfile=oratmp:docs.dmp \remap_table=rodba.docs.docs2 userid=rodba/oracle123impdp dumpfile=oratmp:docs.dmp \remap_table=rodba.docs:part1.docs3 userid=rodba/oracle123Notice that the REMAP_TABLE option is designated as [schema.]old_tablename[.partition]:new_tablename.

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

Saved successfully!

Ooh no, something went wrong!