Overview of Data Files
At the operating system level, Oracle Database stores database data in data files. Every database must have at least one data file.
Use of Data Files
Oracle Database physically stores table space data in data files. Table spaces and data files are closely related, but have important differences:
■Each table space consists of one or more data files, which conform to the operating system in which Oracle Database is running.
■The data for a database is collectively stored in the data files located in each table space of the database.
■A segment can span one or more data files, but it cannot span multiple table spaces.
■A database must have the SYSTEM and SYS AUX table spaces. Oracle Data base automatically allocates the first data files of any database for the SYSTEM table space during database creation.
The SYSTEM table space contains the data dictionary, a set of tables that contains database metadata. Typically, a database also has an undo tables pace and a temporary table space (usually named TEMP).
Permanent and Temporary Data Files
A permanent table space contains persistent schema objects. Objects in permanent table spaces are stored in data files.
A temporary table space contains schema objects only for the duration of a session. Locally managed temporary table spaces have temporary files (temp files), which are special files designed to store data in hash, sort, and other operations. Temp files also store result set data when insufficient space exists in memory.
Temp files are similar to permanent data files, with the following exceptions:
■Permanent database objects such as tables are never stored in temp files.
■Temp files are always set to NO LOGGING mode, which means that they never have redo generated for them. Media recovery does not recognize temp files.
■You cannot make a temp file read-only.
■You cannot create a temp file with the ALTER DATABASE statement.