一.为了打开数据库,首先想到的是将坏的日志清除掉,但是:
- SQL> alter database clear unarchived logfile group 3 ;
- SQL> alter database clear unarchived logfile group 3 unrecoverable datafile;
- alter database clear unarchived logfile group 3 unrecoverable datafile
二.系统Oracle UNDO表空间的重建
1. 创建新的Oracle UNDO表空间
- CREATE UNDO TABLESPACE "UNDOTEMP"
- DATAFILE 'G:\ORACLE\ORADATA\HOME\UNDOTEMP.ora' SIZE 5M
- CREATE UNDO TABLESPACE "UNDOTEMP" DATAFILE
- '/home/oracle/oradata/oracle9/UNDOTEMP.ora' SIZE 50M
2. 在OEM控制台修改系统默认的Oracle UNDO表空间名,由UNDOTBS改为UNDOTEMP,或通过下面的命令修改默认Oracle UNDO表空间的标识
- ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTEMP
3. 删除原来的系统默认Oracle UNDO表空间,并重建UNDOTBS
- DROP TABLESPACE "UNDOTBS1" INCLUDING CONTENTS AND DATAFILES
4. 在OEM控制台修改系统默认的Oracle UNDO表空间名,由 UNDOTEMP 改为 UNDOTBS,改回原有的Oracle UNDO表空间标识
- ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS
5. 删除临时创建的Oracle UNDO表空间UNDOTEMP
- DROP TABLESPACE "UNDOTEMP" INCLUDING CONTENTS AND DATAFILES
三.ORACLE 9I 重建 TEMP 表空间
1.startup:启动数据库
2.create temporary tablespace TEMP_TEMP TEMPFILE '/home/oracle/oradata/oracle9/temp_temp.dbf' SIZE 128M REUSE AUTOEXTEND
ON NEXT 640K MAXSIZE UNLIMITED:创建中转临时表空间
3.alter database default temporary tablespace TEMP_TEMP:改变缺省临时表空间 为刚刚创建的新临时表空间temp2
4.drop tablespace temp including contents and datafiles:删除原来临时表空间
5.create temporary tablespace TEMP TEMPFILE '/home/oracle/oradata/oracle9/temp01.dbf' SIZE 512M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED:重新创建临时表空间
6.alter database default temporary tablespace temp:重置缺省临时表空间
【编辑推荐】