Asked By
Joseph King
270 points
N/A
Posted on - 05/12/2011
Hi,
I have a user created in Oracle by the name "joseph". The initial table space was named as "tspjoseph" which used a data file named "josephtsp.dbf". Unfortunately, I set the size to 1GB which is not full filling the requirement. My whole software is up and the database is also filled with important data. Is there any way I can increase it, without affecting the current data?
How to increase default table space size of a custom Oracle?
First of all, commit all your required changes and take a backup if possible. Connect to sys as sysdba. You can set the datafile to be auto expandable, In order to do so issue something like:
alter database datafile 'josephtsp.dbf' autoextend on maxsize 2024M;Â
This shall increase the capacity of josephtsp to 2GB.
How to increase default table space size of a custom Oracle?
Wow! that was easy! Thanks a lot. But I realized one more problem. What if my hard disk partition reaches limit? Is it possible to create a new data file separately but linked to the same table space?
How to increase default table space size of a custom Oracle?
Yes it is. You just need to add another datafile to the current tablespace using something like :
ALTER TABLESPACE <tablespacename>
ADD DATAFILEÂ '<name of datafile>.dbf '
SIZE <size you want>M;
How to increase default table space size of a custom Oracle?
I am using this:
ALTER TABLESPACE tspjoseph ADD DATAFILE "d:josephtsp2.dbf" SIZE 1000M
which is giving the error:
ERROR at line 1:
ORA-02236: invalid file name
How to increase default table space size of a custom Oracle?
It will be a single quotation.
ALTER TABLESPACE TSPJOSEPH ADD DATAFILE 'D:josephtsp2.dbf' SIZE 1024M;
How to increase default table space size of a custom Oracle?
Thanks a lot Tech. That was amazing.