ORA-01667: cannot add any more tablespaces: limit of exceeded
If your database version is higher than 8 suppose 10.2g then when MAXDATAFILES of your control file reached then MAXDATAFILES parameter would expand automatically unless you hit bug.
However if you are before 8 then while creating any tablespace and while adding a datafile to a tablespace you may get ORA-01667: cannot add any more tablespaces: limit of exceeded
How to Solve the Problem
Whenever you get ORA-01667 then your DB_FILES parameter have good settings and as you have older version of oracle , so your controlfile could not automatically expanded. So the solution is to either recreate the controlfile or recreate the database.
There is MAXDATAFILES parameter in the control file. Your total number of database datafiles exceed MAXDATAFILES limit. You have to enlarge it. Here is the procedure.
1)Take a text backup of the controlfile.
SQL> alter database backup controlfile to trace as '/oradata2/1.ctl'
2)Open the backup controlfile and edit it
$ vi /oradata2/1.ctl
MAXDATAFILES 100 --Edit it
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
Delete all lines after this. You can press dG in vi editor to delete rest of lines.
In the text backup of controlfile you can see two versions of the controlfile. NORESETLOGS version and RESETLOGS version. Remove RESETLOGS version.
3)Save it and shutdown database.
SQL> shutdown abort;
4)Execute the saved controlfile script.
@/oradata2/1.ctl
Now you can add more datafile to your database up to MAXDATAFILES.
However if you are before 8 then while creating any tablespace and while adding a datafile to a tablespace you may get ORA-01667: cannot add any more tablespaces: limit of exceeded
How to Solve the Problem
Whenever you get ORA-01667 then your DB_FILES parameter have good settings and as you have older version of oracle , so your controlfile could not automatically expanded. So the solution is to either recreate the controlfile or recreate the database.
There is MAXDATAFILES parameter in the control file. Your total number of database datafiles exceed MAXDATAFILES limit. You have to enlarge it. Here is the procedure.
1)Take a text backup of the controlfile.
SQL> alter database backup controlfile to trace as '/oradata2/1.ctl'
2)Open the backup controlfile and edit it
$ vi /oradata2/1.ctl
MAXDATAFILES 100 --Edit it
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
Delete all lines after this. You can press dG in vi editor to delete rest of lines.
In the text backup of controlfile you can see two versions of the controlfile. NORESETLOGS version and RESETLOGS version. Remove RESETLOGS version.
3)Save it and shutdown database.
SQL> shutdown abort;
4)Execute the saved controlfile script.
@/oradata2/1.ctl
Now you can add more datafile to your database up to MAXDATAFILES.
Comments
Post a Comment