控制文件的内容很丰富,很多人在工作的时候只是对他有个大概的概念,但是却不知其中包含丰富的信息, 深入了解控制文件可以使我们对备份和恢复原理理解的更深.那么就用oradebug的工作来挖掘一下我们Oracle 10g的控制文件吧
在这里我们来研究一下Oracle 10g的控制文件.
$ sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 13 14:21:58 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn / as sysdba;
Connected.
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump controlf 1; (这里我转储了level 1)
Statement processed.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ ls
irmdb_ora_3166242.trc
这里说一下我们常用的的转储level:
1.仅仅转储控制文件头(file header)
2.仅仅包括控制文件头(file header),the database info record,and checkpoint progress records
3.All record types,but just the earliest and latest records for circular reuse record types
4.As above,but includs the 4 most recent records for circular reuse record types
打开我们刚刚转储的控制文件头文件
---------------------------------
/opt/oracle/product/10g/admin/irmdb/udump/irmdb_ora_3166242.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /opt/oracle/product/10g
System name: AIX
Node name: rmsvtp01
Release: 3
Version: 5
Machine: 000DA57ED600
Instance name: irmdb
Redo thread mounted by this instance: 1
Oracle process number: 20
Unix process pid: 3166242, image: oracle@rmsvtp01 (TNS V1-V3)
*** 2008-01-13 14:22:13.179
*** SERVICE NAME:(SYS$USERS) 2008-01-13 14:22:13.171
*** SESSION ID:(515.1345) 2008-01-13 14:22:13.171
DUMP OF CONTROL FILES, Seq # 1502 = 0x5de
V10 STYLE. FILE HEADER:
Compatibility Vsn = 169870080=0xa200300
Db ID=3067503969=0xb6d66561, Db Name='IRMDB'
Activation ID=0=0x0
Control Seq=1502=0x5de, File size=334=0x14e
这里说明是一个控制文件的转储,seq是控制文件的序列号,表明控制文件的更新次数.我们可以看做是控制文件的确版本,1502代表的是1502次,后面0x5de以十六进制表示.
这里的File size表示控制文件的物理大小,其单位为块,也就是说,控制文件的实际大小=File size的值 * 数据块的大小,我这里file size=334*16KB=5344KB实际上,我们可以看一下oradata里面的控制文件大小,是5.3MB,是一致的。
File Number=0, Blksiz=16384, File Type=1 CONTROL
这里列出了我们blksiz也就是控制文件中表示的block大小:16K
*** END OF DUMP ***
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12361284/viewspace-138889/ ,如需转载,请注明出处,否则将追究法律责任。