Bigfile Table-spaces
A bigfile table-space is a table-space with a single, but very large (up to 4G blocks) data-file. Traditional smallfile tablespaces, in contrast, can contain multiple data-files, but the files cannot be as large. The benefits of bigfile tablespaces are the following:- A bigfile tablespace with 8K blocks can contain a 32 terabyte datafile. A bigfile tablespace with 32K blocks can contain a 128 terabyte datafile. The maximum number of datafiles in an Oracle Database is limited (usually to 64K files). Therefore, bigfile tablespaces can significantly enhance the storage capacity of an Oracle Database.
-
Bigfile tablespaces can reduce the number of datafiles needed for a database. An additional benefit is that the
DB_FILES
initialization parameter andMAXDATAFILES
parameter of theCREATE DATABASE
andCREATE CONTROLFILE
statements can be adjusted to reduce the amount of SGA space required for datafile information and the size of the control file. -
Bigfile tablespaces simplify database management by providing datafile transparency. SQL syntax for the
ALTER
TABLESPACE
statement lets you perform operations on tablespaces, rather than the underlying individual datafiles.
SYSTEM
tablespace can be bigfile tablespaces even if their segments are manually managed.Notes:
- Bigfile tablespaces are intended to be used with Automatic Storage Management (ASM) or other logical volume managers that supports striping or RAID, and dynamically extensible logical volumes.
- Avoid creating bigfile tablespaces on a system that does not support striping because of negative implications for parallel query execution and RMAN backup parallelization.
-
Using bigfile tablespaces on platforms that do not support large file
sizes is not recommended and can limit tablespace capacity. Refer to
your operating system specific documentation for information about
maximum supported file sizes.
Creating a Bigfile Tablespace
To create a bigfile tablespace, specify theBIGFILE
keyword of theCREATE
TABLESPACE
statement (CREATE
BIGFILE
TABLESPACE
...). Oracle Database automatically creates a locally managed tablespace with automatic segment-spec management. You can, but need not, specifyEXTENT
MANAGEMENT
LOCAL
andSEGMENT
SPACE
MANAGEMENT
AUTO
in this statement. However, the database returns an error if you specifyEXTENT
MANAGEMENT
DICTIONARY
orSEGMENT
SPACE
MANAGEMENT
MANUAL
. The remaining syntax of the statement is the same as for theCREATE TABLESPACE
statement, but you can only specify one datafile. For example:
CREATE BIGFILE TABLESPACE bigtbs DATAFILE '/u02/oracle/data/bigtbs01.dbf' SIZE 50G ...
You can specifySIZE
in kilobytes (K), megabytes (M), gigabytes (G), or terabytes (T).
If the default tablespace type was set toBIGFILE
at database creation, you need not specify the keywordBIGFILE
in theCREATE TABLESPACE
statement. A bigfile tablespace is created by default.
If the default tablespace type was set toBIGFILE
at database creation, but you want to create a traditional (smallfile) tablespace, then specify aCREATE
SMALLFILE
TABLESPACE
statement to override the default tablespace type for the tablespace that you are creating.
Altering a Bigfile Tablespace
Two clauses of theALTER TABLESPACE
statement support datafile transparency when you are using bigfile tablespaces:
-
RESIZE
: TheRESIZE
clause lets you resize the single datafile in a bigfile tablespace to an absolute size, without referring to the datafile. For example:
ALTER TABLESPACE bigtbs RESIZE 80G;
-
AUTOEXTEND
(used outside of theADD
DATAFILE
clause):
With a bigfile tablespace, you can use theAUTOEXTEND
clause outside of theADD
DATAFILE
clause. For example:
ALTER TABLESPACE bigtbs AUTOEXTEND ON NEXT 20G;
ADD
DATAFILE
clause for a bigfile tablespace.Identifying a Bigfile Tablespace
The following views contain aBIGFILE
column that identifies a tablespace as a bigfile tablespace:-
DBA_TABLESPACES
-
USER_TABLESPACES
-
V$TABLESPACE
No comments:
Post a Comment