Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>rman target sys/sys
恢复管理器: 版本9.0.1.1.1 - Production
(c) Copyright 2001 Oracle Corporation. All rights reserved.
已连接到目标数据库 (未启动)
RMAN>startup nomount
Oracle 例程已启动
总的系统全局区域为 118255568字节
Fixed Size 282576字节
Variable Size 83886080字节
Database Buffers 33554432字节
Redo Buffers 532480字节
RMAN>restore controlfile from autobackup;
启动 restore 于 24-6月 -09
正在使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: sid=10 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 06/24/2009 21:56:30
RMAN-03002: failure during compilation of command
RMAN-03013: command type: restore
RMAN-03002: failure during compilation of command
RMAN-03013: command type: IRESTORE
RMAN-06495: must explicitly specify DBID with SET DBID command
RMAN>set DBID=1141172078
正在执行命令: SET DBID
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 06/24/2009 21:59:20
RMAN-03002: failure during compilation of command
RMAN-03013: command type: CSET
RMAN-06188: cannot use command when connected to target database
RMAN>EXIT
恢复管理器完成。
C:\Documents and Settings\Administrator>RMAN
恢复管理器: 版本9.0.1.1.1 - Production
(c) Copyright 2001 Oracle Corporation. All rights reserved.
RMAN>SET DBID=1141172078
正在执行命令: SET DBID
RMAN>connect target sys/sys
连接到目标数据库: (未安装)
RMAN>startup nomunt
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 06/24/2009 22:01:05
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "auxiliary,clon
e,dba,force,mount,newline,nomount,pfile,;"
RMAN-01008: the bad identifier was: nomunt
RMAN-01007: at line 1 column 9 file: standard input
RMAN>startup nomount
数据库已经启动
RMAN>restore controlfile from autobackup;
启动 restore 于 24-6月 -09
正在使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: sid=8 devtype=DISK
通道 ORA_DISK_1, 正在查找当天控制文件自动备份:20090624
通道 ORA_DISK_1, 找到控制文件自动备份:c-1141172078-20090624-01
通道 ORA_DISK_1, 控制文件自动备份恢复已完成
正在复制控制文件
输出文件名=C:\ORACLE\ORA90\ORADATA\LAOJIU\CONTROL01.CTL
输出文件名=C:\ORACLE\ORA90\ORADATA\LAOJIU\CONTROL02.CTL
输出文件名=C:\ORACLE\ORA90\ORADATA\LAOJIU\CONTROL03.CTL
输出文件名=D:\CONTROL04.CTL
完成 restore 于 24-6月 -09
RMAN>startup mount
数据库已经启动
数据库已加载
RMAN>run{
2> allocate channel c1 device type disk;
3> restore database;
4> recover database;
5> sql 'alter database open resetlogs';
6> release channel c1;
7> }
释放的通道: ORA_DISK_1
分配的通道: c1
通道 c1: sid=8 devtype=DISK
启动 restore 于 24-6月 -09
通道 c1: 正在开始恢复数据文件备份集
通道 c1: 正在指定从备份集恢复的数据文件
正将数据文件00006恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\INDX01.DBF
正将数据文件00008恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\USERS02.DBF
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_10_1.LEV1 tag=DBL1 params=NULL
通道 c1: 恢复完成
通道 c1: 正在开始恢复数据文件备份集
通道 c1: 正在指定从备份集恢复的数据文件
正将数据文件00003恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\CWMLITE01.DBF
正将数据文件00005恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\EXAMPLE01.DBF
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_11_1.LEV1 tag=DBL1 params=NULL
通道 c1: 恢复完成
通道 c1: 正在开始恢复数据文件备份集
通道 c1: 正在指定从备份集恢复的数据文件
正将数据文件00002恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\UNDOTBS01.DBF
正将数据文件00004恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\DRSYS01.DBF
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_12_1.LEV1 tag=DBL1 params=NULL
通道 c1: 恢复完成
通道 c1: 正在开始恢复数据文件备份集
通道 c1: 正在指定从备份集恢复的数据文件
正将数据文件00001恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\SYSTEM01.DBF
正将数据文件00007恢复到C:\ORACLE\ORA90\ORADATA\LAOJIU\TOOLS01.DBF
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_13_1.LEV1 tag=DBL1 params=NULL
通道 c1: 恢复完成
完成 restore 于 24-6月 -09
启动 recover 于 24-6月 -09
正在开始介质的恢复
通道 c1: 正在启动到默认目标的存档日志恢复
通道 c1: 正在恢复存档日志
存档日志线程 =1 序列=43
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_17_1.ARCH tag=null params=NULL
通道 c1: 恢复完成
存档日志文件名 =C:\ORACLE\ORA90\ORADATA\LAOJIU\ARCHIVE\1_43.DBF 线程 =1 序列 =43
通道 c1: 正在启动到默认目标的存档日志恢复
通道 c1: 正在恢复存档日志
存档日志线程 =1 序列=44
通道 c1: 已恢复备份段 1
段 handle=F:\BAK\20090624_LAOJIU_18_1.ARCH tag=null params=NULL
通道 c1: 恢复完成
存档日志文件名 =C:\ORACLE\ORA90\ORADATA\LAOJIU\ARCHIVE\1_44.DBF 线程 =1 序列 =44
无法找到存档日志
存档日志线程 =1 序列=45
释放的通道: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 06/24/2009 22:03:24
RMAN-03002: failure during compilation of command
RMAN-03013: command type: recover
RMAN-03006: non-retryable error occurred during execution of command: recover(4)
RMAN-12004: unhandled exception during command execution on channel default
RMAN-20000: abnormal termination of job step
RMAN-06054: media recovery requesting unknown log: thread 1 scn 696910
RMAN>
SQL*Plus: Release 9.0.1.0.1 - Production on 星期三 6月 24 22:05:23 2009
(c) Copyright 2001 Oracle Corporation. All rights reserved.
SQL> conn sys/sys as sysdba
已连接。
SQL> select name from V$datafile;
NAME
--------------------------------------------------------------------------------
C:\ORACLE\ORA90\ORADATA\LAOJIU\SYSTEM01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\UNDOTBS01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\CWMLITE01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\DRSYS01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\EXAMPLE01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\INDX01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\TOOLS01.DBF
C:\ORACLE\ORA90\ORADATA\LAOJIU\USERS02.DBF
已选择8行。
SQL>
这样就应可以了!!!!!!!!!!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11782778/viewspace-607483/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11782778/viewspace-607483/