SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
Oracle instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 9848225792 bytes
Fixed Size 2037000 bytes
Variable Size 1493175032 bytes
Database Buffers 8338276352 bytes
Redo Buffers 14737408 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open RESETLOGS;
Database altered.
SQL> select instance_name,status from v$Instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl OPEN
创建临时文件
SQL> alter tablespace temp add tempfile '/oracle/oradata/orcl/temp01.dbf' size 512M;
alter tablespace temp add tempfile '/oracle/oradata/orcl/temp01.dbf' size 512M
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01552: cannot use system rollback segment for non-system tablespace
'GOLDENGATE'
ORA-06512: at line 993
ORA-01552: cannot use system rollback segment for non-system tablespace
'GOLDENGATE'
SQL> create temporary tablespace temp01 tempfile '/oracle/oradata/orcl/temp01.dbf' size 512M;
create temporary tablespace temp01 tempfile '/oracle/oradata/orcl/temp01.dbf' size 512M
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01552: cannot use system rollback segment for non-system tablespace
'GOLDENGATE'
ORA-06512: at line 993
ORA-01552: cannot use system rollback segment for non-system tablespace
'GOLDENGATE'
undo_management参数说明:
决定数据库使用的回滚段是否使用自动管理模式,auto表示自动管理,manual表示手动管理
auto服务器自动管理重做段的创建、分配和调整
manaul手工管理重做段的创建、分配和调整。
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> alter system set undo_management=auto scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 9848225792 bytes
Fixed Size 2037000 bytes
Variable Size 1493175032 bytes
Database Buffers 8338276352 bytes
Redo Buffers 14737408 bytes
Database mounted.
Database opened.
SQL> create temporary tablespace temp01 tempfile '/oracle/oradata/orcl/temp01.dbf' size 1G;
Tablespace created.
查看损坏数据块中的数据
SQL> select owner,SEGMENT_NAME,SEGMENT_TYPE from dba_extents where file_id=71 and block_id between 178367 and 194710;
OWNER SEGMENT_NAME SEGMENT_TYPE
------------------------------ --------------------------------------------------------------------------------- ------------------
DZG SYS_LOB0000051457C00011$$ LOB PARTITION
DZG SYS_LOB0000051457C00011$$ LOB PARTITION
SQL> select owner,table_name from dba_lobs where SEGMENT_NAME='SYS_LOB0000051457C00011$$';
OWNER TABLE_NAME
------------------------------ ------------------------------
DZG DZG_FILEARC
