Oracle Managed Files (OMF)
directly manages file creation and deletion at the operating system
level. Operations are specified in terms of database objects rather
than filenames. Oracle internally uses standard file system
interfaces to create and delete files as needed for the database
structures such as tablespaces, online redo log files, and control
Administrators need to specify
the file system directory to be used for a particular type of file.
Thereafter, Oracle manages to create unique files when needed and
also deletes files that are not needed. The advantages include:
* No need to bother about the
file names and storage requirements. Oracle provides a unique file
* Eliminates the need for the
DBA to directly manage OS files.
* Allows operations to be
specified in terms of objects and not files.
* Reduces the chance of
overwriting a file. Avoids accidental corruption of data files.
* Reduces wasted disk space
consumed by obsolete files. When a tablespace is dropped, the
relevant files are automatically removed at the host level.
The following initialization
parameters specify the file location:
* db_create_file_dest: Defines
the location of the default file system directory where Oracle
creates data files or temp files when no file specification is given
in the object creation statement.
Defines the location of the default file system directory for online
redo log files and control files when no file specification is given
in the creation statement. This initialization parameter can be used
multiple times where n specifies a multiplexed copy of the online
redo log or control file.
Note that the file system
directory specified by either of these parameters must already
exist. Oracle does not create it. The directory must also have
permissions to allow Oracle to create the files in it. The default
location is used whenever a location is not explicitly specified for
the operation of creating a file. Oracle creates the filename, and a
file thus created is an Oracle-managed file. The following example
sets /u01/oracle/data/applic as the default directory to use when
creating Oracle-managed files:
DB_CREATE_FILE_DEST = '/u01/oracle/data/applic'
By default, this location would
be applicable for data files, temp files, Online redo log files, and
control files. However, the db_create_online_log_dest_n
initialization parameter can be included in the initialization
parameter file to identify the default location for the database
server to create online redoes log files and control files. For
DB_CREATE_ONLINE_LOG_DEST_1 = '/u03/oracle/redo/applic'
DB_CREATE_ONLINE_LOG_DEST_2 = '/u04/oracle/redo/applic'
Also, the DB_CREATE location can
also be changed with the ALTER SYSTEM command.
For example, the following
commands change the OMF directory location to '/u05/oracle/data/applic',
and creates a new tablespace.
DB_CREATE_FILE_DEST = '/u05/oracle/data/applic' ;
CREATE TABLESPACE tbs_1; #
creates def.size of 100MB
CREATE TABLESPACE tbs_3
DATAFILE AUTOEXTEND ON MAXSIZE 800M;
For more details, refer to the
chapter on Using Oracle Managed Files in the Oracle 10g Database
With RAC systems, the OMF
facility can only be used if the cluster system is using the cluster
file system. The availability of the cluster file system with a set
of mounted file systems, allows a directory to be set up for OMF
files. The DBCA also supports Oracle Managed Files for operating
systems that support a cluster file system.