对于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/
,如需转载,请注明出处,否则将追究法律责任。