Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00059: maximum number of DB_FILES exceeded

534640Oct 11 2006 — edited Apr 9 2012
Hi All,
I m getting the following error
ORA-00059: maximum number of DB_FILES exceeded
As data_files parameter reaches its maximum value.
Can any one tell me how to change the value dynamically. Our 10G ver2 database is 24/7 operational. So i dont want to shutdown and restart. Is there any other solution to change the value.
I tried to change the pfile value and then recreated spfile and again facing the same problem
Thanks

Comments

248498
You cannot change this parameter dynamically. You must restart your oracle instance in order this parameter takes effect.
Paul M.
Unfortunately that's a static parameter, so you can't change it without restarting the DB. See http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams049.htm#sthref205
537005
This parameter is in the CONTROL FILE not in pfile or spfile.
You must recreate the control file.

This is the only way...for me :)

bye
248498
You do not need to recreate control file. See below:

SQL> sho user
SYS
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production

SQL> sho parameter db_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 200
SQL> alter system set db_files = 256 scope = spfile;

SQL> shutdown immediate
SQL> startup
SQL> sho parameter db_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 256
534640
Thanks all for quick support
Mohammed Taj

: maximum number of DB_FILES exceeded
i don't think here need to create control files.
bcoz OP is Ora-00059 err

we just need to increase this parameter
and startup our database

SQL> show parameter db_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer     6
SQL> create tablespace test
  2  datafile 'd:\test01.dbf' size 1m;
create tablespace test
*
ERROR at line 1:
ORA-00059: maximum number of DB_FILES exceeded


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create pfile from spfile;

File created.

SQL> --change db_files parameter in init<db>.ora file
SQL> create spfile from pfile;

File created.

SQL> startup
ORACLE instance started.

Total System Global Area  171966464 bytes
Fixed Size                   787988 bytes
Variable Size             145488364 bytes
Database Buffers           25165824 bytes
Redo Buffers                 524288 bytes
Database mounted.
Database opened.
SQL> show parameter db_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer     200
SQL>

Note : @Paul . sir if this problem occur in 24x7 database enviorment then what is solution.
plz. reply
thanx

Satish Kandi
Sorry for interrupting, but in case of a production system, you would have already set DB_FILES to a calculated value (depending on size of database, expected growth etc). Even to some extent max possible value.

Considering the fact that this parameter is governed by the MAXDATAFILES used in the database creation, if set low, you need to recreate the controlfile and restart the database ;)

Thanks
Paul M.
if this problem occur in 24x7 database enviorment then what is solution.
No solution. You calculate it at DB creation, or you restart the DB.
Paul M.
Considering the fact that this parameter is governed
by the MAXDATAFILES used in the database creation, if
set low, you need to recreate the controlfile and
restart the database ;)
You don't need to recreate the controlfile. The following is from an Oracle article :

In Oracle8i and higher, if the MAXDATAFILES limit is reached the controlfile will expand automatically.

In Oracle 8i and higher, when you issue CREATE DATABASE or CREATE CONTROLFILE statements, the MAXDATAFILES parameter specifies an initial size of the datafile portion of the control file. Later, if you add a file whose number exceeds MAXDATAFILES but is less than or equal to the value specified by the DB_FILES initialization parameter, the control file automatically expands to allow the datafile portion to accommodate more files.

We can have DB_FILES set to more than the value of MAXDATAFILES.
537005
Thanks at all!

i dont know this feature, but i know only maxdatafiles paramater.

Bye
534640
Hello All,
I just edit the parameter db_files in pfile and restarted the instance and every thing comes to normal.
thanx
Satish Kandi
Hi Paul,

My statement was based on Oracle reference document of Oracle 8.1.7 only..

http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch138.htm#58406

>>
DB_FILES
Parameter type: Integer

Parameter class: Static

Default value: Operating system dependent

Range of values: Minimum: the current actual number of datafiles in the database

Maximum: the value that was specified in the MAXDATAFILES clause the last time CREATE DATABASE or CREATE CONTROLFILE was executed
>>

I actually have never faced this error as I have configured my databases with a MAX possible value on my system for MAXDATAFILES, that again based on above documentation only.

I guess Oracle document is contradicting in case of DB_FILES and MAXDATAFILES documentation.

Regards

Satish
Paul M.
Hi Satish,

Nowadays is a bit dangerous to rely on 8.1.6 documentation...:-)

I don't have an 8.1.7.4 on hands at the moment, but probably is was already different, and surely is different 9i, and 10g, from which comes the link I posted in my first post.
Satish Kandi
Yes Paul...

The documentation is definitely different and is changing. I just referred the 9i and 10GR1 documents that were with me and sure is different.

I have some databases running on Oracle 8.1.7 (still)... so I will stick with Oracle 8i documentation for these databases at least.

Anyways, I will keep myself updated now.

Thanks.
Mohammed Taj
Thanx Mr. Paul
541834
So if I am running the following:

Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
PL/SQL Release 8.1.7.3.0 - Production
CORE 8.1.7.0.0 Production
TNS for Solaris: Version 8.1.7.3.0 - Production
NLSRTL Version 3.4.1.0.0 - Production

