Oracle7 Server Concepts
Datafiles
A tablespace in an Oracle database consists of one or more physical datafiles. A datafile can be associated with only one tablespace, and only one database.
When a datafile is created for a tablespace, Oracle creates the file by allocating the specified amount of disk space plus the overhead required for the file header. When a datafile is created, the operating system is responsible for clearing old information and authorizations from a file before allocating it to Oracle. If the file is large, this process might take a significant amount of time.
Additional Information: For information on the amount of space required for the file header of datafiles on your operating system, see your Oracle operating system specific documentation.
Since the first tablespace in any database is always the SYSTEM tablespace, Oracle automatically allocates the first datafiles of any database for the SYSTEM tablespace during database creation.
Datafile Contents
After a datafile is initially created, the allocated disk space does not contain any data; however, Oracle reserves the space to hold only the data for future segments of the associated tablespace -- it cannot store any other program's data. As a segment (such as the data segment for a table) is created and grows in a tablespace, Oracle uses the free space in the associated datafiles to allocate extents for the segment.
The data in the segments of objects (data segments, index segments, rollback segments, and so on) in a tablespace are physically stored in one or more of the datafiles that constitute the tablespace. Note that a schema object does not correspond to a specific datafile; rather, a datafile is a repository for the data of any object within a specific tablespace. Oracle allocates the extents of a single segment in one or more datafiles of a tablespace; therefore, an object can "span" one or more datafiles. Unless table "striping" is used, the database administrator and end-users cannot control which datafile stores an object.
Size of Datafiles
You can alter the size of a datafile after its creation or you can specify that a datafile should dynamically grow as objects in the tablespace grow. This functionality allows you to have fewer datafiles per tablespace and can simplify administration of datafiles.
For more information about resizing datafiles, see the Oracle7 Server Administrator's Guide.
Offline Datafiles
You can take tablespaces offline (make unavailable) or bring them online (make available) at any time. Therefore, all datafiles making up a tablespace are taken offline or brought online as a unit when you take the tablespace offline or bring it online, respectively. You can take individual datafiles offline; however, this is normally done only during certain database recovery procedures.