文章转载自: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 --