Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

2

主题
1#
发表于 2014-10-14 09:53:47 | 查看: 3616| 回复: 2

相关版本 oracle 11.2.0.4 非归档 无备份
场景1:
SQL> create table t as select * from dba_objects;

Table created.

SQL> insert into t select * from t;

86267 rows created.

在另外一窗口中,执行

[oracle@rac01 orcl]$ ll
total 1536372
-rw-r----- 1 oracle oinstall 9748480 Jul 11 16:27 control01.ctl
-rw-r----- 1 oracle oinstall 52429312 Jul 11 14:00 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Jul 11 16:27 redo02.log
-rw-r----- 1 oracle oinstall 52429312 Jul 11 06:00 redo03.log
-rw-r----- 1 oracle oinstall 545267712 Jul 11 16:27 sysaux01.dbf
-rw-r----- 1 oracle oinstall 796925952 Jul 11 16:27 system01.dbf
-rw-r----- 1 oracle oinstall 20979712 Jul 11 15:42 temp01.dbf
-rw-r----- 1 oracle oinstall 57679872 Jul 11 16:27 undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072 Jul 11 14:05 users01.dbf
[oracle@rac01 orcl]$ mv undotbs01.dbf undotbs01.dbf.bak

打开数据库出现如下错误。
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1006636072 bytes
Database Buffers 637534208 bytes
Redo Buffers 7094272 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'

分析,如果此时UNDO丢失,因为是shutdown abort的,数据库要回滚,但不见UNDO,此时,
数据库没有OPEN,不能建UNDO,不能查询哪些回滚段有问题?请大家指点。

在11g之前的版本中,回滚段名称是”_SYSTEMn$”之类,而到了11g回滚段的名称变为了”_SYSTEMn_时间戳$”,因为时间戳我们不知道,所以我们不能通过n的值,来确定回滚段的名称,从而也就不能很明确的使用_offline_rollback_segments和_corrupted_rollback_segments来标明异常回滚段。        
2#
发表于 2014-10-15 08:15:50
大神刘呢?

回复 只看该作者 道具 举报

3#
发表于 2014-10-15 11:01:10
FYI
http://www.askmaclean.com/archiv ... -open-database.html

SQL> select name from v$datafile where file#=1;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------
+DATA1/pd003/datafile/system.259.858135521

and Real Application Testing options
[oracle@mlab2 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 14 22:39:47 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PD003 (DBID=1735326005)

RMAN> copy datafile 1 to '/s01/dbf1';



[oracle@mlab2 s01]$ strings  dbf1  | grep _SYSSMU | cut -d $ -f 1 | sort -u > listSMU


[oracle@mlab2 s01]$ cat listSMU
              and substr(drs.segment_name,1,7) != '_SYSSMU'
<D'              and substr(drs.segment_name,1,7) != ''_SYSSMU'' ' );
_SYSSMU10_3271578125
_SYSSMU10_960603280
_SYSSMU11_125382609
_SYSSMU1_1240252155
_SYSSMU12_2245433549
_SYSSMU13_3242268464
_SYSSMU1_3728092404
_SYSSMU14_44821983
_SYSSMU15_1872739176
_SYSSMU16_1376564431
_SYSSMU17_1839632768
_SYSSMU18_3088942417
_SYSSMU19_2867910983
_SYSSMU20_948290921
_SYSSMU2_111974964
_SYSSMU2_2850105180
_SYSSMU3_4004931649
_SYSSMU3_4160240979
_SYSSMU4_1126976075
_SYSSMU4_348804819
_SYSSMU5_2968973961
_SYSSMU5_4011504098
_SYSSMU6_2060978448
_SYSSMU6_3654194381
_SYSSMU7_4222772309
_SYSSMU7_894058185
_SYSSMU8_3612859353
_SYSSMU8_87803851
_SYSSMU9_2370500926
_SYSSMU9_3945653786

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-21 05:56 , Processed in 0.044363 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569