Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2833864
  • 博文数量: 599
  • 博客积分: 16398
  • 博客等级: 上将
  • 技术积分: 6875
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-30 12:04
个人简介

WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606

文章分类

全部博文(599)

文章存档

2014年(12)

2013年(56)

2012年(199)

2011年(105)

2010年(128)

2009年(99)

分类: Oracle

2013-02-27 13:50:21



The first block of the controlfile is a header block that records just the controlfile block size and the number of blocks in the controlfile. The controlfile block size is the same as the database block size. When mounting a database, Oracle checks that the controlfile block size and the file size recorded in the controlfile header block match the db_block_size parameter and the file size reported by the operating system (if available). Otherwise an error is raised to indicate that the controlfile might have been corrupted or truncated.


After the header block, all controlfile blocks occur in pairs. Each logical block is represented by two physical blocks. This is necessary for the  mechanism.

It is theoretically possible that a hot backup of a controlfile could contain a split block. Therefore all controlfile blocks other than the file header have a  that can be compared when mounting a database and whenever a controlfile block is read. The block type is 0 for virgin controlfile blocks and 21 otherwise. The physical controlfile block number is used in place of an RDBA in the cache header, and a  is used in place of an SCN to record when the block was last changed. An ORA-00227 error is returned if the header and tail do not match, or if the block checksum does not match the checksum recorded in the cache header (if any).

The controlfile contains several different types of records, each in its own record section of one or more logical blocks. Records may span block boundaries within their section. The fixed view V$CONTROLFILE_RECORD_SECTION lists the types of records stored in each record section, together with the size of the record type, and the number of record slots available and in use within that section. The underlying X$KCCRS structure includes the starting logical block number (RSLBN) for each section.





红色部分说控制文件的BLOCK SIZE和数据库的BLOCK SIZE是一致的。


但在我的环境中,发现并不一致,控制文件的大小是16K,而数据库的BLOCKSIZE是8K。


SQL> show parameter db_block_size


NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
db_block_size                        integer                8192
SQL> 

[oracle@db2server huateng]$ dbfsize control01.ctl


Database file: control01.ctl
Database file type: file system
Database file size: 594 16384 byte blocks

[oracle@db2server huateng]$ dbfsize system01.dbf 


Database file: system01.dbf
Database file type: file system
Database file size: 92160 8192 byte blocks


有人知道为何吗?

阅读(1024) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

dazuiba0082013-03-18 13:51:18

oracle为了避免热备份的时候出现拆分块,控制文件采用镜像块的方法,所以是16K