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

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

999

积分

1

好友

942

主题
1#
发表于 2017-4-15 21:58:52 | 查看: 1468| 回复: 0

rman>backup database;---全备数据库
创建表 tb_time,插入数据
21:18:29 SQL> update tb_time set name='hkny-002' where id=2;
21:18:47 SQL> commit;
21:19:07 SQL> drop table tb_time;

[oracle@oracle10g ~]$ export ORACLE_SID=wilson
[oracle@oracle10g ~]$ export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
[oracle@oracle10g ~]$ export NLS_LANG="AMERICAN"
[oracle@oracle10g ~]$ rman target sys/oracle
RMAN> RUN{
2> shutdown abort;
3> startup mount;
4> SET UNTIL TIME='2011-03-11 21:18:47';
5> RESTORE DATABASE;
6> RECOVER DATABASE;
7> ALTER DATABASE OPEN RESETLOGS;}
。。。。。。。。。。。。。。。。
channel ORA_DISK_1: restored backup piece 29
piece handle=/u01/oracle/db_back/2am6vts4_29_1 tag=TAG20110311T210923
channel ORA_DISK_1: reading from backup piece /u01/oracle/db_back/2am6vts4_30_1
channel ORA_DISK_1: restored backup piece 30
piece handle=/u01/oracle/db_back/2am6vts4_30_1 tag=TAG20110311T210923
channel ORA_DISK_1: reading from backup piece /u01/oracle/db_back/2am6vts4_31_1
channel ORA_DISK_1: restored backup piece 31
piece handle=/u01/oracle/db_back/2am6vts4_31_1 tag=TAG20110311T210923
channel ORA_DISK_1: restore complete, elapsed time: 00:04:42
failover to previous backup

Finished restore at 2011-03-11 21:28:35

Starting recover at 2011-03-11 21:28:36
using channel ORA_DISK_1

starting media recovery
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 5 needs more recovery to be consistent
ORA-01110: data file 5: '/u01/oradata/wilson/example01.dbf'

media recovery complete, elapsed time: 00:00:06

Finished recover at 2011-03-11 21:28:47
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/11/2011 21:28:47
ORA-01194: file 5 needs more recovery to be consistent
ORA-01110: data file 5: '/u01/oradata/wilson/example01.dbf'

问题:1)restore成功了没有?failover to previous backup什么意思?如果有问题为什么还显示channel ORA_DISK_1: restore complete, elapsed time: 00:04:42,Finished restore at 2011-03-11 21:28:35
         2)recovery到底成没成功?
        3)出错显示ORA-01194: file 5 needs more recovery to be consistent是什么意思?怎样解决这个问题?
        先谢谢各位高手了



restore database until time '2011-03-11 21:18:47' preview;
recover database;
alter database open;
把数据库起来了
请问,1)这个应该是不完全恢复啊,为什么用alter database open resetlog;不能打开数据库呢?
          2)preview在你的语句里起什么作用啊,是不是可有可无啊?
        3)数据库打开了,可是表tb_time没了,也就是说恢复失败,怎么才能成功?



还有就是它提示的出错显示ORA-01194: file 5 needs more recovery to be consistent,我的file 5是EXAMPLE表空间,在rman中是排出备份的,
CONFIGURE EXCLUDE FOR TABLESPACE 'EXAMPLE';
CONFIGURE EXCLUDE FOR TABLESPACE 'STAGING';
请问在做不完全恢复之前,做数据库全备时,是不是应该把EXAMPLE和STAGING两个表空间的排出备份取消,在做数据库全备时,把这两个表空间也都备份进去?然后在做基于时间的不完全恢复?
下载专业ORACLE数据库恢复工具PRM-DUL  For Oracle http://www.parnassusdata.com/

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638  QQ: 47079569     邮箱:service@parnassusdata.com
您需要登录后才可以回帖 登录 | 注册

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

GMT+8, 2024-12-20 13:23 , Processed in 0.049598 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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