oracle9i回滚段表空间丢失后的处理方法:
用隐含参数恢复数据库的例子:
具体操作步骤如下:
首先把初init.ora文件里自动管理改为手工管理,然后加入隐含参数:
#undo_management=auto
undo_tablespace=undotbs
_corrupted_rollback_segments=(_syssmu1$,_syssmu2$,_syssmu3$,_syssmu4$,_syssmu5$,_syssmu6$,_syssmu7$,_syssmu8$,_syssmu9$,_syssmu10$)
sql>startup mount (数据库启动到mount状态)
sql> alter database datafile d:\oracle\oradata\orcl\undotbs01.dbf offline drop;
database altered.
sql>alter database open;
database opened.
sql> show parameter undo
name type value
———————————— ———– ———
undo_management string manual
undo_retention integer 900
undo_suppress_errors boolean false
undo_tablespace string undotbs
sql> drop tablespace undotbs including contents;
tablespace dropped.
重建undotbs表空间:
sql> create undo tablespace undotbs datafile d:\oracle\oradata\orcl\undotbs01.dbf
size 100m;
tablespace created.
sql> shutdown immediate (关闭数据库)
database closed.
database dismounted.
oracle instance shut down.
编辑init.ora初始化参数文件,去掉隐含参数,设置
undo_management=auto
undo_tablespace=undotbs
保存init.ora文件,然后执行
sql> startup mount
oracle instance mounted.
total system global area 114061244 bytes
fixed size 282556 bytes
variable size 79691776 bytes
database buffers 33554432 bytes
redo buffers 532480 bytes
database mounted.
sql>alter database datafile d:\oracle\oradata\orcl\undotbs01.dbf online;
database altered.
sql>alter database open;
database opened.
sql> show parameter undo
name type value
———————————— ———– ——————————
undo_management string auto
undo_retention integer 900
undo_suppress_errors boolean false
undo_tablespace string undotbs