这篇文章主要讲解了"为什么字节的值比maxbytes的值要大",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"为什么字节的值比maxbytes的值要大"吧!
目的:本文解释了DBA_DATA_FILES中bytes的值要比maxbytes的值要大的原因。描述:当一个datafile 手工resize到一个大于maxsize(maxbytes)的值之后,DBA_DATA_FILES中bytes的值要比maxbytes的值要大当该datafile被设置为autoextend on之后,dba_data_files中的maxbytes 值被自动结算为一个非零值。dba_data_files中的bytes是该datafile的当前的大小(以bytes为单位)下面是一个示例:解释:http://
YES
/u01/app/oracle/oradata/DBdb/sysaux01.dbf 744488960 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/system01.dbf 2936012800 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/example01.dbf 355205120 3.4360E+10 YES
/u01/app/oracle/fast_recovery_area/DBDB/newback/ts_xxf_01.dbf 10485760 0 NO
/u01/app/oracle/oradata/DBdb/tst.dbf 5242880 3.4360E+10 YES
7 rows selected.
Step-2: Alter the MAXSIZE value from default value
====== ===================================================
SQL> alter database datafile '/u01/app/oracle/oradata/DBdb/tst.dbf' autoextend on maxsize 10m;
Database altered.
SQL> select file_name, bytes, maxbytes, autoextensible from dba_data_files;
FILE_NAME BYTES MAXBYTES AUT
----------------------------------------------------------------- ---------- ---------- ---
/u01/app/oracle/oradata/DBdb/users01.dbf 3207331840 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/undotbs01.dbf 2710568960 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/sysaux01.dbf 744488960 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/system01.dbf 2936012800 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/example01.dbf 355205120 3.4360E+10 YES
/u01/app/oracle/fast_recovery_area/DBDB/newback/ts_xxf_01.dbf 10485760 0 NO
/u01/app/oracle/oradata/DBdb/tst.dbf 5242880 10485760 YES
7 rows selected.
Step-3: Resize the datafile to a value higher than MAXBYTES
====== ===================================================
SQL> alter database datafile '/u01/app/oracle/oradata/DBdb/tst.dbf' resize 20m;
Database altered.
SQL> select file_name, bytes, maxbytes, autoextensible from dba_data_files;
FILE_NAME BYTES MAXBYTES AUT
----------------------------------------------------------------- ---------- ---------- ---
/u01/app/oracle/oradata/DBdb/users01.dbf 3207331840 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/undotbs01.dbf 2710568960 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/sysaux01.dbf 744488960 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/system01.dbf 2936012800 3.4360E+10 YES
/u01/app/oracle/oradata/DBdb/example01.dbf 355205120 3.4360E+10 YES
/u01/app/oracle/fast_recovery_area/DBDB/newback/ts_xxf_01.dbf 10485760 0 NO
/u01/app/oracle/oradata/DBdb/tst.dbf 20971520 10485760 YES
7 rows selected.
SQL>
表空间tst(/u01/app/oracle/oradata/DBdb/tst.dbf )能达到的最大大小是dba_data_files.bytes的值。
感谢各位的阅读,以上就是“为什么bytes的值比maxbytes的值要大”的内容了,经过本文的学习后,相信大家对为什么bytes的值比maxbytes的值要大这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/155154.html