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

文章转载自:http://blog.itpub.net/519536/viewspace-614796/


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 --
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值