In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "why the value of bytes is larger than the value of maxbytes". The content of the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn "Why the value of bytes is larger than the value of maxbytes".
Objective:
This article explains why the value of bytes in DBA_DATA_FILES is larger than the value of maxbytes.
Description:
When a datafile manually resize to a value greater than maxsize (maxbytes), the value of bytes in DBA_DATA_FILES is larger than the value of maxbytes
When the datafile is set to autoextend on, the maxbytes value in dba_data_files is automatically settled to a non-zero value.
The bytes in dba_data_files is the current size of the datafile (in bytes)
Here is an example:
Explanation:
When datafile is resize, the maxbytes value in dba_data_files is not updated, and the column that is updated is only the bytes column.
The maxbytes value in dba_data_files is updated only when ALTER DATABASE command with MAXSIZE option is used.
Step-1: Create a New Tablespace
=
SQL > create tablespace tst datafile'/ u01 size autoextend on
Tablespace created.
SQL > col file_name for A60
SQL > set lines 200
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 3.4360E+10 YES
7 rows selected.
Step-2: Alter the MAXSIZE value from default value
=
SQL > alter database datafile'/ u01 autoextend on maxsize
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 resize
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 >
The maximum size that a tablespace tst (/ u01/app/oracle/oradata/DBdb/tst.dbf) can reach is the value of dba_data_files.bytes.
Thank you for reading, the above is the content of "Why the value of bytes is larger than the value of maxbytes". After the study of this article, I believe you have a deeper understanding of why the value of bytes is larger than the value of maxbytes, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.