第1行到第22行的内容为控制文件的头信息,这部分内容的解释参见《转储控制文件头》。
控制文件头
1. Dump file e:\oracle\admin\test\udump\test_ora_376.trc
2. Fri May 14 15:09:52 2004
3. ORACLE V9.2.0.1.0 - Production vsnsta=0
4. vsnsql=12 vsnxtr=3
5. Windows 2000 Version 5.0 Service Pack 4, CPU type 586
6. Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
7. With the Partitioning, OLAP and Oracle Data Mining options
8. JServer Release 9.2.0.1.0 - Production
9. Windows 2000 Version 5.0 Service Pack 4, CPU type 586
10. Instance name: test
11. Redo thread mounted by this instance: 1
12. Oracle process number: 13
13. Windows thread id: 376, image: ORACLE.EXE
14. *** 2004-05-14 15:09:52.000
15. *** SESSION ID:(10.21) 2004-05-14 15:09:52.000
16. DUMP OF CONTROL FILES, Seq # 2929 = 0xb71
=======第17行到第22行为通用文件头========
17.FILE HEADER:
18. Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
19. Db ID=1750352942=0x6854442e, Db Name=TEST1
20. Activation ID=0=0x0
21. Control Seq=2929=0xb71, File size=228=0xe4
22. File Number=0, Blksiz=8192, File Type=1 CONTROL
**************************控制文件头信息结束****************************
数据库项
23.**********************************************************************
24.DATABASE ENTRY
25.**********************************************************************
26. (blkno = 0x1, size = 192, max = 1, in-use = 1, last-recid= 0)
blkno
size指出数据库项的字节数,本例中为192byte;
max指出最大的块
in-use当前正在使用的块
last-recid
27. DF Version: creation=0x9200000 compatible=0x8000000, Date 07/13/2003 14:30:51
数据文件的版本是9.2.0,兼容版本是8.0
28. DB Name "TEST1"
数据库名为"TEST1"
29. Database flags = 0x00404001
30. Controlfile Creation Timestamp 07/13/2003 14:30:52
控制文件的创建时间
31. Incmplt recovery scn: 0x0000.00000000
如果数据库进行过不完全回复,我们可以看出
32. Resetlogs scn: 0x0000.04ada796 Resetlogs Timestamp 07/13/2003 14:34:39
启用Resetlogs时的scn值和时戳,
33. Prior resetlogs scn: 0x0000.04a0b855 Prior resetlogs Timestamp 04/11/2003 09:59:18
启用Resetlogs之前的scn值和时戳
Oracle不能够应用Resetlogs之前的重做日志(redo log file)。
34. Redo Version: creation=0x9200000 compatable=0x9200000
重做日志文件的版本是9.2.0,兼容版本是8.0
35. #Data files = 12, #Online files = 12
数据库总共有12个数据文件,并且这12个文件全部处在联机(online)状态
36. Database checkpoint: Thread=1 scn: 0x0000.04b9d858
37. Threads: #Enabled=1, #Open=1, Head=1, Tail=1
当前启用了一个线程,当然,也仅仅打开了这一个线程
38. enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
39. Max log members = 3, Max data members = 1
数据库允许每个日志组最多有3个log member;
Oracle目前还不支持数据文件的多路复用,因此,Max data members的值为1,这个条目是为以后的版本升级而预留的。
40. Arch list: Head=3, Tail=3, Force scn: 0x0000.04b93016scn: 0x0000.04b9d857
请注意Force scn,凡是开始scn小于Force scn的重做都被归档。强制scn是所有重做都被归档的scn。
41. Controlfile Checkpointed at scn: 0x0000.04b9d85a 05/14/2004 08:37:00
当前控制文件Checkpointed时的scn为0x0000.04b9d85a???
42. thread:0 rba:(0x0.0.0)
43. enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
检查点进度记录(该项从Oracle8开始引入)
44.**********************************************************************
45.CHECKPOINT PROGRESS RECORDS
46. **********************************************************************
检查点进度记录这个条目是从Oracle 8开始出现在控制文件中的。该项目主要用来记录缓冲区高速缓存的状态,每个记录占用控制文件的一个块。
47. (blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)
48. THREAD #1 - status:0x2 flags:0x0 dirty:15
线程信息,
49. low cache rba:(0x20.1f0.0) on disk rba:(0x20.204.0)
低速缓存rba(recovery block address)指出了在实例回复或者崩溃恢复中,需要恢复的重做开始值(即,重做日志文件中的一个块地址);
on disk rba是磁盘上的最高的重做值,在进行实力恢复应用重做的时候必须达到这个值。如果on disk rba
50. on disk scn: 0x0000.04b9f6e2 05/14/2004 15:06:42
on disk scn是on disk rba处的scn值
51. resetlogs scn: 0x0000.04ada796 07/13/2003 14:34:39
启用Resetlogs时的scn值和时戳,和数据库项中的相应条目是一致的
52. heartbeat: 526099342 mount id: 903127902
53. MTTR statistics status: 3
54. Init time: Avg: 23012858, Times measured: 3
55. File open time: Avg: 123550, Times measured: 43
56. Log block read time: Avg: 182, Times measured: 32758
57. Data block handling time: Avg: 22934, Times measured: 135
扩展的数据库项(该项从Oracle9i开始引入)
58. ***********************************************************************
59. EXTENDED DATABASE ENTRY
60. ***********************************************************************
61. (blkno = 0x71, size = 276, max = 1, in-use = 1, last-recid= 0)
62. Control AutoBackup date(dd/mm/yyyy)=13/ 7/2003
63. Next AutoBackup sequence= 0
重做线程项
64.**********************************************************************
65.REDO THREAD RECORDS
66.**********************************************************************
67. (blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)
68. THREAD #1 - status:0xf thread links forward:0 back:0
69. #logs:4 first:1 last:4 current:3 last used seq#:0x20
这个条目说明数据库中总共有4个日志文件组,第一个组为log #1(log group 1);最后一个组为log #4(log group 4),当前正在使用的是log #3(log group 3)
70. enabled at scn: 0x0000.04ada796 07/13/2003 14:34:39
启用线程1时的scn值
71. disabled at scn: 0x0000.00000000 01/01/1988 00:00:00
禁用线程1时的scn值,因为该线程目前处于打开状态,所以该值为无穷大
72. opened at 05/14/2004 08:36:59 by instance test
打开线程的时戳,当前线程以及被哪个实例打开
73. Checkpointed at scn: 0x0000.04b9d858 05/14/2004 08:36:59
74. thread:1 rba:(0x20.2.10)
75. enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
76. 00000000 00000000
77. log history: 31
日志文件项
78.**********************************************************************
79.LOG FILE RECORDS
80.**********************************************************************
81. (blkno = 0x5, size = 72, max = 5, in-use = 4, last-recid= 4)
82.LOG FILE #1:
83. (name #5) E:\ORACLE\ORA92\TEST\REDO01.LOG
84. Thread 1 redo log links: forward: 2 backward: 0
LOG FILE #1写满后,会切换到forward: 2,即切换到LOG FILE #2,这一点可以通过LOG FILE #1的Next scn: 0x0000.04b9870a等于LOG FILE #2的Low scn: 0x0000.04b9870a
85. siz: 0xf000 seq: 0x0000001e hws: 0x6 bsz: 512 nab: 0x15b flg: 0x1 dup: 1
nab是日志文件中LGWR可用的下一个数据块的地址,如果这个值是无穷大,说明这个日志文件是当前(LGWR正在写入)的日志文件
86. Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.04b8b9ad
87. Low scn: 0x0000.04b93016 05/13/2004 16:31:24
日志发生切换时会分配一个低scn和一个高scn,低scn就是上一个日志的高scn的值,而高scn则设置为无穷大,直到切换到下一个日志文件时,再将当前日志的高scn设置为下一个日志文件的低scn,将下一个日志文件的高scn设置为无穷大。
88. Next scn: 0x0000.04b9870a 05/13/2004 19:43:45
日志发生切换后,高scn就从无穷大该为Next scn(下一个scn)的值,该值将作为切换后的日志文件的低scn
89.LOG FILE #2:
90. (name #4) E:\ORACLE\ORA92\TEST\REDO02.LOG
91. Thread 1 redo log links: forward: 3 backward: 1
92. siz: 0xf000 seq: 0x0000001f hws: 0x5 bsz: 512 nab: 0x133 flg: 0x1 dup: 1
93. Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.04b93016
94. Low scn: 0x0000.04b9870a 05/13/2004 19:43:45
95. Next scn: 0x0000.04b9d857 05/14/2004 08:36:59
96.LOG FILE #3:
97. (name #3) E:\ORACLE\ORA92\TEST\REDO03.LOG
98. Thread 1 redo log links: forward: 4 backward: 2
99. siz: 0xf000 seq: 0x00000020 hws: 0x2 bsz: 512 nab: 0xffffffff flg: 0x8 dup: 1
100.Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.04b9870a
101.Low scn: 0x0000.04b9d857 05/14/2004 08:36:59
102.Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
说明,LOG FILE #3是当前日志文件(LGWR正在写入的日志文件)
103. LOG FILE #4:
104.(name #1) E:\ORACLE\ORA92\TEST\REDO04A.LOG
105.(name #2) E:\ORACLE\ORA92\TEST\REDO04B.LOG
106.Thread 1 redo log links: forward: 0 backward: 3
107.siz: 0x800 seq: 0x0000001d hws: 0xa bsz: 512 nab: 0x427 flg: 0x1 dup: 2
108.Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.04b854e4
109.Low scn: 0x0000.04b8b9ad 05/11/2004 14:27:28
110.Next scn: 0x0000.04b93016 05/13/2004 16:31:24
数据文件项
111. ******************************************************************
112. DATA FILE RECORDS
113. ******************************************************************
114.(blkno = 0x6, size = 180, max = 100, in-use = 14, last-recid= 41)
115. DATA FILE #1:
116.(name #17) E:\ORACLE\ORA92\TEST\SYSTEM01.DBF
117.creation size=0 block size=8192 status=0xe head=17 tail=17 dup=1
118.tablespace 0, index=1 krfil=1 prev_file=0
说明是系统表空间
119.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
120.Checkpoint cnt:701 scn: 0x0000.04b9d858 05/14/2004 08:36:59
对该文件执行检查点的次数为701(文件处于热备状态时,如果发生了检查点,检查点计数器(Checkpoint cnt)也还是加一);
121.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
结束scn(Stop scn)是数据文件的最后一个scn(数据库正常关闭时会设置这个值),数据库正常打开的状态,该值为无穷大。数据库恢复时要求恢复到Stop scn。
122.Creation Checkpointed at scn: 0x0000.00000014 01/13/2002 22:01:17
当时用“alter database create datafile”命令恢复数据文件时(该命令从Oracle7开始引入),需要依据文件创建时的检查点scn(Creation Checkpointed at scn)。
123.thread:0 rba:(0x0.0.0)
124.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
125. Offline scn: 0x0000.04ada795 prev_range: 0
当文件脱机时,文件脱机时的scn作为脱机scn保存在控制文件中
126.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
当文件联机时,文件联机时的检查点scn作为联机scn保存在控制文件中
由于系统表空间的数据文件永远不能脱机,所以系统数据文件的脱机scn应该为0x0000.00000000
猜想,这里的Offline scn表示数据库上一次正常关闭时数据文件的检查点scn;
这里的Online Checkpointed at scn表示数据库本次打开时的数据文件的检查点scn
127.thread:1 rba:(0x1.2.0)
128.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
129.Hot Backup end marker scn: 0x0000.00000000
热备时的scn
130.aux_file is NOT DEFINED
131. DATA FILE #2:
132.(name #16) E:\ORACLE\ORA92\TEST\UNDOTBS01.DBF
133.creation size=0 block size=8192 status=0xe head=16 tail=16 dup=1
134.tablespace 1, index=2 krfil=2 prev_file=0
135.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
136.Checkpoint cnt:640 scn: 0x0000.04b9d858 05/14/2004 08:36:59
137.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
138.Creation Checkpointed at scn: 0x0000.0002f401 01/14/2002 22:24:49
139.thread:0 rba:(0x0.0.0)
140.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
141.00000000 00000000
142.Offline scn: 0x0000.04ada795 prev_range: 0
143.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
144.thread:1 rba:(0x1.2.0)
145.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
146.00000000 00000000
147.Hot Backup end marker scn: 0x0000.00000000
148.aux_file is NOT DEFINED
149. DATA FILE #3:
150.(name #15) E:\ORACLE\ORA92\TEST\DRSYS01.DBF
151.creation size=0 block size=8192 status=0xe head=15 tail=15 dup=1
152.tablespace 3, index=3 krfil=3 prev_file=0
153.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
154.Checkpoint cnt:699 scn: 0x0000.04b9d858 05/14/2004 08:36:59
155.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
156.Creation Checkpointed at scn: 0x0000.00001882 01/13/2002 22:02:52
157.thread:0 rba:(0x0.0.0)
158.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
159.00000000 00000000
160.Offline scn: 0x0000.04ada795 prev_range: 0
161.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
162.thread:1 rba:(0x1.2.0)
163.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
164.00000000 00000000
165.Hot Backup end marker scn: 0x0000.00000000
166.aux_file is NOT DEFINED
167. DATA FILE #4:
168.(name #14) E:\ORACLE\ORA92\TEST\INDX01.DBF
169.creation size=0 block size=8192 status=0xe head=14 tail=14 dup=1
170.tablespace 4, index=4 krfil=4 prev_file=0
171.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
172.Checkpoint cnt:699 scn: 0x0000.04b9d858 05/14/2004 08:36:59
173.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
174.Creation Checkpointed at scn: 0x0000.00001895 01/13/2002 22:02:58
175.thread:0 rba:(0x0.0.0)
176.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
177.00000000 00000000
178.Offline scn: 0x0000.04ada795 prev_range: 0
179.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
180.thread:1 rba:(0x1.2.0)
181.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
182.00000000 00000000
183.Hot Backup end marker scn: 0x0000.00000000
184.aux_file is NOT DEFINED
185. DATA FILE #5:
186.(name #13) E:\ORACLE\ORA92\TEST\TOOLS01.DBF
187.creation size=0 block size=8192 status=0xe head=13 tail=13 dup=1
188.tablespace 5, index=5 krfil=5 prev_file=0
189.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
190.Checkpoint cnt:699 scn: 0x0000.04b9d858 05/14/2004 08:36:59
191.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
192.Creation Checkpointed at scn: 0x0000.000018a6 01/13/2002 22:03:03
193.thread:0 rba:(0x0.0.0)
194.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
195.00000000 00000000
196.Offline scn: 0x0000.04ada795 prev_range: 0
197.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
198.thread:1 rba:(0x1.2.0)
199.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
200.00000000 00000000
201.Hot Backup end marker scn: 0x0000.00000000
202.aux_file is NOT DEFINED
203. DATA FILE #6:
204.(name #12) E:\ORACLE\ORA92\TEST\USERS01.DBF
205.creation size=0 block size=8192 status=0xe head=12 tail=12 dup=1
206.tablespace 6, index=6 krfil=6 prev_file=0
207.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
208.Checkpoint cnt:702 scn: 0x0000.04b9d858 05/14/2004 08:36:59
209.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
210.Creation Checkpointed at scn: 0x0000.000018b7 01/13/2002 22:03:09
211.thread:0 rba:(0x0.0.0)
212.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
213.00000000 00000000
214.Offline scn: 0x0000.04ada795 prev_range: 0
215.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
216.thread:1 rba:(0x1.2.0)
217.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
218.00000000 00000000
219.Hot Backup end marker scn: 0x0000.00000000
220.aux_file is NOT DEFINED
221. DATA FILE #7:
222.(name #11) E:\ORACLE\ORA92\TEST\XDB01.DBF
223.creation size=0 block size=8192 status=0xe head=11 tail=11 dup=1
224.tablespace 7, index=7 krfil=7 prev_file=0
225.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
226.Checkpoint cnt:698 scn: 0x0000.04b9d858 05/14/2004 08:36:59
227.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
228.Creation Checkpointed at scn: 0x0000.000018cc 01/13/2002 22:03:18
229.thread:0 rba:(0x0.0.0)
230.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
231.00000000 00000000
232.Offline scn: 0x0000.04ada795 prev_range: 0
233.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
234.thread:1 rba:(0x1.2.0)
235.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
236.00000000 00000000
237.Hot Backup end marker scn: 0x0000.00000000
238.aux_file is NOT DEFINED
239. DATA FILE #8:
240.(name #10) E:\ORACLE\ORA92\TEST\TEST01.DBF
241.creation size=0 block size=8192 status=0xe head=10 tail=10 dup=1
242.tablespace 11, index=8 krfil=8 prev_file=0
243.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
244.Checkpoint cnt:356 scn: 0x0000.04b9d858 05/14/2004 08:36:59
245.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
246.Creation Checkpointed at scn: 0x0000.0011a40e 02/06/2003 16:25:09
247.thread:0 rba:(0x0.0.0)
248.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
249.00000000 00000000
250.Offline scn: 0x0000.04ada795 prev_range: 0
251.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
252.thread:1 rba:(0x1.2.0)
253.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
254.00000000 00000000
255.Hot Backup end marker scn: 0x0000.00000000
256.aux_file is NOT DEFINED
257. DATA FILE #9:
258.(name #9) E:\ORACLE\ORA92\TEST\RMAN01.DBF
259.creation size=0 block size=8192 status=0xe head=9 tail=9 dup=1
260.tablespace 9, index=9 krfil=9 prev_file=0
261.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
262.Checkpoint cnt:576 scn: 0x0000.04b9d858 05/14/2004 08:36:59
263.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
264.Creation Checkpointed at scn: 0x0000.0009f9ce 01/24/2002 17:23:42
265.thread:0 rba:(0x0.0.0)
266.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
267.00000000 00000000
268.Offline scn: 0x0000.04ada795 prev_range: 0
269.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
270.thread:1 rba:(0x1.2.0)
271.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
272.00000000 00000000
273.Hot Backup end marker scn: 0x0000.00000000
274.aux_file is NOT DEFINED
275. DATA FILE #10:
276.(name #8) E:\ORACLE\ORA92\TEST\PERFSTAT01.DBF
277.creation size=0 block size=8192 status=0xe head=8 tail=8 dup=1
278.tablespace 12, index=10 krfil=10 prev_file=0
279.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
280.Checkpoint cnt:253 scn: 0x0000.04b9d858 05/14/2004 08:36:59
281.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
282.Creation Checkpointed at scn: 0x0000.00199caf 03/03/2003 19:55:07
283.thread:0 rba:(0x0.0.0)
284.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
285.00000000 00000000
286.Offline scn: 0x0000.04ada795 prev_range: 0
287.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
288.thread:1 rba:(0x1.2.0)
289.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
290.00000000 00000000
291.Hot Backup end marker scn: 0x0000.00000000
292.aux_file is NOT DEFINED
293. DATA FILE #11:
294.(name #7) E:\ORACLE\ORA92\TEST\UNDOTBS02.DBF
295.creation size=0 block size=8192 status=0xe head=7 tail=7 dup=1
296.tablespace 8, index=11 krfil=11 prev_file=0
297.unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
298.Checkpoint cnt:237 scn: 0x0000.04b9d858 05/14/2004 08:36:59
299.Stop scn: 0xffff.ffffffff 05/13/2004 20:18:03
300.Creation Checkpointed at scn: 0x0000.049f6bf8 03/27/2003 09:48:22
301.thread:0 rba:(0x0.0.0)
302.enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
303.00000000 00000000
304.Offline scn: 0x0000.04ada795 prev_range: 0
305.Online Checkpointed at scn: 0x0000.04ada796 07/13/2003 14:34:39
306.thread:1 rba:(0x1.2.0)
307.enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
308.00000000 00000000
309.Hot Backup end marker scn: 0x0000.00000000
310.aux_file is NOT DEFINED