Restrictions on the size of data files in Oracle

Source: Internet
Author: User

The size of data files in Oracle limits the size of Oracle data files. The limit is that each data file can contain up to 2 ^ 22-1 data blocks. This limit directly results in the maximum allowed size of each data file. Under 2 K Block_size, the maximum size of a data file can only reach 8 GB. Under Block_size of 32 K, the maximum size of a data file can only reach 16*8 GB. This restriction is because the Rowid of Oracle uses 22 Bits to represent the Block number. These 22 Bits can only represent 2 ^ 22-1 data blocks at most. To expand the size of data files, a large file tablespace is introduced in Oracle10g. In a large file tablespace, Oracle uses 32 bits to represent the Block number. That is to say, in the new technology, each file in a large file tablespace can contain up to 4 GB blocks. That is to say, when Block_size is 2 K, the data file can reach 8 TB. When the block_size is 32 K, the data file size can reach 128 TB. During the 2 K block_size test, this restriction was first encountered: SQL> alter tablespace eygle add datafile 'f: \ eygle02.dbf 'size 8192 M; alter tablespace eygle add datafile 'f: \ eygle02.dbf 'size 8192 M * ERROR is located at row 1st: ORA-01144: the file size (4194304 blocks) is a little smaller than the maximum number of 4194303 blocks, and finally created successfully: SQL> alter tablespace eygle add datafile 'f: \ eygle02.dbf' size 8191 M reuse; The tablespace has been changed. Autoextend_clauseThe autoextend_clause is valid for datafiles and tempfiles but not for redo log files. use this clause to enable or disable the automatic extension of a new or existing datafile or tempfile. if you omit this clause: For Oracle-managed files: If you specify SIZE, then Oracle Database creates a file of the specified size with AUTOEXTEND disabled. if you do not specify SIZE, then the database creates a 100 M file with AUTOEXTEND enabled. when autoextension is required, the database extends the file by its original size or 100 MB, whichever is smaller. you can override this default behavior by specifying the NEXT clause. for user-managed files, with or without SIZE specified, Oracle creates a file with AUTOEXTEND disabled. ON Specify ON to enable autoextend. OFF Specify OFF to turn off autoextend if is turned on. when you turn off autoextend, the values of NEXT and MAXSIZE are set to zero. if you turn autoextend back on in a subsequent statement, you must reset these values. NEXT Use the NEXT clause to specify the size in bytes of the next increment of disk space to be allocated automatically when more extents are required. the default is the size of one data block. MAXSIZE Use the MAXSIZE clause to specify the maximum disk space allowed for automatic extension of the datafile. UNLIMITED Use the UNLIMITED clause if you do not want to limit the disk space that Oracle can allocate to the datafile or tempfile. restriction on the autoextend_clause You cannot specify this clause as part of the datafile_tempfile_spec in a create controlfile statement or in an alter database create datafile clause.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.