Oracle使用dbfsize查看控制文件、数据文件、日志文件的block size

1、当前数据库版本
SQL>  select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production


2、数据文件、控制文件、在线日志文件路径
[oracle@db ~]$ cd /u01/app/oracle/oradata/orcl
[oracle@db orcl]$ ls
control01.ctl  redo01.log  redo02.log  redo03.log  sysaux01.dbf  system01.dbf  temp01.dbf  test.dbf  undotbs01.dbf  users01.dbf


3、查看控制文件的Block Size大小 -- 16K
[oracle@db orcl]$ dbfsize /u01/app/oracle/oradata/orcl/control01.ctl
Database file: /u01/app/oracle/oradata/orcl/control01.ctl
Database file type: file system
Database file size: 594 16384 byte blocks


4、查看日志文件的Block Size大小 -- 512Bytes
[oracle@db orcl]$ dbfsize /u01/app/oracle/oradata/orcl/redo01.log
Database file: /u01/app/oracle/oradata/orcl/redo01.log
Database file type: file system
Database file size: 102400 512 byte blocks


5、查看数据文件的Block Size大小 -- 8K
[oracle@db orcl]$ dbfsize /u01/app/oracle/oradata/orcl/users01.dbf 
Database file: /u01/app/oracle/oradata/orcl/users01.dbf
Database file type: file system
Database file size: 640 8192 byte blocks
[oracle@db orcl]$ dbfsize /u01/app/oracle/oradata/orcl/system01.dbf 
Database file: /u01/app/oracle/oradata/orcl/system01.dbf
Database file type: file system
Database file size: 96000 8192 byte blocks


system01.dbf文件大小为96000*8k/1024=750M

[oracle@db orcl]$ du -sh *
9.3M    control01.ctl
51M     redo01.log
51M     redo02.log
51M     redo03.log
541M    sysaux01.dbf
751M    system01.dbf
7.6M    temp01.dbf
5.1M    test.dbf
61M     undotbs01.dbf
5.1M    users01.dbf



6、参考文档
How to detect and fix a corruption in the datafile OS header - ORA-27047
Doc ID:360032.1
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值