Table Spaces and Datafiles Oracle 10G
Table Spaces and Datafiles Oracle 10G
Table Spaces and Datafiles Oracle 10G
• Datafiles:
– Can belong to only one tablespace and one database
– Are a repository for schema object data
Types of Tablespaces
• SYSTEM tablespace
– Created with the database
– Contains the data dictionary
– Contains the SYSTEM undo segment
• Non-SYSTEM tablespace
– Separate segments
– Eases space administration
– Controls amount of space allocated to a user
Creating Tablespaces
Sql>CREATE TABLESPACE userdata
DATAFILE '---path of datafile---- /userdata01.dbf'
SIZE 100M
AUTOEXTEND ON NEXT 5M MAXSIZE 200M;
• Dictionary-managed tablespace:
Undo Tablespace
Temporary Tablespaces
Sql>ALTER DATABASE
DEFAULT TEMPORARY TABLESPACE temp
– Causes a checkpoint
– Data available only for read operations
– Objects can be dropped from tablespace
Sql>ALTER DATABASE
DATAFILE '---path of datafile-----/userdata02.dbf'
RESIZE 200M;
• Tablespaces:
– DBA_TABLESPACES
– V$TABLESPACE
• Datafile information:
– DBA_DATA_FILES
– V$DATAFILE