oracle 資料檔案(Datafile ) 大小 限制 說明

不一樣的天空w發表於2017-05-24

oracle 資料檔案(Datafile ) 大小 限制 說明


先看
Oracle 官網的說明, 看的是Oracle 10gR2的文件:

Physical Database Limits

Item

Type of Limit

Limit Value

Database Block Size

Minimum

2048 bytes; must be a multiple of operating system physical block size

Database Block Size

Maximum

Operating system dependent; never more than 32 KB

Database Blocks

Minimum in initial extent of a segment

2 blocks

Database Blocks

Maximum per datafile

Platform dependent; typically 2^22 - 1 blocks

Controlfiles

Number of control files

1 minimum; 2 or more (on separate devices) strongly recommended

Controlfiles

Size of a control file

Dependent on operating system and database creation options; maximum of 25,000 x (database block size)

Database files

Maximum per tablespace

Operating system dependent; usually 1022

Database files

Maximum per database

65533

May be less on some operating systems

Limited also by size of database blocks and by the DB_FILES initialization parameter for a particular instance

Database extents

Maximum per dictionary managed tablespace

4 GB * physical block size (with K/M modifier); 4 GB (without K/M modifier)

Database extents

Maximum per locally managed (uniform) tablespace

2 GB * physical block size (with K/M modifier); 2 GB (without K/M modifier)

Database file size

Maximum

Operating system dependent. Limited by maximum operating system file size; typically 2^22 or 4 MB blocks

MAXEXTENTS

Default value

Derived from tablespace default storage or DB_BLOCK_SIZE initialization parameter

MAXEXTENTS

Maximum

Unlimited

Redo Log Files

Maximum number of logfiles

Limited by value of MAXLOGFILES parameter in the CREATE DATABASE statement

Control file can be resized to allow more entries; ultimately an operating system limit

Redo Log Files

Maximum number of logfiles per group

Unlimited

Redo Log File Size

Minimum size

4 MB

Redo Log File Size

Maximum Size

Operating system limit; typically 2 GB

Tablespaces

Maximum number per database

64 K

Number of tablespaces cannot exceed the number of database files because each tablespace must include at least one file

Bigfile Tablespaces

Number of blocks

A bigfile tablespace contains only one datafile or tempfile, which can contain up to approximately 4 billion ( 2^32 ) blocks. The maximum size of the single datafile or tempfile is 128 terabytes (TB) for a tablespace with 32 K blocks and 32 TB for a tablespace with 8 K blocks.

Smallfile (traditional) Tablespaces

Number of blocks

A smallfile tablespace is a traditional Oracle tablespace, which can contain 1022 datafiles or tempfiles, each of which can contain up to approximately 4 million (2^22) blocks.

External Tables file

Maximum size

Dependent on the operating system.

An external table can be composed of multiple files.

 

 每個資料檔案最多隻能包含2^22-1個資料塊。這個限制是由於OracleRowid中使用22位來代表Block號,這22位最多隻能代表2^22-1個資料塊。這個限制也就直接導致了每個資料檔案的最大允許大小。

 

2K Block size下,資料檔案最大隻能達到約8G

8K Block size 下, 資料檔案最大隻能達到約4*8G

32K Block size下,資料檔案最大隻能達到約16*8G.

 

 

A bigfile tablespace contains only one datafile or tempfile, which can contain up to approximately 4 billion ( 232 ) blocks. The maximum size of the single datafile or tempfile is 128 terabytes (TB) for a tablespace with 32 K blocks and 32 TB for a tablespace with 8 K blocks.

  Bigfile tablespace 只允許一個資料檔案,在大檔案表空間下,Oracle使用32位來代表Block號, 每個檔案最多可以容納4G2^32)個Block。那麼也就是說當Block_size2k時,資料檔案可以達到8T Block_size8k時,資料檔案可以達到32T block_size 32K時,資料檔案可以達到128T

 

 一般不建議把單個資料檔案建的太大。 因為太大的話,如果某個資料檔案出現問題,恢復起來費時較長。

      

一般都是把單個資料檔案設成8G一個,如果表空間較大的話,可以多弄幾個資料檔案。 在上面的表格裡也提到了。 單個表空間最大支援1022個資料檔案。所以資料檔案是絕對夠用的。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2139828/,如需轉載,請註明出處,否則將追究法律責任。

相關文章