--//12c以前,移动或者改名数据文件是一项比较麻烦的事情,至少要停一下业务.而12c支持在线移动或者改名数据文件,并且有点不可思议
--//的是这个操作可以在非归档模式下完成.链接有人问这个安全性的问题,链接http://www.itpub.net/thread-2106077-1-1.html,自己也测试看看.
--//没有在linux下安装12c,而且linux下有许多分析工具strace,gdb等等.windows下使用systeminternals的Procmon.exe跟踪看看,直接
--//跟踪tid。
1.环境:
[email protected]> @ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.2.0.1.0 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
2.建立测试环境:
CREATE TABLESPACE lfree DATAFILE
‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree01.dbf‘ SIZE 100M AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
[email protected]> select * from v$dbfile ;
FILE# NAME CON_ID
---------- ------------------------------------------------ ------
8 D:\APP\ORACLE\ORADATA\TEST\TEST01P\SYSTEM01.DBF 3
9 D:\APP\ORACLE\ORADATA\TEST\TEST01P\SYSAUX01.DBF 3
10 D:\APP\ORACLE\ORADATA\TEST\TEST01P\UNDOTBS01.DBF 3
11 D:\APP\ORACLE\ORADATA\TEST\TEST01P\USERS01.DBF 3
36 D:\APP\ORACLE\ORADATA\TEST\TEST01P\LFREE01.DBF 3
--//确定fule#=36
[email protected]> create table t tablespace lfree as select rownum id,‘test‘ name from dual connect by level<=100;
Table created.
3.建立一个存储过程:
--//以sys用户执行:
[email protected]> grant execute on dbms_lock to scott;
Grant succeeded.
--//再建立存储过程:
CREATE OR REPLACE PROCEDURE test_proc AS
BEGIN
FOR J IN 1..26 LOOP
FOR i IN 1..100 LOOP
update t set name=chr(64+j)||i where id=i;
COMMIT;
dbms_lock.sleep(0.1);
END LOOP;
END LOOP;
END;
/
Procedure created.
--//脚本执行至少需要26*100*0.1 = 260秒。
--//session 1:
[email protected]> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
88 30472 5628:2772 DEDICATED 6624 9 15 alter system kill session ‘88,30472‘ immediate;
--//记录下spid=6624,然后先输入命令注意先不要回车执行,执行Procmon.exe跟踪TID=6624:
[email protected]> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree01x.dbf‘;
--//sesson 2,执行如下,马上切换到session 1,执行以上命令:
[email protected]> exec test_proc
--//在procmon.exe 界面上选择过滤 path contains LFREE的条件:
"Time of Day","Process Name","PID","Operation","Path","Result","Detail","TID"
"21:35:46.2364632","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:27:37, ChangeTime: 2018/10/30 21:27:37, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.2366668","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:27:37, ChangeTime: 2018/10/30 21:27:37, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.2368618","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:27:37, ChangeTime: 2018/10/30 21:27:37, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.2370088","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:27:37, ChangeTime: 2018/10/30 21:27:37, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.2372062","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: Write Through, No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.2374521","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.2578635","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6624"
--//读旧数据文件头。
"21:35:46.2751434","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2753602","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2755355","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2758586","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a","6624"
"21:35:46.2761353","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2763101","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2764895","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2766853","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
"21:35:46.2768467","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME NOT FOUND","","6624"
--//检测文件是否存在。
"21:35:46.2770729","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Write, Read Attributes, Disposition: OpenIf, Options: No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created","6624"
"21:35:46.2776825","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.2778262","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.2780766","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.2782051","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.2784432","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.2786538","ORACLE.EXE","6808","DeviceIoControl","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","INVALID PARAMETER","Control: IOCTL_MOUNTDEV_QUERY_DEVICE_NAME","6624"
"21:35:46.2787145","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.2789604","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME INVALID","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a","6624"
"21:35:46.2888654","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 0, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6624"
---//写新数据文件的os块。Offset: 0, Length: 8,192
"21:35:46.2896819","ORACLE.EXE","6808","SetPositionInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Position: 104,865,792","6624"
"21:35:46.2897575","ORACLE.EXE","6808","QueryPositionInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Position: 104,865,792","6624"
"21:35:46.2898133","ORACLE.EXE","6808","SetEndOfFileInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","EndOfFile: 104,865,792","6624"
"21:35:46.3006965","ORACLE.EXE","6808","SetAllocationInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","AllocationSize: 104,865,792","6624"
--//分配空间。
"21:35:46.3008295","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3014917","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3018669","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3020677","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3022306","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3024618","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3026732","ORACLE.EXE","6808","QueryStandardInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","AllocationSize: 104,865,792, EndOfFile: 104,865,792, NumberOfLinks: 1, DeletePending: False, Directory: False","6624"
"21:35:46.3028325","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3029478","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3031436","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3032475","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3035123","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3037237","ORACLE.EXE","6808","DeviceIoControl","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","INVALID PARAMETER","Control: IOCTL_MOUNTDEV_QUERY_DEVICE_NAME","6624"
"21:35:46.3037738","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3039897","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","NAME INVALID","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a","6624"
"21:35:46.3117120","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 0, Length: 512, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:46.3120699","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3123072","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3124443","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3126726","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3128220","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.3130026","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3132067","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.3134501","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6624"
--//写新数据文件的块头。Offset: 8,192, Length: 8,192
"21:35:46.3151172","ORACLE.EXE","6808","FlushBuffersFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3157203","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.3159666","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","","6624"
"21:35:46.4123677","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.4124547","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.4125446","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.4126349","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","CreationTime: 2018/10/30 21:35:46, LastAccessTime: 2018/10/30 21:35:46, LastWriteTime: 2018/10/30 21:35:46, ChangeTime: 2018/10/30 21:35:46, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:46.4127380","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: Write Through, No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:46.4128751","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6624"
--//从这里开始以下偏移16,384,读1M,写1M。
"21:35:46.4364983","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 16,384, Length: 1,040,384, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:46.4421101","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 16,384, Length: 1,040,384, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
--//从这里开始偏移16,384+1,040,384=1056768,读1M,写1M。
"21:35:46.4494547","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 1,056,768, Length: 1,048,576, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:46.4729876","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 1,056,768, Length: 1,048,576, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
------------------------------------------------------------------
--//太长截断,奇怪Length: 1,048,576,难道中间过程写脏数据的情况吗?
------------------------------------------------------------------
"21:35:49.9299089","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 102,768,640, Length: 1,048,576, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:49.9365770","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 102,768,640, Length: 1,048,576, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
"21:35:49.9427614","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 103,817,216, Length: 1,048,576, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:49.9508470","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 103,817,216, Length: 1,048,576, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
--//再次出现写新数据文件的块头。Offset: 8,192, Length: 8,192,我估计这个跟以前测试rman的backup as copy一样。
--//参考链接:http://blog.itpub.net/267265/viewspace-2147540/ =>[20171121]rman backup as copy 2.txt
"21:35:49.9696618","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:49.9935072","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
--//再次出现写新数据文件的块头。Offset: 8,192, Length: 8,192,不过这个过程反过来,从新文件读,写旧数据文件。
"21:35:51.0114127","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE01X.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6624"
"21:35:51.0119214","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Offset: 8,192, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6624"
"21:35:51.0202771","ORACLE.EXE","6808","FlushBuffersFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","","6624"
"21:35:51.0220320","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","","6624"
"21:35:51.0223452","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","","6624"
"21:35:52.0700080","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:35:51, ChangeTime: 2018/10/30 21:35:51, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:52.0702186","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","CreationTime: 2018/10/30 21:24:16, LastAccessTime: 2018/10/30 21:24:16, LastWriteTime: 2018/10/30 21:35:51, ChangeTime: 2018/10/30 21:35:51, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6624"
"21:35:52.0703976","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened","6624"
"21:35:52.0705479","ORACLE.EXE","6808","QueryAttributeTagFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Attributes: A, ReparseTag: 0x0","6624"
"21:35:52.0706144","ORACLE.EXE","6808","SetDispositionInformationFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","Delete: True","6624"
--//删除旧文件,如果执行时没有keep参数。
"21:35:52.0707449","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE01.DBF","SUCCESS","","6624"
--//我看到都是读1M,写1M,并没有看到dml相关操作啊!!仔细思考明白过来,我执行的存储过程仅仅commit,并不一定触发脏数据写盘操作。
4.继续测试:
CREATE OR REPLACE PROCEDURE test_proc AS
BEGIN
FOR J IN 1..26 LOOP
FOR i IN 1..100 LOOP
update t set name=chr(64+j)||i where id=i;
COMMIT;
dbms_lock.sleep(0.1);
execute immediate ‘alter system flush buffer_cache‘;
--// execute immediate ‘alter system checkpoint‘;
END LOOP;
END LOOP;
END;
/
--//注意上面要执行execute immediate ‘alter system checkpoint‘;,必须显示授权,否者执行报错。
[email protected]> grant alter system to scott;
Grant succeeded.
--//重复前面的测试:
--//session 1,先输入命令注意先不要回车执行,执行Procmon.exe跟踪TID=6624:
[email protected]> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree02x.dbf‘;
--//sesson 2,执行如下,马上切换到session 1,执行以上命令:
[email protected]> exec test_proc
--//依旧不行。测试看到的结果与上面一样,难道是通过dbwr进程实现的。
5.继续测试:
[email protected]> select spid,pname from V$PROCESS where pname=‘DBW0‘ ;
SPID PNAME
-------------------- --------------------
6280 DBW0
--//跟踪spid = 6280看看。
--//重复前面的测试:
--//session 1,先输入命令注意先不要回车执行,执行Procmon.exe跟踪TID=6280:
[email protected]> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree05.dbf‘;
--//sesson 2,执行如下,马上切换到session 1,执行以上命令:
[email protected]> exec test_proc
--//在procmon.exe 界面上选择过滤 path contains LFREE的条件:
"Time of Day","Process Name","PID","Operation","Path","Result","Detail","TID"
"22:47:25.8836412","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
--//这样就对上了。
[email protected]> select rowid,t.* from t where rownum=1;
ROWID ID NAME
------------------ ---------- --------------------
AAAFl+AAkAAAACDAAA 1 D1
[email protected]> @ rowid AAAFl+AAkAAAACDAAA
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
22910 36 131 0 0x9000083 36,131 alter system dump datafile 36 block 131
[email protected]> select 8192*131 from dual ;
8192*131
----------
1073152
--//偏移在1073152dbw0写脏块。
"22:47:26.1317439","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:26.3033216","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:26.4949103","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:26.6944914","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:26.8921476","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:27.0585687","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:27.2483195","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:27.4866166","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:27.6899560","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:27.8798858","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:28.1655702","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:28.5559149","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
--//开始执行ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree05.dbf‘;
"22:47:28.5560114","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5561132","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5561973","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5563242","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5564153","ORACLE.EXE","6808","QueryStandardInformationFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","AllocationSize: 104,865,792, EndOfFile: 104,865,792, NumberOfLinks: 1, DeletePending: False, Directory: False","6280"
"22:47:28.5565208","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5566066","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5567417","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5568082","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5569322","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5570270","ORACLE.EXE","6808","DeviceIoControl","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","INVALID PARAMETER","Control: IOCTL_MOUNTDEV_QUERY_DEVICE_NAME","6280"
"22:47:28.5570545","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5571813","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","NAME INVALID","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a","6280"
"22:47:28.5621531","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 0, Length: 512, I/O Flags: Non-cached, Priority: Normal","6280"
"22:47:28.5624503","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5625928","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5626843","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5627857","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5628732","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5629881","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: Write Through, No Buffering, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5631269","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Generic Read/Write, Disposition: Open, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5633243","ORACLE.EXE","6808","QueryOpen","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","CreationTime: 2018/10/30 22:47:28, LastAccessTime: 2018/10/30 22:47:28, LastWriteTime: 2018/10/30 22:47:28, ChangeTime: 2018/10/30 22:47:28, AllocationSize: 104,865,792, EndOfFile: 104,865,792, FileAttributes: A","6280"
"22:47:28.5634225","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5634898","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5636109","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5636725","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5637890","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened","6280"
"22:47:28.5638699","ORACLE.EXE","6808","DeviceIoControl","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","INVALID PARAMETER","Control: IOCTL_MOUNTDEV_QUERY_DEVICE_NAME","6280"
"22:47:28.5638954","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","","6280"
"22:47:28.5640144","ORACLE.EXE","6808","CreateFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","NAME INVALID","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a","6280"
--//写数据文件os块。
"22:47:28.5686767","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 0, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6280"
"22:47:28.5690026","ORACLE.EXE","6808","ReadFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 0, Length: 8,192, I/O Flags: Non-cached, Priority: Normal","6280"
--//可以看出一些细节,先写新数据文件,在写旧数据文件。间隔0.1秒。
"22:47:30.4859339","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:30.4859819","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:31.4623837","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:31.4624679","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:33.1933155","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:33.1933573","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:33.6612641","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:33.6614131","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:34.2625288","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:34.2626437","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:34.7037038","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:34.7038352","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.0569077","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.0570132","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.3842675","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.3843631","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.7080824","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.7081653","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.8961936","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:35.8962799","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.0512627","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.0513522","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.2413785","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.2414672","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.3961598","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.3962423","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.5580874","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.5581325","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.6095170","ORACLE.EXE","6808","FlushBuffersFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","","6280"
"22:47:36.6107383","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","","6280"
"22:47:36.6108529","ORACLE.EXE","6808","CloseFile","D:\app\oracle\oradata\test\test01p\LFREE04X.DBF","SUCCESS","","6280"
--//这里关闭旧数据文件,删除操作tid=6624完成,业务继续,这时仅仅修改新数据文件D:\app\oracle\oradata\test\test01p\LFREE05X.DBF。
"22:47:36.7366151","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:36.9199684","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:37.0837297","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:37.2505211","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
"22:47:37.4077499","ORACLE.EXE","6808","WriteFile","D:\app\oracle\oradata\test\test01p\LFREE05X.DBF","SUCCESS","Offset: 1,073,152, Length: 8,192, I/O Flags: Non-cached, Write Through, Priority: Normal","6280"
总结:
--//还是基本概念不清楚,实际上了解脏块写盘由dbwr进程完成,就没有必要走这么一堆弯路了。
原文地址:https://www.cnblogs.com/lfree/p/9880333.html