ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type

I faced an error last night when I was going to start my 12c database on upgrade mode  to upgrade 19c.
 

ERROR:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Process ID: 3714866
Session ID: 434 Serial number: 1850
ORA-00603: ORACLE server session terminated by fatal error

 

REASON:
ORA-30012 means that the default UNDO tablespace you specified in SPFILE or PFILE does not exist, or it's not an UNDO tablespace essentially. Therefore, the database fails to startup.

SOLUTION:
We should identify and set the correct undo tablespace name.

 

ACTION:
1. log in the database on mount mode

 

SQL> startup mount;
ORACLE instance started.
 
Total System Global Area 1.2482E+10 bytes
Fixed Size                  8939000 bytes
Variable Size            1744830464 bytes
Database Buffers         1.0704E+10 bytes
Redo Buffers               24612864 bytes
Database mounted.
 

2. check valid tablespace and identify correct undo tablespace name

 
SQL> select name from v$tablespace order by 1;
 
NAME
------------------------------
UNDOTBS2
USERS
 
 

3. set the correct undo tablespace


SQL> alter system set undo_tablespace=UNDOTBS2 scope=spfile;
 
System altered.

NOTE:
In some case, the tablespace name is correct. So it must be another issue, we have to switch UNDO_TABLESPACE back to the original one with SCOPE=SPFILE.
 
Example
SQL> select name from v$tablespace order by 1;
 
NAME
------------------------------
UNDOTBS1
USERS
 
SQL> alter system set undo_tablespace=UNDOTBS1 scope=spfile;
 
System altered.
 
Then need to recreate the  Tablespace as UNDO and Set Correct UNDO_TABLESPACE then Restart Database
 
 

4. restart database

 
SQL> shutdown immediate;
ORA-01109: database not open
 
 
Database dismounted.
ORACLE instance shut down.

SQL> startup upgrade;
ORACLE instance started.
 
Total System Global Area 1.2482E+10 bytes
Fixed Size                  8939000 bytes
Variable Size            1744830464 bytes
Database Buffers         1.0704E+10 bytes
Redo Buffers               24612864 bytes
Database mounted.
Database opened.
 

5. check instance status

 
SQL> select VERSION, STATUS from v$instance;
 
 VERSION           STATUS
----------------- ------------
19.0.0.0.0        OPEN MIGRATE
 
SQL>
 
 

Comments

Popular posts from this blog

[FATAL] [DBT-10503] Template file is not specified

Resolving ORA-10635 and ORA-39171 Errors During BLOB Tablespace Maintenance

How to resolve RMAN-06035: wrong version of recover.bsq, expecting 11.2.0.4, found 11.2.0.2