[20181031]12c 在線移動數據文件.txt
[20181031]12c 在線移動數據文件.txt
--//12c以前,移動或者改名數據文件是一項比較麻煩的事情,至少要停一下業務.而12c支持在線移動或者改名數據文件,並且有點不可思議
--//的是這個操作可以在非歸檔模式下完成.鏈接有人問這個安全性的問題,鏈接http://www.itpub.net/thread-2106077-1-1.html,自己也測試看看.
--//沒有在linux下安裝12c,而且linux下有許多分析工具strace,gdb等等.windows下使用systeminternals的Procmon.exe跟蹤看看,直接
--//跟蹤tid。
1.環境:
SCOTT@test01p> @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;
SCOTT@test01p> 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
SCOTT@test01p> create table t tablespace lfree as select rownum id,‘test‘ name from dual connect by level<=100;
Table created.
3.建立一個存儲過程:
--//以sys用戶執行:
SYS@test01p> 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:
SCOTT@test01p> @ 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:
SCOTT@test01p> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree01x.dbf‘;
--//sesson 2,執行如下,馬上切換到session 1,執行以上命令:
SCOTT@test01p> 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‘;,必須顯示授權,否者執行報錯。
SYS@test01p> grant alter system to scott;
Grant succeeded.
--//重復前面的測試:
--//session 1,先輸入命令註意先不要回車執行,執行Procmon.exe跟蹤TID=6624:
SCOTT@test01p> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree02x.dbf‘;
--//sesson 2,執行如下,馬上切換到session 1,執行以上命令:
SCOTT@test01p> exec test_proc
--//依舊不行。測試看到的結果與上面一樣,難道是通過dbwr進程實現的。
5.繼續測試:
SCOTT@test01p> select spid,pname from V$PROCESS where pname=‘DBW0‘ ;
SPID PNAME
-------------------- --------------------
6280 DBW0
--//跟蹤spid = 6280看看。
--//重復前面的測試:
--//session 1,先輸入命令註意先不要回車執行,執行Procmon.exe跟蹤TID=6280:
SCOTT@test01p> ALTER DATABASE MOVE DATAFILE 36 TO ‘D:\APP\ORACLE\ORADATA\TEST\TEST01P\lfree05.dbf‘;
--//sesson 2,執行如下,馬上切換到session 1,執行以上命令:
SCOTT@test01p> 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"
--//這樣就對上了。
SCOTT@test01p> select rowid,t.* from t where rownum=1;
ROWID ID NAME
------------------ ---------- --------------------
AAAFl+AAkAAAACDAAA 1 D1
SCOTT@test01p> @ 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
SCOTT@test01p> 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進程完成,就沒有必要走這麽一堆彎路了。
[20181031]12c 在線移動數據文件.txt