Thursday, May 1, 2008

Increasing the number of log/data files

Today I had a space constraint issue in my ORACLE Database, so I thought of adding a new datafile to the tablespace, but I was unable to add one more datafile to the existing tablespace. The database has already reached its maximum number of datafiles, this number will be specified with the MAXDATAFILES clause during database creation. I was about to recreate the control file as we do for the versions ORACLE 9i and below, but to my surprise we can do the same dynamically in ORACLE 10g when the database is up and running. This option is very handy in those situations where we need to add more datafiles, but this number also depends on the underlying operating system too, since the OS can open a limited set of files at a particular moment. One can apply the same for MAXLOGFILES clause for increasing the number of log files.

The DB_FILES parameter can also be used for applying the same restriction on number of data and log files. This parameter is not a dynamic parameter, so one need to down the database to change the value of this parameter.