Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Guidelines for Managing Datafiles

This section describes aspects of managing datafiles, and includes the following topics:

Number of Datafiles

At least one datafile is required for the SYSTEM tablespace of a database; a small system might have a single datafile. In general, keeping a few large datafiles is preferable to many small datafiles, because you can keep fewer files open at the same time.

You can add datafiles to tablespaces, subject to the following operating system-specific datafile limits:

operating system limit Each operating system sets a limit on the maximum number of files per process. Regardless of all other limits, more datafiles cannot be created when the operating system limit of open files is reached.
Oracle7 system limit Oracle7 imposes a maximum limit on the number of datafiles for any Oracle7 database opened by any instance. This limit is port-specific.
control file upper bound At database creation, you must indicate the maximum number of datafiles expected for the database so that an adequate amount of space can be reserved in the database's control file. You set this limit with the MAXDATAFILES parameter in the CREATE DATABASE statement. This maximum cannot exceed the Oracle7 system limit or any operating system limit. If you are not sure how to set this parameter, use a high number to avoid unnecessary limitation. The default value is operating system-specific.
Note: You can increase space in the database by resizing datafiles. Resizing existing datafiles is useful if you are nearing the MAXDATAFILES limit.

instance or SGA upper bound When starting an Oracle7 instance, the database's parameter file indicates the amount of SGA space to reserve for datafile information; the maximum number of datafiles is controlled by the DB_FILES parameter. This limit applies only for the life of the instance. DB_FILES can temporarily reduce the control file upper bound, but cannot raise it. The default value is the value of the control file upper bound.
With the Oracle7 Parallel Server, all instances must set the instance datafile upper bound to the same value.

The use of DB_FILES and MAXDATAFILES is optional. If neither is used, the default maximum number of datafiles is the operating system-specific Oracle7 system limit.

See Also: For more information on operating system limits, see your operating system-specific Oracle documentation.

For information about Parallel Server operating system limits, see the manual.

For more information about MAXDATAFILES, see the Oracle7 Server SQL Reference.

Set the Size of Datafiles

The first datafile (in the original SYSTEM tablespace) must be at least 2M to contain the initial data dictionary and rollback segment. If you install other Oracle7 products, they may require additional space in the SYSTEM tablespace (for online help, for example); see the installation instructions for these products.

Place Datafiles Appropriately

Tablespace location is determined by the physical location of the datafiles that constitute that tablespace. Use the hardware resources of your computer appropriately.

For example, if several disk drives are available to store the database, it might be helpful to store table data in a tablespace on one disk drive, and index data in a tablespace on another disk drive. This way, when users query table information, both disk drives can work simultaneously, retrieving table and index data at the same time.

Store Datafiles Separately From Redo Log Files

Datafiles should not be stored on the same disk drive that stores the database's redo log files. If the datafiles and redo log files are stored on the same disk drive and that disk drive fails, the files cannot be used in your database recovery procedures.

If you multiplex your redo log files, then the likelihood of your losing all of your redo log files is low, so you can store datafiles on the same drive as some redo log files.


Contents Index Home Previous Next