Locations of visitors to this page

Wednesday, August 27, 2008

how to determine oracle block size - 如何查看oracle块大小

---------- Forwarded message ----------
From: wen xie
Date: 2008/12/16
- Hide quoted text -
Subject: Fwd: how to determine oracle block size
To: xiewenxiewen at googlemail.com


---------- Forwarded message ----------
From: XIE WEN-MFK346
Date: 2008/12/16
Subject: how to determine oracle block size
To: xiewenxiewen at gmail.com

how to determine oracle block size

数据块特指data block,是数据文件的组成部分
重做日志的叫redo block,不叫data block, 大小一般等于操作系统块的大小,
可以查询select max(lebsz) from x$kccle;知道大小
SQL> select max(lebsz) from x$kccle;
MAX(LEBSZ)
----------
512
SQL>

控制文件的也不叫data block,叫control file block,查询select distinct block_size from v$controlfile;看大小
SQL> select distinct block_size from v$controlfile;
BLOCK_SIZE
----------
16384
或查询跟踪文件
alter session set events 'immediate trace name controlf level 10';
然后查看udump下的跟踪文件
DUMP OF CONTROL FILES, Seq # 6886 = 0x1ae6
V10 STYLE FILE HEADER:
Compatibility Vsn = 169870080=0xa200300
Db ID=1955690436=0x749177c4, Db Name='TEST'
Activation ID=0=0x0
Control Seq=6886=0x1ae6, File size=492=0x1ec
File Number=0, Blksiz=16384, File Type=1 CONTROL
Logical block number 1 (header block)


也可以用dbfilesize命令看大小
oracle@MGT ~/app/oracle/oradata/test]$ dbfsize control01.ctl
Database file: control01.ctl
Database file type: file system
Database file size: 460 16384 byte blocks
[oracle@MGT ~/app/oracle/oradata/test]$ dbfsize redo01.log
Database file: redo01.log
Database file type: file system
Database file size: 204800 512 byte blocks
[oracle@MGT ~/app/oracle/oradata/test]$ dbfsize system01.dbf
Database file: system01.dbf
Database file type: file system
Database file size: 38400 8192 byte blocks
(Database file size显示了两个数字,第二个是块大小,第一个是块数,但没计算文件头占用的那一块,所以再加一才是真正的块数)
控制文件块大小是16k
重做日志的是512
数据文件的是8k


外部链接:
Log Block Size
Controlfile Structure
Description Of V$Controlfile fields- BLOCK_SIZE and FILE_SIZE_BLKS
How to Determine the Exact Size of a Controlfile on a Raw Device

Xie Wen (谢文)
Network & Operations,
Multimedia Applications & Services (MDB) MOTOROLA Inc.
NO.104 mail box,
8th floor, Motorola Tower,
No. 1 Wang Jing East Road, Chao Yang District,
Beijing 100102 P. R. China
e-mail wenxie at motorola.com



-fin-

No comments:

Website Analytics

Followers