(1)创建pfile文件 --为了设置一个隐藏参数
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 598437888 bytes
Fixed Size 1338140 bytes
Variable Size 394265828 bytes
Database Buffers 197132288 bytes
Redo Buffers 5701632 bytes
SQL> create pfile='/u01/corrupt.ora' from spfile;
File created.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
(2)修改corrupt.ora文件&&修改undo_management=manual
*._allow_resetlogs_corruption=TRUE
*.audit_file_dest='/u01/oracle/admin/elvis/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/oracle/oradata/elvis/control01.ctl','/u01/oracle/flash_recovery_area/elvis/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='elvis'
*.db_recovery_file_dest='/u01/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=elvisXDB)'
*.memory_target=598736896
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.undo_management='MANUAL'
~
SQL> startup mount pfile='/u01/corrupt.ora'
ORACLE instance started.
Total System Global Area 598437888 bytes
Fixed Size 1338140 bytes
Variable Size 394265828 bytes
Database Buffers 197132288 bytes
Redo Buffers 5701632 bytes
Database mounted.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string UNDOTBS1
这个需要改为manual
SQL> alter database open;
Database altered.
创建新的undo表空间
SQL> create undo tablespace undotbs02 datafile '/u01/oracle/oradata/elvis/undotbs02.dbf' size 500m;
Tablespace created.
删除旧的undo表空间
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
TEST
UNDOTBS02
7 rows selected.
SQL> drop tablespace undotbs1 including contents and datafiles;
Tablespace dropped.
看下物理文件
[oracle@elvis elvis]$ ll
total 2080736
drwxr-xr-x 2 oracle oinstall 4096 Oct 13 19:49 bak
-rw-r----- 1 oracle oinstall 10076160 Oct 17 18:49 control01.ctl
-rw-r----- 1 oracle oinstall 52429312 Oct 17 18:37 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Oct 17 18:37 redo02.log
-rw-r----- 1 oracle oinstall 52429312 Oct 17 18:49 redo03.log
-rw-r----- 1 oracle oinstall 629153792 Oct 17 18:48 sysaux01.dbf
-rw-r----- 1 oracle oinstall 734011392 Oct 17 18:48 system01.dbf
-rw-r----- 1 oracle oinstall 71311360 Oct 8 08:50 temp01.dbf
-rw-r----- 1 oracle oinstall 52436992 Oct 17 18:37 test01.dbf
-rw-r----- 1 oracle oinstall 524296192 Oct 17 18:45 undotbs02.dbf
-rw-r----- 1 oracle oinstall 5251072 Oct 17 18:37 users01.dbf
可以看到undotbs1的表空间文件也相应的删除了
(3)使用spfile参数文件打开数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 598437888 bytes
Fixed Size 1338140 bytes
Variable Size 394265828 bytes
Database Buffers 197132288 bytes
Redo Buffers 5701632 bytes
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> alter system set undo_tablespace=undotbs02 scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 598437888 bytes
Fixed Size 1338140 bytes
Variable Size 394265828 bytes
Database Buffers 197132288 bytes
Redo Buffers 5701632 bytes
Database mounted.
Database opened.
可以看到数据库正常开启。
关于ORA-600[41XX]这种错误基本都属于Undo的错误。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30158432/viewspace-1815543/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30158432/viewspace-1815543/