-
设置跟踪
-
strace -Tttfv -s 8192 -o /tmp/stace.out rman target /
-
执行 backup current controlfile; 进行测试
-
-
tail -f stace.out |grep AM_1618_3044626670.lck
-
-
5986 09:03:55.637519 open("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", O_RDWR|O_CREAT, 0660) = 8 <0.000034>
-
5986 09:03:55.637595 chown("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", -1, 1001) = 0 <0.000312>
-
5986 09:03:55.637960 stat("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", {st_dev=makedev(253, 0), st_ino=1644167245, st_mode=S_IFREG|0640, st_nlink=1, st_uid=1001, st_gid=1001, st_blksize=4096, st_blocks=0, st_size=0, st_atime=2021/11/16-09:02:20.216553937, st_mtime=2021/11/15-14:17:43.345324599, st_ctime=2021/11/16-09:03:55.636559726}) = 0 <0.000021>
-
5986 09:03:55.638044 chmod("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", 0640) = 0 <0.000042>
-
5986 09:03:57.851216 open("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", O_RDWR|O_CREAT, 0660) = 8 <0.000029>
-
5986 09:03:57.851289 chown("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", -1, 1001) = 0 <0.000042>
-
5986 09:03:57.851422 stat("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", {st_dev=makedev(253, 0), st_ino=1644167245, st_mode=S_IFREG|0640, st_nlink=1, st_uid=1001, st_gid=1001, st_blksize=4096, st_blocks=0, st_size=0, st_atime=2021/11/16-09:02:20.216553937, st_mtime=2021/11/15-14:17:43.345324599, st_ctime=2021/11/16-09:03:57.850559860}) = 0 <0.000020>
-
5986 09:03:57.851513 chmod("/u01/app/diag/rdbms/orcl/orcl/lck/AM_1618_3044626670.lck", 0640) = 0 <0.000027>
-
对这个文件又是打开、又是修改属主、又是看状态
-
-
strace tail -f AM_1618_3044626670.lck 同时跟踪这个lck文件可以看到备份期间至少5次读取
-
read(4, "\1\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0", 39) = 16
-
read(4, "\1\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0", 39) = 16
-
read(4, "\1\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0", 39) = 16
-
read(4, "\1\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0", 39) = 16
-
read(4,
MOS提示尝试对AM_1618_3044626670.lck改名这样的回避方法应该不管用,RMAN备份时会自动生成一个同名新文件。
解决方法是设置 alter system set event='logon trace name krb_options level 20' scope=spfile;重启实例
原理:RMAN在备份过程中不再往ADR诊断信息里面追加写入信息,对RMAN的操作没有影响。
-
-
再深入看一看
-
-
SQL> oradebug doc component krb
-
-
KRB Kernel Backup Restore (krb)
-
KRB_THREAD KRBBPC Thread Switches ((null))
-
KRB_IO KRB I/O ((null))
-
KRB_INCR KRB Incremental Restore ((null))
-
KRB_PERF KRB Performance Tracing ((null))
-
KRB_BPOUTPUT Detailed Backup Piece Output ((null))
-
KRB_BPVAL Detailed Block List During Restore Validate ((null))
-
KRB_FLWRES Details on Restore Flow ((null))
-
KRB_FLWCPY Details on krbydd Flow ((null))
-
KRB_FLWBCK Details on Backup Flow ((null))
-
KRB_FLWUSAGE RMAN Feature Usage ((null))
-
KRB_OPTIM Unused Space Compression ((null))
-
-
col PROGRAM for a30
-
col module for a30
-
select sid,paddr,program,module from v$session where program like 'rman%';
-
select spid from v$process where addr in (select paddr from v$session where program like 'rman%');
-
9015
-
9080
-
9082
-
-
oradebug setospid 9015
-
oradebug dump krb_options 16
-
oradebug tracefile_name
-
-
***第一个rman进程**********
-
*** 2021-11-16T09:35:10.447846+08:00
-
Received ORADEBUG command (#5) 'dump krb_options 16' from process '9492'
-
2021-11-16 09:35:10.449*:KRB:krb.c@1195:krbtpv(): Current KRB flags set for session
-
2021-11-16 09:35:10.450*:KRB:krb.c@1197:krbtpv(): ==============================================
-
-
2021-11-16 09:35:10.450*:KRB:krb.c@1200:krbtpv(): krbcsi=0, krbcss=0, krbcsr=0, krbcso=0
-
2021-11-16 09:35:10.451*:KRB:krb.c@1202:krbtpv(): krbpfn=0, krbpfl=0x8000
-
2021-11-16 09:35:10.452*:KRB:krb.c@1205:krbtpv(): krbdsd=(nil), krbbxp=(nil), krbrxp=(nil), krbnas=0
-
2021-11-16 09:35:10.452*:KRB:krb.c@1207:krbtpv(): krbbsbct=0, krbovac=0
-
2021-11-16 09:35:10.453*:KRB:krb.c@1211:krbtpv(): krbubsphi=0, krbubsphr=0, krbubspbi=0, krbubspbr=0
-
2021-11-16 09:35:10.453*:KRB:krb.c@1214:krbtpv(): krbubbsbi=0, krbubbsbs=0, krbubfl=0x0
-
2021-11-16 09:35:10.454*:KRB:krb.c@1216:krbtpv(): ==============================================
-
-
-
*** 2021-11-16T09:35:10.455314+08:00
-
Finished processing ORADEBUG command (#5) 'dump krb_options 16'
-
-
***第二个rman进程**********
-
-
Received ORADEBUG command (#1) 'dump krb_options 65536' from process '9771'
-
2021-11-16 09:39:38.901*:KRB:krb.c@1195:krbtpv(): Current KRB flags set for session
-
2021-11-16 09:39:38.902*:KRB:krb.c@1197:krbtpv(): ===============================================
-
-
2021-11-16 09:39:38.902*:KRB:krb.c@1200:krbtpv(): krbcsi=0, krbcss=0, krbcsr=0, krbcso=0
-
2021-11-16 09:39:38.902*:KRB:krb.c@1202:krbtpv(): krbpfn=0, krbpfl=0xff38
-
2021-11-16 09:39:38.903*:KRB:krb.c@1205:krbtpv(): krbdsd=(nil), krbbxp=(nil), krbrxp=(nil), krbnas=0
-
2021-11-16 09:39:38.903*:KRB:krb.c@1207:krbtpv(): krbbsbct=0, krbovac=0
-
2021-11-16 09:39:38.904*:KRB:krb.c@1211:krbtpv(): krbubsphi=0, krbubsphr=0, krbubspbi=0, krbubspbr=0
-
2021-11-16 09:39:38.904*:KRB:krb.c@1214:krbtpv(): krbubbsbi=0, krbubbsbs=0, krbubfl=0x0
-
2021-11-16 09:39:38.904*:KRB:krb.c@1216:krbtpv(): ==============================================
-
-
-
*** 2021-11-16T09:39:38.905854+08:00
-
Finished processing ORADEBUG command (#1) 'dump krb_options 65536'
-
-
**第三个rman进程*************
-
Received ORADEBUG command (#1) 'dump krb_options 4' from process '9889'
-
2021-11-16 09:40:44.797*:KRB:krb.c@1195:krbtpv(): Current KRB flags set for session
-
2021-11-16 09:40:44.798*:KRB:krb.c@1197:krbtpv(): ===============================================
-
-
2021-11-16 09:40:44.798*:KRB:krb.c@1200:krbtpv(): krbcsi=0, krbcss=0, krbcsr=0, krbcso=0
-
2021-11-16 09:40:44.798*:KRB:krb.c@1202:krbtpv(): krbpfn=0, krbpfl=0x8
-
2021-11-16 09:40:44.799*:KRB:krb.c@1205:krbtpv(): krbdsd=0x7f84d710fb68, krbbxp=(nil), krbrxp=(nil),
-
krbnas=0
-
2021-11-16 09:40:44.799*:KRB:krb.c@1207:krbtpv(): krbbsbct=0, krbovac=0
-
2021-11-16 09:40:44.799*:KRB:krb.c@1211:krbtpv(): krbubsphi=0, krbubsphr=0, krbubspbi=0, krbubspbr=0
-
2021-11-16 09:40:44.799*:KRB:krb.c@1214:krbtpv(): krbubbsbi=0, krbubbsbs=0, krbubfl=0x0
-
2021-11-16 09:40:44.800*:KRB:krb.c@1216:krbtpv(): ================================================
-
暂时看不出来哪个选项与adr有关。