« Gmail的Pop支持 | Blog首页 | 如何在其他Session跳过被锁定的记录 »
如何重建UNDO TABLESPACE
作者:eygle | 【转载请注出处】|【云和恩墨 领先的zData数据库一体机 | zCloud PaaS云管平台 | SQM SQL审核平台 | ZDBM 数据库备份一体机】
链接:https://www.eygle.com/archives/2005/03/ecioeoeundo_tab.html
纯属笔记。链接:https://www.eygle.com/archives/2005/03/ecioeoeundo_tab.html
MSN上有朋友问到,在迁移(同平台)的时候由于空间问题,他不打算要现在的UNDO文件,想要重建一个。他打算使用_corrupted_rollback_segments参数。
现在他拥有一个冷备份。
拥有冷备份,那么我们知道这个操作是很简单的,也不用隐含参数:
C:\Documents and Settings\gqgai>sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.6.0 - Production on Fri Mar 4 20:55:59 2005 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.6.0 - Production 20:55:59 SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. 20:56:14 SQL> startup ORACLE instance started. Total System Global Area 59842188 bytes Fixed Size 454284 bytes Variable Size 33554432 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes Database mounted. ORA-01157: cannot identify/lock data file 2 - see DBWR trace file ORA-01110: data file 2: 'D:\ORADATA\EYGLE\UNDOTBS01.DBF' 20:59:28 SQL> alter database datafile 'D:\ORADATA\EYGLE\UNDOTBS01.DBF' offline drop; Database altered. Elapsed: 00:00:00.00 20:59:34 SQL> alter database open; Database altered. Elapsed: 00:00:02.04 20:59:40 SQL> select name from v$datafile; NAME ------------------------------------------------------- D:\ORADATA\EYGLE\SYSTEM01.DBF D:\ORADATA\EYGLE\UNDOTBS01.DBF D:\ORADATA\EYGLE\PERFSTAT01.DBF D:\ORADATA\EYGLE\EYGLE.DBF 21:00:55 SQL> create undo tablespace undotbs2 21:01:03 2 datafile 'd:\oradata\eygle\undotbs2.dbf' size 10M; Tablespace created. Elapsed: 00:00:02.02 21:06:29 SQL> ALTER SYSTEM SET undo_tablespace='UNDOTBS2' ; System altered. Elapsed: 00:00:00.01
需要注意的是,如果使用pfile而不是spfile,我以前的一个案例就可以参考:
Oracle诊断案例-Spfile案例一则
历史上的今天...
>> 2011-03-04文章:
>> 2010-03-04文章:
>> 2008-03-04文章:
>> 2007-03-04文章:
Oracle诊断案例-Spfile案例一则
历史上的今天...
>> 2011-03-04文章:
>> 2010-03-04文章:
>> 2008-03-04文章:
>> 2007-03-04文章:
By eygle on 2005-03-04 21:28 | Comments (4) | Backup&Recovery | 196 |
我现在有热备(热备没有备UNDO表空间),及热备后的所有归档,及当前日志,数据库是shutdown abort。但我的UNDO表空间下的所有数据文件全丢了,如何进行恢复?
热备没有备UNDO表空间,你这个热备等于没有啊.
现在已经不能使用常规手段恢复了.
:59:28 SQL> alter database datafile 'D:\ORADATA\EYGLE\UNDOTBS01.DBF' offline drop;
Database altered.
Elapsed: 00:00:00.00
20:59:34 SQL> alter database open;
eygle:删除了undo表空间还可以open数据库吗?谢谢!
:59:28 SQL> alter database datafile 'D:\ORADATA\EYGLE\UNDOTBS01.DBF' offline drop;
Database altered.
Elapsed: 00:00:00.00
20:59:34 SQL> alter database open;
eygle:删除了undo表空间还可以open数据库吗?谢谢!