If you try to drop default temporary tablespace of database as it will result in error as:-
SQL>SELECT TABLESPACE_NAME FROM DBA_TEMP_FILES;
TABLESPACE_NAME
---------------
TEMP
SQL>alter tablespace temp offline;
alter tablespace temp offline
*
Error at line 1;
ORA-12905:default temporary tablepspace cannot be offline
SQL>drop tablespace temp including contents and datafiles;
drop tablespace TEMP including contents and datafiles
*
Error at line2:
ORA-12906:cannot drop default Temporary tablespace
In order to solve this problem you must assign database default tenporary tablespace to a new one. To do this create a new tempoary tablespace temp2 and then assign it to database default tablespace.
To create a new one,
SQL>create temporary tablespace temp1 tempfile'/opt/nit/temp01/dbf' size 10M;
Tablespace created.
Make this tablespace to database default temporary tablespace,
SQL>alter database default temporary tablespace temp1;
Database altered.
SQL>drop tablespace temp including contents and datafiles;
Tablespace dropped.
SQL>SELECT TABLESPACE_NAME FROM DBA_TEMP_FILES;
TABLESPACE_NAME
---------------
TEMP
SQL>alter tablespace temp offline;
alter tablespace temp offline
*
Error at line 1;
ORA-12905:default temporary tablepspace cannot be offline
SQL>drop tablespace temp including contents and datafiles;
drop tablespace TEMP including contents and datafiles
*
Error at line2:
ORA-12906:cannot drop default Temporary tablespace
In order to solve this problem you must assign database default tenporary tablespace to a new one. To do this create a new tempoary tablespace temp2 and then assign it to database default tablespace.
To create a new one,
SQL>create temporary tablespace temp1 tempfile'/opt/nit/temp01/dbf' size 10M;
Tablespace created.
Make this tablespace to database default temporary tablespace,
SQL>alter database default temporary tablespace temp1;
Database altered.
SQL>drop tablespace temp including contents and datafiles;
Tablespace dropped.
0 comments:
Post a Comment