Incomplete recover-----time(删除表前没有针对该表做rman backup)
//建表,获得时间
11:05:03 sys@LEE2>create table lee2
11:28:58 2 (id int);
表已创建。
已用时间: 00: 00: 00.26
11:29:03 sys@LEE2>insert into lee2 values(1);
已创建 1 行。
已用时间: 00: 00: 00.01
11:29:12 sys@LEE2>insert into lee2 values(2);
已创建 1 行。
已用时间: 00: 00: 00.01
11:29:18 sys@LEE2>commit;
提交完成。
已用时间: 00: 00: 00.01
11:29:20 sys@LEE2>select * from lee2;
ID
----------
1
2
已用时间: 00: 00: 00.01
11:29:28 sys@LEE2>select sysdate from dual;
SYSDATE
--------------
19-6月 -08
已用时间: 00: 00: 00.01
11:49:02 sys@LEE2>alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
会话已更改。
已用时间: 00: 00: 00.00
11:49:32 sys@LEE2>select sysdate from dual;
SYSDATE
-------------------
2008-06-19 11:49:38
已用时间: 00: 00: 00.00
11:49:38 sys@LEE2>drop table lee2;
表已删除。
//rman不完全恢复
已用时间: 00: 00: 01.37
11:50:02 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
恢复管理器: Release 10.2.0.1.0 - Production on 星期四 6月 19 11:50:07 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 104861536 字节
Database Buffers 327155712 字节
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 time "to_date('2008-06-19 11:49:38','yyyy-mm-dd hh24:mi:ss')";
启动 recover 于 19-6月 -08
使用通道 ORA_DISK_1
正在开始介质的恢复
存档日志线程 1 序列 2 已作为文件 E:\ARCHIVE\LEE2\ARC00002_0657801610.001 存在于磁盘上
存档日志线程 1 序列 3 已作为文件 E:\ARCHIVE\LEE2\ARC00003_0657801610.001 存在于磁盘上
存档日志文件名 =E:\ARCHIVE\LEE2\ARC00002_0657801610.001 线程 =1 序列 =2
存档日志文件名 =E:\ARCHIVE\LEE2\ARC00003_0657801610.001 线程 =1 序列 =3
介质恢复完成, 用时: 00:00:06
完成 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 11:57:35 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
11:57:35 idle>conn /as sysdba
已连接。
11:57:39 sys@LEE2>select * from lee2;
ID
----------
1
2
已用时间: 00: 00: 00.14
11:57:44 sys@LEE2>
//ok
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11134734/viewspace-366407/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11134734/viewspace-366407/