Oracle 12c 新特性 --- 数据泵导入时取消日志记录选项

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leo__1990/article/details/90199282

概念

The new TRANSFORM option, DISABLE_ARCHIVE_LOGGING, to the impdp command line causes Oracle Data Pump to disable redo logging when loading data into tables and when creating indexes. It also adds the same option as part of the PL/SQL DBMS_DATAPUMP package. With redo logging disabled, the disk space required for redo logs during an Oracle Data Pump import is smaller. However, to ensure recovery from media failure, the DBA should do an RMAN backup after the import completes.

Even with this parameter specified, there is still redo logging for other operations of Oracle Data Pump. This includes all CREATE and ALTER statements, except CREATE INDEX, and all operations against the master table used by Oracle Data Pump during the import.

This feature reduces the required maintenance of redo logs by DBAs.

新的转换选项,DISABLE_ARCHIVE_LOGGING,到impdp命令行,导致Oracle数据泵在将数据加载到表中,以及在创建索引时禁用重做日志记录。它还添加了作为PL / SQL DBMS_DATAPUMP包的一部分的相同选项。禁用redo日志记录功能,在Oracle数据泵导入期间重做日志所需的磁盘空间更小。但是,为了确保从媒体故障中恢复,DBA应该在导入完成后执行RMAN备份。

即使有了这个参数,Oracle数据泵的其他操作仍然需要重新进行日志记录。这包括所有创建和ALTER语句,除了创建索引,以及在导入期间Oracle数据泵使用的主表的所有操作。

该特性降低了dba所需要的重做日志的维护。

The TRANSFORM parameter of impdp has been extended to include a DISABLE_ARCHIVE_LOGGING option. The default setting of "N" has no affect on logging behaviour. 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.

将impdp的转换参数扩展到包含DISABLE_ARCHIVE_LOGGING选项。“N”的默认设置对日志行为没有影响。在导入过程中,使用“Y”来减少与表和索引相关的日志记录,在导入数据之前将日志属性设置为NOLOGGING,并在操作完成后重新设置日志。

语法:

TRANSFORM = transform_name:value[:object_type]

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

实验

1) ransform=disable_archive_logging:y 取消日志记录
[oracle@host1 ~]$ impdp system/oracle@pdbcndba directory=dpump_dir1 dumpfile=expdat.dmp logfile=impdp_emp.log remap_schema=test:test1 transform=disable_archive_logging:y

Import: Release 12.1.0.2.0 - Production on Sat Aug 5 12:44:46 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@pdbcndba directory=dpump_dir1 dumpfile=expdat.dmp logfile=impdp_emp.log remap_schema=test:test1 transform=disable_archive_logging:y 
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "TEST1"."LEO2"                              831.3 KB    6886 rows
. . imported "TEST1"."VW_TEST"                           3.520 MB   90936 rows
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Sat Aug 5 12:45:04 2017 elapsed 0 00:00:17

2) transform=disable_archive_logging:y:table 对表取消日志记录
[oracle@host1 ~]$ impdp system/oracle@pdbcndba directory=dpump_dir1 dumpfile=expdat.dmp logfile=impdp_emp1.log remap_schema=test:test1 transform=disable_archive_logging:y:table

Import: Release 12.1.0.2.0 - Production on Sat Aug 5 12:47:52 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@pdbcndba directory=dpump_dir1 dumpfile=expdat.dmp logfile=impdp_emp1.log remap_schema=test:test1 transform=disable_archive_logging:y:table 
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "TEST1"."LEO2"                              831.3 KB    6886 rows
. . imported "TEST1"."VW_TEST"                           3.520 MB   90936 rows
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Sat Aug 5 12:48:10 2017 elapsed 0 00:00:17

参考链接:

http://docs.oracle.com/database/121/NEWFT/chapter12101.htm#NEWFT002

http://docs.oracle.com/database/121/SUTIL/GUID-64FB67BD-EB67-4F50-A4D2-5D34518E6BDB.htm#SUTIL939

猜你喜欢

转载自blog.csdn.net/leo__1990/article/details/90199282