Can I edit the db_files in my initSID.ora file and then run create spfile from pfile. Will this mess anything up with any other parameters? I have changed the db_files in the initSID.ora file then restarted the database and tried to create a new datafile but received the ORA-00059 error still. So if I change the db_files to something like 200 and then run create spfile from pfile will this work and will it affect anything else?
541834
One more thing. Is it possible that the way the database was setup it does not use the spfile? In my initSID.ora directory I should see a spile currently if it is using one correct?
Mohammed Taj
yes
1. change in initsid.ora file and create spfile from pfile and startup ur database.
Paul M.
Is it possible that the way the database was setup it does not use the spfile?
I don't have your version on hands, and I don't remember very well how it worked, but the 8.1.7 documentation does not mention CREATE SPFILE command. Did you already try it ?
541834
No I was afraid to. I did not want to corrupt the database.
Paul M.
I did not want to corrupt the database.
You don't risk anything, spfile is an external file, and can't corrupt the DB. I'm just curious to know if it was already there, you could create it (if it works), then you can also remove it. And yes, if not differently specified, it should be in the directory where initSID.ora is, $ORACLE_HOME/dbs on Unix/Linux, ORACLE_HOME\database on Windows.
Kamal Kishore
spfile support was added in 9i.

http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96540/wnsql.htm#969716

search for create spfile.
Paul M.
Thanks Kamal, I knew that, but I was not sure of my memory...:-)
541834
Ok I looked at the latest trace file from my backup and the MAXDATAFILES is set to 150. In my initSID.ora file the db_file is set to 50 and I only have 38 .dbf files. Is there any other reason that I could be receiving the ORA-00059 error?

Here is a list of my dbf files. Someone before me created these and I am wondering if it has something to do with the 8a. I would not think so but ...

DBMERGE_MAIN_OFDB_IND_LDBARC.dbf
META_DATA_OFDB_IND_LDBARC.dbf
OFDB_MAIN_OFDB_IND_LDBARC.dbf
OFDB_MAIN_OFDB_IND_LDBARC_2.dbf
OFDB_MAIN_OFDB_IND_LDBARC_3.dbf
OFDB_PARMS_OFDB_IND_2_LDBARC.dbf
OFDB_PARMS_OFDB_IND_3_LDBARC.dbf
OFDB_PARMS_OFDB_IND_4_LDBARC.dbf
OFDB_PARMS_OFDB_IND_5_LDBARC.dbf
OFDB_PARMS_OFDB_IND_6_LDBARC.dbf
OFDB_PARMS_OFDB_IND_7_LDBARC.dbf
OFDB_PARMS_OFDB_IND_8_LDBARC.dbf
OFDB_PARMS_OFDB_IND_8a__LDBARC.dbf
OFDB_PARMS_OFDB_IND_9_LDBARC.dbf
OFDB_PARMS_OFDB_IND_LDBARC.dbf
OFDB_SNAPSHOTS_OFDB_IND_LDBARC.dbf
Roll2_LDBARC.dbf
SCANNER_OFDB_IND_LDBARC.dbf
SCANNER_OFDB_IND_LDBARC_2.dbf
SELECTION_OFDB_IND_LDBARC.dbf
TEMP_LDBARC.dbf
cntrl2_LDBARC.dbf
log1b_LDBARC.log
log2b_LDBARC.log
log3b_LDBARC.log
log4b_LDBARC.log
log5b_LDBARC.log
log6b_LDBARC.log

Message was edited by:
d072330
541834
Thanks for all of your help. I have fixed the problem. For some reason or another it did not like the way I numbered something or something was fat-fingered earlier. I created a number 10 file without any error messages.
user8856433
Hi Khalid,

this abdul here, you can change the parameter dynamically but the parameter shud dynamic.if its then you not need to down or restart the db.

fire this quary u ll be getting the actual result of changing paramtere....

sql>select isses_modifiable,issys_modiafiable from v$parameter where parameter name='parametername';

the output would be like

true and false

there can be spell mistake so please check the parameter
929313
my database datafile limit is 1024.


but when i tried to add a datafile i got an error

ORA-00059: maximum number of DB_FILES exceeded.

this is a RAC environment...

the update is done at instance level at node one and node 2 separately


Please help to solve this issue its urgent....

Edited by: 926310 on Apr 9, 2012 6:27 PM
unknown-7404
Welcome to the forum!

Unfortunately, for your first post you have made some serious breaches of etiquette.

Please read the FAQ about how to post questions to the forum.

Do not HIJACK another users question. If you are having trouble, even with the same issue, open your own thread. You can put a link to this thread in yours to say you have the same problem but it is rude to ask your question in someone elses thread.

>
Please help to solve this issue its urgent....
>
Not to us it isn't. The forum is answered by volunteers who do it on their own time. No question is more important than any other and saying 'urgent' is likely to cause people to ignore your question rather than try to help you.

The volunteers are world-wide so the person best able to help you may be asleep or in a completely different timezone.

Please create your own question after reading the FAQ.
1 - 28
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 7 2012
Added on Oct 11 2006
28 comments
149,410 views