記一次undo問題

記一次undo問題

參考:http://www.linuxidc.com/Linux/2014-06/103780.htm

ORA-00376: 無法於此時讀取檔案 3
ORA-01110: 資料檔 3: '/THARS/system/THARSDB1/undotbs01.dbf'
ORA-06512: 在 "TNBWOMSDA1.SP_TABLE_LCM1", line 5
ORA-06512: 在 line 2

ORA-01191: 檔案 3 已為離線狀態 - 無法執行正常的離線動作
ORA-01110: 資料檔 3: '/THARS/system/THARSDB1/undotbs01.dbf'


_corrupted_rollback_segments

_offline_rollback_segments
******************************************************************************************************
SQL> drop rollback segment "_SYSSMU10_747452769$";
drop rollback segment "_SYSSMU10_747452769$"
*
ERROR at line 1:
ORA-30025: DROP segment '_SYSSMU10_747452769$' (in undo tablespace) not allowed


SQL> alter tablespace undotbs1 offline;
alter tablespace undotbs1 offline
*
ERROR at line 1:
ORA-01191: file 3 is already offline - cannot do a normal offline
ORA-01110: data file 3: '/THARS/system/THARSDB1/undotbs01.dbf'
****************************************************************************************************
首先查詢
select SEGMENT_NAME,status from dba_rollback_segs where status='NEEDS RECOVERY';
關掉數據庫
SQL> shutdown immediate    
;Database closed.
Database dismounted.
ORACLE instance shut down.
編輯oracle@THARPDB1: /oracle/product/10.2.0/dbs> vim initTHARSDB1.ora
_offline_rollback_segments=( _SYSSMU1_591994934$,_SYSSMU2_944973950$,_SYSSMU3_2970673600$,_SYSSMU4_4055853402$,_SYSSMU5_3362663108$,_SYSSMU6_791958641$,_SYSSMU7_2765916932$,_SYSSMU8_3343338762$,_SYSSMU9_943109594$,_SYSSMU10_747452769$)
SQL> create spfile from pfile
  2  ;

File created.

SQL> startup
ORACLE instance started.

Total System Global Area 1185927168 bytes
Fixed Size            2212736 bytes
Variable Size          436210816 bytes
Database Buffers      738197504 bytes
Redo Buffers            9306112 bytes
Database mounted.
Database opened.
SQL> drop tablespace undotbs1 including contents and datafiles;

Tablespace dropped.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@THARPDB1: /oracle/product/10.2.0/dbs> ls
D:MyTablespace.DBF  hc_THARSDB1.dat      lkTHALRDB1     orapwTHARSDB1           spfileTHARSDB1.ora.456
hc_DBUA0.dat        init.ora             lkTHAMRDB1     spfileTHALRDB1.ora      spfileTHARSDB1.ora_Bk
hc_THALRDB1.dat     initthamr.ora        lkTHARSDB1     spfileTHAMRDB1.ora
hc_thamr.dat        initTHARSDB1.ora     orapwTHALRDB1  spfileTHARSDB1.ora
hc_THAMRDB1.dat     initTHARSDB1.ora_bk  orapwTHAMRDB1  spfileTHARSDB1.ora.123
oracle@THARPDB1: /oracle/product/10.2.0/dbs> vim initTHARSDB1.ora
oracle@THARPDB1: /oracle/product/10.2.0/dbs> mv spfileTHARSDB1.ora spfileTHARSDB1.ora.222
oracle@THARPDB1: /oracle/product/10.2.0/dbs> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 29 17:12:35 2016

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

Connected to an idle instance.

SQL> create spfile from pfile;

File created.

SQL> startup;
ORACLE instance started.

Total System Global Area 1185927168 bytes
Fixed Size            2212736 bytes
Variable Size          436210816 bytes
Database Buffers      738197504 bytes
Redo Buffers            9306112 bytes
Database mounted.
Database opened.
SQL>

posted @ 2017-02-20 16:42  guilingyang  阅读(234)  评论(0编辑  收藏  举报