[oracle@rhel63single test]$ which dbfsize
/u02/app/oracle/product/11.2.0.4/db_1/bin/dbfsize
[oracle@rhel63single test]$
[oracle@rhel63single test]$
[oracle@rhel63single test]$
[oracle@rhel63single test]$ dbfsize control01.ctl
Database file: control01.ctl
Database file type: file system
Database file size: 594 16384 byte blocks
[oracle@rhel63single test]$ ll control01.ctl
-rw-r-----. 1 oracle oinstall 9748480 Jan 9 04:42 control01.ctl
对control01.ctl计算如下: 9748480-16384*594=16384, 也就是说 os命令显示的control01.ctl 大小要比 oracle层面“认为”的 control01.ctl大小要 多 一个 16384 byte
[oracle@rhel63single test]$ dbfsize redo01.log
Database file: redo01.log
Database file type: file system
Database file size: 102400 512 byte blocks
[oracle@rhel63single test]$
[oracle@rhel63single test]$ ll redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jan 9 04:42 redo01.log
对redo01.log计算如下: 52429312-512*102400 =512,也就是说 os命令显示的redo01.log 大小要比 oracle层面“认为”的 redo01.log大小要 多 一个 512 byte
[oracle@rhel63single test]$ dbfsize users01.dbf
Database file: users01.dbf
Database file type: file system
Database file size: 960 8192 byte blocks
[oracle@rhel63single test]$
[oracle@rhel63single test]$ ll users01.dbf
-rw-r-----. 1 oracle oinstall 7872512 Jan 9 03:15 users01.dbf
对users01.dbf计算如下: 7872512-8192*960 =8192,也就是说 os命令显示的users01.dbf大小要比 oracle层面“认为”的 users01.dbf大小要 多 一个 8192 byte
Oracle数据库文件大小计算与理解
本文详细解析了使用Oracle数据库管理系统时,如何通过命令行工具`whichdbfsize`和`dbfsize`来获取数据库文件大小,并揭示了与操作系统层面显示大小之间的差异。通过实例分析了`control01.ctl`、`redo01.log`和`users01.dbf`文件的实际大小与Oracle层面计算大小的对比,解释了这种差异产生的原因。
155

被折叠的 条评论
为什么被折叠?



