Total Pageviews

Monday 18 May 2015

Undo tablespace datafile dropped or corrupted

SQL> select file_name from dba_data_files ; 

FILE_NAME
--------------------------------------------------------------------------------
/data01/app/oracle/datafiles/racdb/users01.dbf
/data01/app/oracle/datafiles/racdb/undotbs01.dbf
/data01/app/oracle/datafiles/racdb/sysaux01.dbf
/data01/app/oracle/datafiles/racdb/system01.dbf

SQL>
SQL>
SQL>rm /data01/app/oracle/datafiles/racdb/undotbs01.dbf

Database will crash here with below alert log error . 

Alert Log:
===========
Errors in file /data01/app/oracle/diag/rdbms/racdb/racdb/trace/racdb_dbw0_3249.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/data01/app/oracle/datafiles/racdb/undotbs01.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /data01/app/oracle/diag/rdbms/racdb/racdb/trace/racdb_ora_3364.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/data01/app/oracle/datafiles/racdb/undotbs01.dbf'
ORA-1157 signalled during: alter database open ...




[oracle@DB11G ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon May 18 07:35:15 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount ;
ORACLE instance started.

Total System Global Area  563728384 bytes
Fixed Size    2230272 bytes
Variable Size  171968512 bytes
Database Buffers  385875968 bytes
Redo Buffers    3653632 bytes
Database mounted.

SQL> alter database open ;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/data01/app/oracle/datafiles/racdb/undotbs01.dbf'

SQL> alter database datafile  '/data01/app/oracle/datafiles/racdb/undotbs01.dbf' offline drop ;

SQL> alter system set undo_management=manual scope=spfile;

System altered.

SQL> shu immediate ;
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.

----> we will resolve this error later first create new undo and start database asap ,

SQL> drop tablespace undotbs1; 
drop tablespace undotbs1
*
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU1_1240252155$' found, terminate
dropping tablespace

SQL> create UNDO tablespace undotbs2 datafile '/data01/app/oracle/datafiles/racdb/undotbs03.dbf' size 50M ;

Tablespace created.

SQL>  alter system set undo_management = auto scope=spfile;

System altered.

SQL> show parameter undo ;

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management     string MANUAL
undo_retention     integer 900
undo_tablespace     string UNDOTBS1


SQL> shu immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup ;
ORACLE instance started.

Total System Global Area  563728384 bytes
Fixed Size    2230272 bytes
Variable Size  171968512 bytes
Database Buffers  385875968 bytes
Redo Buffers    3653632 bytes
Database mounted.
Database opened.
SQL> Alter system set undo_tablespace=undotbs2 ;

System altered.

SQL> show parameter undo ;

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management     string AUTO
undo_retention     integer 900
undo_tablespace     string UNDOTBS2

SQL> drop tablespace undotbs1;
drop tablespace undotbs1
*
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU1_1240252155$' found, terminate
dropping tablespace


SQL> drop rollback segment '_SYSSMU1_1240252155$' ;
drop rollback segment '_SYSSMU1_1240252155$'
                      *
ERROR at line 1:
ORA-02175: invalid rollback segment name

SQL> select segment_name,status,tablespace_name from dba_rollback_segs where status like '%RECOVERY%' ;

SEGMENT_NAME           STATUS   TABLESPACE_NAME
------------------------------ ---------------- ------------------------------
_SYSSMU1_1240252155$   NEEDS RECOVERY UNDOTBS1
_SYSSMU2_1240252155$   NEEDS RECOVERY UNDOTBS1
_SYSSMU3_4004931649$       NEEDS RECOVERY UNDOTBS1
_SYSSMU4_1126976075$       NEEDS RECOVERY UNDOTBS1
_SYSSMU5_4011504098$       NEEDS RECOVERY UNDOTBS1
_SYSSMU6_3654194381$       NEEDS RECOVERY UNDOTBS1
_SYSSMU7_4222772309$       NEEDS RECOVERY UNDOTBS1
_SYSSMU8_3612859353$       NEEDS RECOVERY UNDOTBS1
_SYSSMU9_3945653786$       NEEDS RECOVERY UNDOTBS1
_SYSSMU10_3271578125$       NEEDS RECOVERY UNDOTBS1



SQL> shu immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup ;
ORACLE instance started.

Total System Global Area  563728384 bytes
Fixed Size    2230272 bytes
Variable Size  171968512 bytes
Database Buffers  385875968 bytes
Redo Buffers    3653632 bytes
Database mounted.
Database opened.
SQL> create pfile from spfile ;

File created.

Edit pfile and start instance using pfile :

*._offline_rollback_segments=(_SYSSMU1_1240252155$,_SYSSMU2_111974964$,_SYSSMU3_4004931649$,_SYSSMU4_1126976075$,_SYSSMU5_4011504098$,_SYSSMU6_3654194381$,_SYSSMU7_4222772309$,_SYSSMU8_3612859353$,_SYSSMU9_3945653786$,_SYSSMU10_3271578125$)


SQL> drop tablespace undotbs1;

Tablespace dropped.

SQL> create spfile from pfile ;

File created.

SQL> select segment_name,status,tablespace_name from dba_rollback_segs ;

SEGMENT_NAME       STATUS TABLESPACE_NAME
------------------------------ ---------------- ------------------------------
SYSTEM       ONLINE SYSTEM
_SYSSMU30_2181141343$       ONLINE UNDOTBS2
_SYSSMU29_4137772411$       ONLINE UNDOTBS2
_SYSSMU28_1117717027$       ONLINE UNDOTBS2
_SYSSMU27_1646655687$       ONLINE UNDOTBS2
_SYSSMU26_73850059$       ONLINE UNDOTBS2
_SYSSMU25_1059101193$       ONLINE UNDOTBS2
_SYSSMU24_1011611768$       ONLINE UNDOTBS2
_SYSSMU23_1356515410$       ONLINE UNDOTBS2
_SYSSMU22_2758924745$       ONLINE UNDOTBS2
_SYSSMU21_480817652$       ONLINE UNDOTBS2

11 rows selected.

SQL> show parameter undo ; 

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management     string AUTO
undo_retention     integer 900
undo_tablespace     string UNDOTBS2

Create spfile from pfile bounce db and start it using spfile now . 

1 comment:

  1. Jadwal Sabung Ayam Online SV388 22 Februari 2019 di Situs Judi Sabung Ayam Online Melalui Agen Resmi Taruhan Sabung Ayam Live Asli Thailand.

    Jumat, Palangkaraya 22 Februari 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete