ITPub博客

首页 > 数据库 > Oracle > 【dbfsize】使用dbfsize命令得到数据文件、控制文件及日志文件的Block Size

【dbfsize】使用dbfsize命令得到数据文件、控制文件及日志文件的Block Size

原创 Oracle 作者:OCMU联盟 时间:2009-09-16 14:35:30 0 删除 编辑
1.这里演示的数据库版本是10.2.0.3
sys@ora10g> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production

2.列出数据库包含的相关文件
ora10g@DBT /oracle/oradata/ora10g$ ls -ltr
total 17G
-rw-r----- 1 oracle oinstall 1.1G Sep 16 08:00 temp01.dbf
-rw-r----- 1 oracle oinstall 5.1M Sep 16 09:59 users01.dbf
-rw-r----- 1 oracle oinstall 101M Sep 16 09:59 tbs_sec_i01.dbf
-rw-r----- 1 oracle oinstall 3.4G Sep 16 09:59 tbs_sec_d01.dbf
-rw-r----- 1 oracle oinstall 501M Sep 16 09:59 redo3_01.log
-rw-r----- 1 oracle oinstall 501M Sep 16 09:59 redo2_01.log
-rw-r----- 1 oracle oinstall 421M Sep 16 14:19 sysaux01.dbf
-rw-r----- 1 oracle oinstall 3.1G Sep 16 14:20 undotbs01.dbf
-rw-r----- 1 oracle oinstall 1.9G Sep 16 14:21 system01.dbf
-rw-r----- 1 oracle oinstall 501M Sep 16 14:24 redo1_01.log
-rw-r----- 1 oracle oinstall 6.8M Sep 16 14:25 control03.ctl
-rw-r----- 1 oracle oinstall 6.8M Sep 16 14:25 control02.ctl
-rw-r----- 1 oracle oinstall 6.8M Sep 16 14:25 control01.ctl

3.检查数据文件的Block Size大小 -- 8K
ora10g@DBT /oracle/oradata/ora10g$ dbfsize tbs_sec_i01.dbf

Database file: tbs_sec_i01.dbf
Database file type: file system
Database file size: 12800 8192 byte blocks

4.检查控制文件的Block Size大小 -- 16K
ora10g@DBT /oracle/oradata/ora10g$ dbfsize control01.ctl

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

5.检查日志文件的Block Size大小 -- 512Bytes
ora10g@DBT /oracle/oradata/ora10g$ dbfsize redo1_01.log

Database file: redo1_01.log
Database file type: file system
Database file size: 1024000 512 byte blocks

6.小结
dbfsize命令并不是很常用,不过在一些数据库故障的诊断过程中也是一个很好的辅助手段。
有兴趣的朋友可以参考一下Metalink上的这个文章:
How to detect and fix a corruption in the datafile OS header - ORA-27047
Doc ID:
360032.1

-- The End --

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70034820/viewspace-2994309/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
OCM联盟( Oracle Certified Master Union)是由侯圣文(ACE总监)发起的一个公益组织,旨在为每一个OCM大师提供一个可以继续展示自己才华,技术和实力的平台。

注册时间:2007-05-27

  • 博文量
    799
  • 访问量
    8407010