ITPub博客

首页 > 数据库 > Oracle > impdp导入时使用table_exists_action参数的区别

impdp导入时使用table_exists_action参数的区别

原创 Oracle 作者:charsi 时间:2016-07-23 12:27:10 0 删除 编辑
使用impdp导入数据到数据库时,时常会遇到使用table_exists_action参数的情况。

跟踪看了下table_exists_action参数为truncate和replace两种方式的trc内容

table_exists_action=replace情况
=====================
PARSING IN CURSOR #140076972679984 len=51 dep=2 uid=0 oct=12 lid=0 tim=1469246954600779 hv=858343256 ad='7f66363ef138' sqlid='fnzu4actkkjus'
DROP TABLE "GAOK"."T_EXP" CASCADE CONSTRAINTS PURGE
END OF STMT
PARSE #140076972679984:c=0,e=123,p=0,cr=0,cu=0,mis=1,r=0,dep=2,og=3,plh=0,tim=1469246954600779
BINDS #140076973737592:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=00 fl2=0001 frm=00 csi=00 siz=80 off=0
  kxsbbbfp=7f663632af38  bln=22  avl=01  flg=05
  value=0
 Bind#1
 
即
table_exists_action设置为replace时,数据库会首先将表drop purge掉,然后将数据导入

table_exists_action=truncate情况
EXEC #140067810958928:c=0,e=30,p=0,cr=0,cu=0,mis=0,r=0,dep=3,og=3,plh=2570921597,tim=1469247480865330
FETCH #140067810958928:c=0,e=6,p=0,cr=2,cu=0,mis=0,r=0,dep=3,og=3,plh=2570921597,tim=1469247480865341
CLOSE #140067810958928:c=0,e=0,dep=3,type=3,tim=1469247480865349
=====================
PARSING IN CURSOR #140067812401840 len=61 dep=2 uid=0 oct=85 lid=0 tim=1469247480865398 hv=3483539098 ad='8a543c38' sqlid='bmt13wz7u55nu'
TRUNCATE TABLE "GAOK"."T_EXP" PURGE SNAPSHOT LOG DROP STORAGE
END OF STMT
PARSE #140067812401840:c=4000,e=3595,p=0,cr=42,cu=0,mis=1,r=0,dep=2,og=3,plh=1416587587,tim=1469247480865398
BINDS #140067815343736:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=00 fl2=0001 frm=00 csi=00 siz=80 off=0
  kxsbbbfp=7f6414534308  bln=22  avl=01  flg=05
  value=0
 Bind#1

即table_exists_action设置为truncate时,数据库会首先将表truncate掉,然后将数据导入

跟踪时使用的是10046事件跟踪,trace文件在dbw0的进程trc中。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23850820/viewspace-2122419/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle中的锁类型
请登录后发表评论 登录
全部评论

注册时间:2010-05-04

  • 博文量
    96
  • 访问量
    406715