ITPub博客

首页 > 数据库 > Oracle > SYS.FILE$.BLOCKS与dba_data_file.BLOCKS值不一样的解释

SYS.FILE$.BLOCKS与dba_data_file.BLOCKS值不一样的解释

原创 Oracle 作者:lusklusklusk 时间:2017-03-16 09:00:44 0 删除 编辑
对于locally managed tablespaces,SYS.FILE$.BLOCKS字段显示的是该datafile创建时的最初大小,并且该列不会更新。而dba_data_file显示的是当前该datafile的大小。 

具体,可以参考如下文档的解释: 
SYS.FILE$ Does not Display the Correct Size for Locally Managed Tablespace files ( Doc ID 182097.1 ) 
For datafiles of dictionary managed tablespaces, column file$.blocks shows the current size in blocks of the datafile. 
For files in locally managed tablespaces, column file$.blocks shows the size of the datafile at creation time. This column is never updated. 

If the datafile extends for any reason (autoextend on or manual datafile resize), the new size is stored in another table SYS.X$KTFBHC. 
Column SYS.X$KTFBHC.KTFBHCSZ shows the current size in blocks of datafiles in locally managed tablespaces. 

SQL> select f.file#, f.blocks create_blocks, k.ktfbhcsz current_blocks 
2 from sys.file$ f, sys.x$ktfbhc k 
3 where f.file# = k.ktfbhcafno ; 

FILE# CREATE_BLOCKS CURRENT_BLOCKS 
---------- ------------- -------------- 
2 51200 51200 
3 25 50 

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

请登录后发表评论 登录
全部评论
Welcome to Lukes DB HOME。 Oracle OCM、Mysql OCP, 10年DBA工作经验,博客仅记录自己的一个学习过程,不代表完全准确,如有需要,欢迎转载。

注册时间:2015-02-02

  • 博文量
    348
  • 访问量
    1174951