alter system dump datafile header

tolilong發表於2015-09-21

SQL> alter system dump datafile 6 block min 1 block max 8;

System altered.

只能顯示部分資訊:
############################################
Start dump data blocks tsn: 4 file#: 6 minblk 1 maxblk 8
Block 1 (file header) not dumped: use dump file header command
buffer tsn: 4 rdba: 0x01800002 (6/2)
scn: 0x0000.0e456bb6 seq: 0x03 flg: 0x00 tail: 0x6bb61d03
frmt: 0x02 chkval: 0x0000 type: 0x1d=KTFB Bitmapped File Space Header
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x097F2200 to 0x097F4200
##################################################################

想要等到完整的資訊,需要使用如下command:
alter system set events 'immediate trace name file_hdrs level 1'; -----控制檔案中關於datafile 的記錄條目
alter system set events 'immediate trace name file_hdrs level 2'; -----包含level1 以及generic header
alter system set events 'immediate trace name file_hdrs level 3;  ---包含level2以及header information in the datafile


SQL> conn / as sysdba
Connected.
SQL> alter system set events 'immediate trace name file_hdrs level 3';

System altered.

部分資訊如下:
DATA FILE #6:
  (name #10) E:\APP\ORACLE\DATAFILE\USER02.DBF
creation size=1280 block size=8192 status=0xe head=10 tail=10 dup=1
 tablespace 4, index=4 krfil=6 prev_file=4
 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
 Checkpoint cnt:172 scn: 0x0000.0e461bef 09/21/2015 09:37:46
 Stop scn: 0xffff.ffffffff 09/21/2015 08:38:16
 Creation Checkpointed at scn:  0x0000.0e3e6929 09/20/2015 13:49:24
 thread:1 rba:(0x71a.84fb.10)
..................................................
 Offline scn: 0x0000.00000000 prev_range: 0                     -->是否offline
 Online Checkpointed at scn:  0x0000.00000000
 thread:0 rba:(0x0.0.0)
..................................................
 aux_file is NOT DEFINED
 V10 STYLE FILE HEADER:
 Compatibility Vsn = 169869568=0xa200100
 Db ID=4265866404=0xfe43f4a4, Db Name='BRUCE'
 Activation ID=0=0x0
 Control Seq=12201=0x2fa9, File size=460032=0x70500
 File Number=6, Blksiz=8192, File Type=3 DATA
Tablespace #4 - USERS  rel_fn:6
Creation   at   scn: 0x0000.0e3e6929 09/20/2015 13:49:24
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
 reset logs count:0x34efdf66 scn: 0x0000.0008297b reset logs terminal rcv data:0x0 scn: 0x0000.00000000
 prev reset logs count:0x21d66184 scn: 0x0000.00000001 prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000
 recovered at 09/21/2015 08:13:03
 status:0x4 root dba:0x00000000 chkpt cnt: 172 ctl cnt:171
begin-hot-backup file size: 0
Checkpointed at scn:  0x0000.0e461bef 09/21/2015 09:37:46
 thread:1 rba:(0x7be.2.10)
.....................................................
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp  01/01/1988 00:00:00
Platform Information:  Creation Platform ID: 7
Current Platform ID: 7 Last Platform ID: 7

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1804973/,如需轉載,請註明出處,否則將追究法律責任。

相關文章