impdp中的DISABLE_ARCHIVE_LOGGING参数测试
impdp中的DISABLE_ARCHIVE_LOGGING参数测试
联系:手机/微信(+86 13429648788) QQ(107644445)
标题:impdp中的DISABLE_ARCHIVE_LOGGING参数测试
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
在oracle 12c版本中引入了impdp中的TRANSFORM中的DISABLE_ARCHIVE_LOGGING值,可以实现在导入的时候使用nologging处理从而减少日志量也增加速度,但是在force logging情况下该参数无效
创建测试表
[oracle@localhost ~]$ sqlplus xff/oracle@localhost/pdbSQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 7 10:20:45 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> create table t_xifenfei as select * from dba_objects;Table created.SQL> insert into t_xifenfei select * from t_xifenfei;217838 rows created.SQL> /435676 rows created.SQL> /871352 rows created.SQL> /1742704 rows created.SQL> commit;Commit complete.SQL> select count(*) from t_xifenfei; COUNT(*)---------- 3485408 |
导出测试表
[oracle@localhost ~]$ expdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmp tables=t_xifenfei REUSE_DUMPFILES=yesExport: Release 12.2.0.1.0 - Production on Fri Apr 7 11:55:01 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionStarting "XFF"."SYS_EXPORT_TABLE_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp tables=t_xifenfei REUSE_DUMPFILES=yesProcessing object type TABLE_EXPORT/TABLE/TABLE_DATAProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERProcessing object type TABLE_EXPORT/TABLE/TABLE. . exported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsMaster table "XFF"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded******************************************************************************Dump file set for XFF.SYS_EXPORT_TABLE_01 is: /u01/app/oracle/admin/xffdb/dpdump/4A93528C587D82CEE055000000000001/t_xifenfei.dmpJob "XFF"."SYS_EXPORT_TABLE_01" successfully completed at Fri Apr 7 11:55:59 2017 elapsed 0 00:00:58 |
归档模式下不使用DISABLE_ARCHIVE_LOGGING导入
[oracle@localhost rdbms]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 02:43:23 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> select force_logging from v$database;FORCE_LOGGING---------------------------------------NOSQL> alter system switch logfile;System altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 14Next log sequence to archive 16Current log sequence 16[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmpImport: Release 12.2.0.1.0 - Production on Sat Apr 8 02:46:05 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 02:47:08 2017 elapsed 0 00:01:02[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 02:47:30 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 17Next log sequence to archive 19Current log sequence 19 |
这里可以看出来,导入过程使用时间为1分钟多,导入过程日志切换 了3次
归档模式下使用DISABLE_ARCHIVE_LOGGING导入
[oracle@localhost ~]$ sqlplus xff/oracle@localhost/pdbSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 02:49:23 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Last Successful login time: Sat Apr 08 2017 02:46:05 -04:00Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> drop table t_xifenfei purge;Table dropped.SQL> exitDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 02:50:00 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> alter system switch logfile;System altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 18Next log sequence to archive 20Current log sequence 20[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:yImport: Release 12.2.0.1.0 - Production on Sat Apr 8 02:54:49 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:y Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 02:55:00 2017 elapsed 0 00:00:10[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 02:55:45 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 18Next log sequence to archive 20Current log sequence 20 |
这里可以看出来当使用了DISABLE_ARCHIVE_LOGGING为Y之后导入日志没有发生切换,导入时间仅为10s.
非归档模式下不使用DISABLE_ARCHIVE_LOGGING导入
SQL> alter system switch logfile;System altered.SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 19Current log sequence 21SQL> drop table xff.t_xifenfei purge;Table dropped.[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmpImport: Release 12.2.0.1.0 - Production on Sat Apr 8 03:22:42 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 03:23:17 2017 elapsed 0 00:00:27[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 03:23:49 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 19Current log sequence 21 |
这里测试在非归档模式下不设置DISABLE_ARCHIVE_LOGGING,日志量增加不明显,导入时间变为为27秒.
非归档模式下使用DISABLE_ARCHIVE_LOGGING导入
[oracle@localhost ~]$ sqlplus xff/oracle@localhost/pdbSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 03:24:10 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Last Successful login time: Sat Apr 08 2017 03:22:43 -04:00Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> drop table t_xifenfei purge;Table dropped.SQL> conn / as sysdbaConnected.SQL> alter system switch logfile;System altered.SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 20Current log sequence 22[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:yImport: Release 12.2.0.1.0 - Production on Sat Apr 8 03:25:51 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:y Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 03:26:01 2017 elapsed 0 00:00:10[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 03:26:37 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 20Current log sequence 22 |
这里可以看出来在非归档模式下使用DISABLE_ARCHIVE_LOGGING导入时间为10s,日志量也没有明显增加。
在force logging在非归档情况下使用不DISABLE_ARCHIVE_LOGGING参数
[oracle@localhost ~]$ sqlplus xff/oracle@localhost/pdbSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 10:07:07 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Last Successful login time: Sat Apr 08 2017 03:29:36 -04:00Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> drop table t_xifenfei purge;Table dropped.SQL> alter system switch logfile;System altered.SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 22Current log sequence 24SQL> select force_logging from v$database;FORCE_LOGGING---------------------------------------YES[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:yImport: Release 12.2.0.1.0 - Production on Sat Apr 8 10:10:39 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:y Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 10:11:02 2017 elapsed 0 00:00:21[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 10:11:17 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log lsit;SP2-0718: illegal ARCHIVE LOG optionSQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 22Current log sequence 24 |
这可以可以看出来在非归档情况下force logging无明显增加日志量和导入时间
在force logging在归档情况下使用DISABLE_ARCHIVE_LOGGING参数
SQL> drop table xff.t_xifenfei purge;Table dropped.SQL> alter system switch logfile;System altered.SQL> select force_logging from v$database;FORCE_LOGGING---------------------------------------YESSQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 23Next log sequence to archive 25Current log sequence 25[oracle@localhost ~]$ impdp xff/oracle@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:yImport: Release 12.2.0.1.0 - Production on Sat Apr 8 10:33:28 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionMaster table "XFF"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "XFF"."SYS_IMPORT_FULL_01": xff/********@localhost/pdb dumpfile=t_xifenfei.dmp TRANSFORM=DISABLE_ARCHIVE_LOGGING:y Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA. . imported "XFF"."T_XIFENFEI" 460.6 MB 3485408 rowsProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERJob "XFF"."SYS_IMPORT_FULL_01" successfully completed at Sat Apr 8 10:34:50 2017 elapsed 0 00:01:15[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 8 10:35:09 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 26Next log sequence to archive 28Current log sequence 28 |
这里可以看出来在force logging情况下,设置DISABLE_ARCHIVE_LOGGING参数不生效
从上述测试在不管是非归档还是归档情况下使用DISABLE_ARCHIVE_LOGGING都会减小导入时间,减少归档量,但是需要注意如果数据库是force logging情况下,DISABLE_ARCHIVE_LOGGING参数会无效。
- EXP-00104: datatype (BINARY_DOUBLE) 错误
- Data pump 中network_link参数的使用
- 给你的dmp文件(datapump)加上密码锁
- ORACLE 12C可以通过expdp导出view数据
- expdp中PARALLEL和DUMPFILE关系
- Data pump 中network_link参数的使用续(登录用户和源端用户不一致处理)
- ORACLE 12C 在datapump方面增强参数
- 关于ORACLE 11G密码大小写敏感猜想(USER$.SPARE4)
- 密码保护:dul实现expdp dump文件转换sqlldr格式
- expdp遭遇ORA-39006/ORA-39213故障解决
- ORACLE 12C RMAN recover table
- ARCn: Media recovery disabled原因分析
impdp中的DISABLE_ARCHIVE_LOGGING参数测试的更多相关文章
- expdp impdp中 exclude/include 的使用
exclude和include参数能够在使用expdp或impdp是对特定的对象或对象类型进行筛选或过滤.比如因工作的需要导出特定的表或不导出特定 的表.视图以及存储过程.索引.约束.授权统计信息等等 ...
- 转://oracle Wallet在expdp/impdp中使用场景
oracle Wallet的使用(即内部加密技术TDE(Transparent Data Encryption )) 1. TDE是Oracle10gR2中推出的一个新功能,使用时要保证Oracle版 ...
- Oracle expdp impdp中 exclude/include 的使用
exclude和include参数能够在使用expdp或impdp是对特定的对象或对象类型进行筛选或过滤.比如因工作的需要导出特定的表或不导出特定的表.视图以及存储过程.索引.约束.授权统计信息等等. ...
- zzw原创_expdp及impdp中的exclude及include参数的那点事
zzw原创:转载请注明出处 在oracle的expdp 及imdpd命令中,exclude及include参数还是有一些要注意的地方,特别是涉及选择性条件时. 一.通用 1.exclude及inclu ...
- ORA-01578和ORA-26040--NOLOGGING操作引起的坏块-错误解释和解决方案(文档ID 1623284.1)
ORA-01578和ORA-26040--NOLOGGING操作引起的坏块-错误解释和解决方案(文档ID 1623284.1) (一)NOLOGGING操作引起的坏块(ORA-01578和ORA-26 ...
- 使用datapump 导出导入同义词(export and import synonym using datapump)
对于同义词的备份我们有多种方式来实现,如直接通过脚本生成同义词的创建脚本,或者使用dbms_metadata.get_ddl来提取同义词的定义脚本.然而在使用传统的exp或是datapump expd ...
- ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1
博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...
- Oracle 数据库导入与出
Oracle 数据库导入与出 导出( EXPORT )是用 EXP 将数据库部分或全对象的结构和导出 . 导入( 导入( IMPORT )是用 )是用 IMP IMP将 OS 文件中的对象结构和数据装 ...
- 深入探索 JUnit 4
开始之前 关于本教程 引入 Java 5 注释为 JUnit 带来了显著改变,使它从一个受广大开发人员了解和喜爱的测试框架转变成了一个更为精简但却不那么为人熟知的框架.在本教程中,我将探讨 JUnit ...
随机推荐
- JS基础语法---(数据)简单类型和复杂类型
原始数据类型: number, string, boolean, undefined, null, object 基本类型(简单类型), 即值类型: number, string, boolean 复 ...
- php代码如何加域名授权?开源php项目如何保护版权 商业授权?
php在web开发领域是最热门的语言,也是开发项目的不二选择,许多PHP开发者说它是当今世界上最好的开发语言,php开发项目效率高,是因为开源项目太多了,不管是国内,还是国外,开源的框架,开源的CMS ...
- Saltstack_使用指南18_API
1. 主机规划 salt 版本 [root@salt100 ~]# salt --version salt (Oxygen) [root@salt100 ~]# salt-minion --versi ...
- MySql 字段分组拼接
drop table if exists T_Test; create table T_Test select 'A' parent, 'A1' child union all select 'A', ...
- 模版引擎Handlebars和Mustache
Handlebars是一款很高效的模版引擎,提供语意化的模版语句,最大的兼容Mustache模版引擎, 提供最大的Mustache模版引擎兼容, 无需学习新语法即可使用; 下面这个是基本的模版表达式, ...
- 201871010113-刘兴瑞《面向对象程序设计(java)》第七周学习总结
项目 内容 这个作业属于哪个课程 <任课教师博客主页链接> https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 <作业链接地址>htt ...
- LeetCode 5123. 字母组合迭代器 Iterator for Combination
地址 https://leetcode-cn.com/contest/biweekly-contest-15/problems/iterator-for-combination/ 题目描述请你设计一个 ...
- Scrum会议(第十一周)
十一周会议 1.任务分配: github相关代码 2.会议记录: 总结并阐述了自己在上周存在的问题以及解决了自己把自己的issue发在了自己的github,并没有把问题发在我们项目小组的项目的issu ...
- JAVA中int转String类型有三种方法
String.valueOf(i) Integer.toString(i) i+"" i+""也就是一个int型的常量.+上个空的字符串,这里牵涉到了strin ...
- vue 指令和修饰符
1. v-textv-text主要用来更新textContent,可以等同于JS的text属性. <spanv-text="msg"></span> 这两者 ...