In this article we will discuss about Data
Pump (expdp, impdp) Enhancements in Oracle Database 12c Release 1
NOLOGGING Option (DISABLE_ARCHIVE_LOGGING)
LOGTIME Parameter
Export View as Table
Change Table Compression at Import
Change Table LOB Storage at Import.
Dumpfile Compression Options.
Encryption Password Enhancements.
Transportable Database.
NOLOGGING Option (DISABLE_ARCHIVE_LOGGING)
The TRANSFORM parameter
of impdp has been extended to include a DISABLE_ARCHIVE_LOGGING option. The default setting of "N" has no any effect
on logging behavior. Using a value "Y" reduces the logging associated
with tables and indexes during the import by setting their logging attribute
to NOLOGGING before the data is imported and resetting it to LOGGING once the
operation is complete.
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
The effect can be
limited to a specific type of object (TABLE or INDEX) by appending the
object type.
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:TABLE
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:INDEX
An example of its use
is shown below.
$ impdp
system/Password1@pdb1 directory=test_dir dumpfile=emp.dmp logfile=impdp_emp.log
remap_schema=scott:test transform=disable_archive_logging:y
The DISABLE_ARCHIVE_LOGGING option has no effect if the database is running in FORCE
LOGGING mode.
LOGTIME Parameter
The
LOGTIME parameter
determines if timestamps should be included in the output messages from the expdp and impdp utilities.
The allowable values are explained below.
NONE: The default value, which indicates that no timestamps should be included in the output.STATUS: Timestamps are included in output to the console, but not in the associated log file.LOGFILE: Timestamps are included in output to the log file, but not in the associated console messages.ALL: Timestamps are included in output to the log file and console.
$ expdp
scott/tiger@pdb1 tables=emp directory=test_dir dumpfile=emp.dmp
logfile=expdp_emp.log logtime=all
Export View as Table
The
VIEWS_AS_TABLES parameter
allows Data Pump to export the specified views as if they were tables. The
table structure matches the view columns, with the data being the rows returned
by the query supporting the views.
VIEWS_AS_TABLES=[schema_name.]view_name[:table_name],
...
Now export the view using the
VIEWS_AS_TABLES parameter.
$ expdp scott/tiger views_as_tables=scott.emp_v
directory=test_dir dumpfile=emp_v.dmp logfile=expdp_emp_v.log
Change Table Compression at Import
The
TABLE_COMPRESSION_CLAUSE clause of the TRANSFORM parameter
allows the table compression characteristics of the tables in an import to be
altered on the fly.
$ impdp
system/Password1@pdb1 directory=test_dir dumpfile=emp.dmp logfile=impdp_emp.log
remap_schema=scott:test transform=table_compression_clause:compress
The allowable values
for the TABLE_COMPRESSION_CLAUSE include the following.
- NONE : The table compression
clause is omitted, so the table takes on the compression characteristics
of the tablespace.
- NOCOMPRESS : Disables table
compression.
- COMPRESS : Enables basic table
compression.
- ROW STORE COMPRESS BASIC : Same
as COMPRESS.
- ROW STORE COMPRESS BASIC : Same
as COMPRESS.
- ROW STORE COMPRESS ADVANCED :
Enables advanced compression, also known as OLTP compression.
- COLUMN STORE COMPRESS FOR QUERY
: Hybrid Columnar Compression (HCC) available in Exadata and ZFS storage
appliances.
- COLUMN STORE COMPRESS FOR
ARCHIVE : Hybrid Columnar Compression (HCC) available in Exadata and ZFS
storage appliances.
Change Table LOB Storage at Import.
The
LOB_STORAGE clause of the TRANSFORM parameter
allows the LOB storage characteristics of table columns in a non-transportable
import to be altered on the fly.
Below are allowable values.
- SECUREFILE : The LOBS are
stored as SecureFiles.
- BASICFILE : The LOBS are stored
as BasicFiles.
- DEFAULT : The LOB storage is
determined by the database default.
- NO_CHANGE : The LOB storage
matches that of the source object.
$ impdp
system/Password1@pdb1 directory=test_dir dumpfile=lob_table.dmp
logfile=impdp_lob_table.log transform=lob_storage:securefile
Dumpfile Compression Options.
As part of the Advanced Compression option, you can specify the
COMPRESSION_ALGORITHM parameter to
determine the level of compression of the export dumpfile. This is not related
to table compression discussed previously.
The
meanings of the available values are described below.
- BASIC : The same compression
algorithm used in previous versions. Provides good compression, without
severely impacting on performance.
- LOW : For use when reduced CPU
utilisation is a priority over compression ratio.
- MEDIUM : The recommended
option. Similar characteristics to BASIC, but uses a different algorithm.
- HIGH : Maximum available compression, but more CPU intensive.
- $ expdp scott/tiger tables=emp directory=test_dir dumpfile=emp.dmp logfile=expdp_emp.log compression=all compression_algorithm=medium
Encryption Password Enhancements.
In previous versions,
data pump encryption required the ENCRYPTION_PASSWORD parameter to be entered on the command
line, making password snooping relatively easy.
In Oracle 12c,
the ENCRYPTION_PWD_PROMPT parameter enables encryption without
requiring the password to be entered as a command line parameter. Instead, the
user is prompted for the password at runtime, with their response not echoed to
the screen.
ENCRYPTION_PWD_PROMPT=[YES | NO]
$ expdp scott/tiger tables=emp
directory=test_dir dumpfile=emp.dmp logfile=expdp_emp.log encryption_pwd_prompt=yes
Transportable Database.
The
TRANSPORTABLE option can now
be combined with the FULL option to transport a whole database.
$ expdp
system/Password1 full=Y
transportable=always version=12 directory=TEMP_DIR dumpfile=orcl.dmp
logfile=expdporcl.log
No comments:
Post a Comment
Thanks for reading till end. I hope this will help you more to improve your knowledge.
Now it's your turn!
What do you think? Share your experience in the comments box and subscribe for more interesting post.