Every Oracle database has one or more physical datafiles (OS File), which contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the datafiles allocated for a database. Database datafiles are only written to by the DBWR processes.
Datafiles have the following characteristics:
- One or more datafiles form a logical unit of database storage called a permanent tablespace.
- A datafile can be associated with only one tablespace.
- Datafiles can be defined to extend automatically when they are full.
Size of Datafiles:
We can alter the size of a datafile after its creation or can specify that a datafile should dynamically grow as schema objects in the tablespace grow.
SQL> select name from v$datafile; SQL> alter database datafile '' resize 2GB;
Data in a datafile is read, as needed, during normal database operation and stored in the memory cache of Oracle Database. For example, if a user wants to access some data in a table of a database, and if the requested information is not already in the memory cache for the database, then it is read from the appropriate datafiles and stored in memory.