This is one of the questions I received when I faced my first interview as an Oracle DBA. This is quite a challenging question if you are not strong or aware of Table Space Management Concepts.
The answer to the above question is:
Oracle 10g and prior versions:
In Oracle 10g database and older database versions, you will have to recreate the TEMP data file. So you will have to recreate another TEMP data file and set as as the default Temporary data file or resize the original temporary data file to a larger size
Oracle 11g and later versions:
In Oracle 11g, we have a new feature to tackle this issue. We need not recreate the TEMP data file instead we have to shrink the TEMP data file. Yes, you heard it right ! We have to shrink it to allocate more space for the TEMP data file. To shrink the Temp Data file, please find the below command to do it:
ALTER TABLESPACE NAME_of_TEMP_DF SHRINK TEMPFILE '/u02/oracle/data/NAME_of_TEMP_DF SHRINK.dbf';
Example:
ALTER TABLESPACE TEMP01 SHRINK TEMPFILE '/u02/oracle/data/TEMP01.dbf';
Now you have learnt a new feature called Shrinking introduced in Oracle 11g. Please share this post if you find it useful and it may help some other DBA someday.
Now you have learnt a new feature called Shrinking introduced in Oracle 11g. Please share this post if you find it useful and it may help some other DBA someday.
0 comments