Incomplete recover---scn
(建表lee2后rman没有针对lee2备份)
//建表lee2,获得scn,删除表(之前没有rman针对lee2的备份)
C:\Documents and
Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production
on星期四6月19 15:06:04 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
15:06:04 idle>conn /as sysdba
已连接。
15:06:09
sys@LEE2>create table lee2
15:06:19 2 (id int);
表已创建。
已用时间: 00: 00: 00.23
15:06:24 sys@LEE2>insert into lee2
values(1);
已创建1行。
已用时间: 00: 00: 00.00
15:06:48 sys@LEE2>insert into lee2 values(2);
已创建1行。
已用时间: 00: 00: 00.00
15:06:51 sys@LEE2>commit;
提交完成。
已用时间: 00: 00: 00.00
15:06:53 sys@LEE2>select * from lee2;
ID
----------
1
2
已用时间: 00: 00: 00.00
15:07:09 sys@LEE2>select current_scn
from v$database;
CURRENT_SCN
-----------
641621
已用时间: 00: 00: 00.04
15:07:29 sys@LEE2>drop table lee2;
表已删除。
已用时间: 00: 00: 01.23
15:07:40 sys@LEE2>select * from lee2;
select * from lee2
*
第1行出现错误:
ORA-00942:表或视图不存在
已用时间: 00: 00: 00.03
15:07:43 sys@LEE2>exit;
从Oracle
Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining
options断开
C:\Documents and Settings\Administrator>
// rman不完全恢复
C:\Documents and
Settings\Administrator>rman
恢复管理器: Release
10.2.0.1.0 - Production on星期四6月19 15:09:34
2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target/
连接到目标数据库: LEE2
(DBID=2813054007)
RMAN>shutdown
immediate
使用目标数据库控制文件替代恢复目录
数据库已关闭
数据库已卸载
Oracle实例已关闭
RMAN>startup mount
已连接到目标数据库(未启动)
Oracle实例已启动
数据库已装载
系统全局区域总计 440401920字节
Fixed Size 1249440字节
Variable Size 113250144字节
Database Buffers 318767104字节
Redo Buffers 7135232字节
RMAN>restore
database;
启动restore于19-6月-08
分配的通道:
ORA_DISK_1
通道ORA_DISK_1:
sid=155 devtype=DISK
通道ORA_DISK_1:正在开始恢复数据文件备份集
通道ORA_DISK_1:正在指定从备份集恢复的数据文件
正将数据文件00001恢复到E:\ORACLE\PRODUCT\10.2.0\ORADATA\LEE2\SYSTEM01.DBF
正将数据文件00002恢复到E:\ORACLE\PRODUCT\10.2.0\ORADATA\LEE2\UNDOTBS01.DBF
正将数据文件00003恢复到E:\ORACLE\PRODUCT\10.2.0\ORADATA\LEE2\SYSAUX01.DBF
正将数据文件00004恢复到E:\ORACLE\PRODUCT\10.2.0\ORADATA\LEE2\USERS01.DBF
通道ORA_DISK_1:正在读取备份段E:\BACKUP\LEE2\BACKUP_0CJJAH86_1_1
通道ORA_DISK_1:已恢复备份段1
段句柄=
E:\BACKUP\LEE2\BACKUP_0CJJAH86_1_1标记= TAG20080619T105502
通道ORA_DISK_1:恢复完成,用时: 00:00:56
完成restore于19-6月-08
RMAN>recover
database until scn 641621;
启动recover于19-6月-08
使用通道ORA_DISK_1
正在开始介质的恢复
存档日志线程1序列2已作为文件E:\ARCHIVE\LEE2\ARC00002_0657801610.001存在于磁盘上
存档日志线程1序列3已作为文件E:\ARCHIVE\LEE2\ARC00003_0657801610.001存在于磁盘上
存档日志线程1序列1已作为文件E:\ARCHIVE\LEE2\ARC00001_0657803006.001存在于磁盘上
存档日志线程1序列1已作为文件E:\ARCHIVE\LEE2\ARC00001_0657806224.001存在于磁盘上
存档日志文件名=E:\ARCHIVE\LEE2\ARC00002_0657801610.001线程=1序列=2
存档日志文件名=E:\ARCHIVE\LEE2\ARC00003_0657801610.001线程=1序列=3
存档日志文件名=E:\ARCHIVE\LEE2\ARC00001_0657803006.001线程=1序列=1
存档日志文件名=E:\ARCHIVE\LEE2\ARC00001_0657806224.001线程=1序列=1
介质恢复完成,用时: 00:00:10
完成recover于19-6月-08
RMAN> alter database open resetlogs;
数据库已打开
RMAN> exit
恢复管理器完成。
C:\Documents and
Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production
on星期四6月19 15:14:03 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
15:14:03 idle>conn /as sysdba
已连接。
15:14:09 sys@LEE2>select * from lee2;
ID
----------
1
2
已用时间: 00: 00: 00.04
15:14:13 sys@LEE2>