分类: Oracle
2010-09-29 21:27:20
没有备份undo空间,以后恢复时,新建一个undo空间
undo在数据库open的时候会做一个后滚的操作。
而如果shutdown immediate是会隐含一个checkpoint的,并且会自动rollback没有提交的事务,那么下次启动undo就不需要拿来rollback。
这个时候,我们就可以不需要undo了。
例如:
SQL> update hao set object_name='hao';
182272 rows updated.
另一个session:
SQL> shutdown immediate;
Database closed.
Database dismounted.
instance shut down.
\mv undo01_01.dbf undo01_01.dbf.bak
SQL> startup mount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 2035984 bytes
Variable Size 130027248 bytes
Database Buffers 176160768 bytes
Redo Buffers 6348800 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/oracle/xxx/xxx/haozhu/data/undo01_01.dbf'
SQL> alter database datafile 7 offline;
Database altered.
SQL> alter database open;
Database altered.
SQL> alter tablespace UNDOTBS01 add datafile '/oracle/xxx/xxx/haozhu/data/undo01_02.dbf' size 10m;
Tablespace altered.