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_FILESinitialization parameter andMAXDATAFILESparameter of theCREATE DATABASEandCREATE CONTROLFILEstatements 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
ALTERTABLESPACEstatement 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 theBIGFILEkeyword of theCREATETABLESPACEstatement (CREATEBIGFILETABLESPACE...). Oracle Database automatically creates a locally managed tablespace with automatic segment-spec management. You can, but need not, specifyEXTENTMANAGEMENTLOCALandSEGMENTSPACEMANAGEMENTAUTOin this statement. However, the database returns an error if you specifyEXTENTMANAGEMENTDICTIONARYorSEGMENTSPACEMANAGEMENTMANUAL. The remaining syntax of the statement is the same as for theCREATE TABLESPACEstatement, but you can only specify one datafile. For example:
CREATE BIGFILE TABLESPACE bigtbs DATAFILE '/u02/oracle/data/bigtbs01.dbf' SIZE 50G ...You can specifySIZEin kilobytes (K), megabytes (M), gigabytes (G), or terabytes (T).
If the default tablespace type was set toBIGFILEat database creation, you need not specify the keywordBIGFILEin theCREATE TABLESPACEstatement. A bigfile tablespace is created by default.
If the default tablespace type was set toBIGFILEat database creation, but you want to create a traditional (smallfile) tablespace, then specify aCREATESMALLFILETABLESPACEstatement to override the default tablespace type for the tablespace that you are creating.
Altering a Bigfile Tablespace
Two clauses of theALTER TABLESPACEstatement support datafile transparency when you are using bigfile tablespaces:
-
RESIZE: TheRESIZEclause 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 theADDDATAFILEclause):
With a bigfile tablespace, you can use theAUTOEXTENDclause outside of theADDDATAFILEclause. 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