xzh2000的个人空间

暂无签名

  • 博客访问: 596923
  • 博文数量: 494
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-25 17:00
个人简介

暂无介绍

ITPUB论坛APP

ITPUB论坛APP



APP发帖 享双倍积分

文章分类

全部博文(494)

文章存档

2008年(5)

2007年(21)

2006年(144)

2005年(291)

2004年(33)

我的朋友
微信关注

IT168企业级官微



微信号:IT168qiye



系统架构师大会



微信号:SACC2013

undotbs损坏后的恢复 2004-08-25 11:23:58

分类: IT综合技术

1 删除undotbs01.dbf
2 连接到数据库
SQL> connect sys/oracle as sysdba
Connected.
SQL> startup force
ORACLE instance started.

Total System Global Area  336662768 bytes
Fixed Size                   450800 bytes
Variable Size             117440512 bytes
Database Buffers          218103808 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/home/oracle/oradata/esal/undotbs01.dbf'
3 查看rollback_segments
SQL> show parameter rollback

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fast_start_parallel_rollback         string      LOW
max_rollback_segments                integer     37
rollback_segments                    string
transactions_per_rollback_segment    integer     5
4 修改初始化参数
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=MANUAL
undo_retention=10800
undo_tablespace=undotbs01
rollback_segments='SYSTEM'
5 启动数据库
SQL> connect sys/oracle as sysdba
Connected.
SQL> startup force
ORACLE instance started.

Total System Global Area  336662768 bytes
Fixed Size                   450800 bytes
Variable Size             117440512 bytes
Database Buffers          218103808 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/home/oracle/oradata/esal/undotbs01.dbf'


SQL> alter database /home/oracle/oradata/esal/undotbs01.dbf' offline;
alter database /home/oracle/oradata/esal/undotbs01.dbf' offline
               *
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE


SQL> alter database datafile '/home/oracle/oradata/esal/undotbs01.dbf' offline drop;

Database altered.

SQL> alter database open;

Database altered.
SQL> create spfile from pfile;

File created.

SQL> create undo tablespace undotbs1 datafile '/home/oracle/oradata/esal/undotbs01.dbf' size 200M autoextend on;
create undo tablespace undotbs1 datafile '/home/oracle/oradata/esal/undotbs01.dbf' size 200M autoextend on
*
ERROR at line 1:
ORA-01543: tablespace 'undotbs1' already exists


SQL> drop tablespace undtotbs1;
drop tablespace undtotbs1
*
ERROR at line 1:
ORA-00959: tablespace 'UNDTOTBS1' does not exist


SQL> drop tablespace undotbs1;

Tablespace dropped.

SQL> create undo tablespace undotbs1 datafile '/home/oracle/oradata/esal/undotbs01.dbf' size 200M autoextend on;

Tablespace created.

SQL> show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      MANUAL
undo_retention                       integer     10800
undo_suppress_errors                 boolean     FALSE
undo_tablespace                      string      undotbs01
SQL> alter system set undo_management=auto scope=both;
alter system set undo_management=auto scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set undo_management=auto scope=spfile;
alter system set undo_management=auto scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_retention=10800
undo_tablespace=undotbs1
#rollback_segments='SYSTEM'
"initxzh.ora" 99L, 2989C written
[oracle@WWW2 dbs]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Mon Jul 5 13:17:17 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect sys/oracle@xzh as sysdba
Connected.
SQL> startup force
ORACLE instance started.

Total System Global Area  336662768 bytes
Fixed Size                   450800 bytes
Variable Size             117440512 bytes
Database Buffers          218103808 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.

[@more@]undotbs损坏后的恢复

阅读(3380) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册