Oracle之rman数据库在非归档模式下的备份和恢复

发表于:2015-4-24 09:58

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:mybloges    来源:51Testing软件测试网采编

  2.非归档模式数据库恢复
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> startup mount
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 411042256 bytes
Database Buffers 117440512 bytes
Redo Buffers 5804032 bytes
RMAN> restore database;
Starting restore at 03-NOV-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00002 to D:\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00004 to D:\ORACLE\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: restoring datafile 00005 to D:\ORACLE\ORADATA\ORCL\TEST01.DBF channel ORA_DISK_1: restoring datafile 00006 to D:\ORACLE\ORADATA\ORCL\UNDOTBS02.DBF
channel ORA_DISK_1: reading from backup piece E:\RMAN_BAK\20111103\DF_766235030_5_1.BAK
channel ORA_DISK_1: piece handle=E:\RMAN_BAK\20111103\DF_766235030_5_1.BAK tag=TAG20111103T110349
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
Finished restore at 03-NOV-11
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/03/2011 14:10:03
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF'
RMAN> recover database;
Starting recover at 03-NOV-11
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 3246 is already on disk as file D:\ORACLE\ORADATA\ORCL\REDO03.LOG archived log for thread 1 with sequence 3247 is already on disk as file D:\ORACLE\ORADATA\ORCL\REDO01.LOG
archived log file name=D:\ORACLE\ORADATA\ORCL\REDO03.LOG thread=1 sequence=3246
archived log file name=D:\ORACLE\ORADATA\ORCL\REDO01.LOG thread=1 sequence=3247
media recovery complete, elapsed time: 00:00:09
Finished recover at 03-NOV-11
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/03/2011 14:10:30
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
RMAN> alter database open resetlogs;
database opened
22/2<12
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号