首页 | 互联网 | IT动态 | IT培训 | Cisco | Windows | Linux | Java | .Net | Oracle | 软件测试 | C/C++ | 嵌入式开发 | 存储世界 | 服务器
网络设备 | IDC | 安全 | 求职招聘 | 数字网校 | 网页设计 | 平面设计 | 技术专题 | 电子书下载 | 教学视频 | 源码下载 | 搜索 | 博客 | 论坛
中国IT实验室Oracle频道
中国IT教育
Google
首页 入门基础 安装配置 体系架构 PLSQL 备份恢复 性能调优 开发技术 资讯动态 考试认证 下载 专题 讨论
您现在的位置: 中国IT实验室 >> Oracle >> 备份恢复 >> 正文

Oracle 10g跨越Resetlogs时间点进行恢复

Starting Control File and SPFILE Autobackup at 2005-04-05 16:31:48

piece handle=/data5/flash_recovery_area/EYGLE/autobackup

/2005_04_05/o1_mf_s_554833908_154m7qps_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 2005-04-05 16:31:56

RMAN> exit

Recovery Manager complete.

二、进行数据的更改

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on

Tue Apr 5 16:32:23 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release

10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SYS AS SYSDBA on 2005-04-05 16:32:23 >alter system switch logfile;

System altered.

SYS AS SYSDBA on 2005-04-05 16:32:30 >select count(*) from t;

COUNT(*)

----------

18956

SYS AS SYSDBA on 2005-04-05 16:33:03 >insert into t select * from t;

18956 rows created.

SYS AS SYSDBA on 2005-04-05 16:33:17 >commit;

Commit complete.

SYS AS SYSDBA on 2005-04-05 16:33:19 >alter system switch logfile;

System altered.

SYS AS SYSDBA on 2005-04-05 16:33:45 >truncate table t;

Table truncated.

SYS AS SYSDBA on 2005-04-05 16:34:58 >alter system switch logfile;

System altered.

日志序列的情况如下:

SYS AS SYSDBA on 2005-04-05 16:35:00 >

select * from v$log_history where recid >1811;

RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS_TIME

---------- ---------- ---------- ---------- -------------

1812 554813757 1 1 10923677 2005-04-05 09:54:53 10925720 10923677 2005-04-05 09:54:53

1813 554813974 1 2 10925720 2005-04-05 10:55:57 10925827 10923677 2005-04-05 09:54:53

1814 554823464 1 3 10925827 2005-04-05 10:59:34 10947409 10923677 2005-04-05 09:54:53

1815 554828646 1 4 10947409 2005-04-05 13:37:44 10950318 10923677 2005-04-05 09:54:53

1816 554833748 1 5 10950318 2005-04-05 15:04:06 10953123 10923677 2005-04-05 09:54:53

1817 554833901 1 6 10953123 2005-04-05 16:29:08 10953187 10923677 2005-04-05 09:54:53

1818 554833950 1 7 10953187 2005-04-05 16:31:41 10953213 10923677 2005-04-05 09:54:53

1819 554834005 1 8 10953213 2005-04-05 16:32:30 10953633 10923677 2005-04-05 09:54:53

1820 554834118 1 9 10953633 2005-04-05 16:33:25 10953726 10923677 2005-04-05 09:54:53

9 rows selected.

关闭数据库:

SYS AS SYSDBA on 2005-04-05 16:35:18 >shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SYS AS SYSDBA on 2005-04-05 16:37:30 >exit

Disconnected from Oracle Database 10g Enterprise

Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

三、执行不完全恢复

$ rman target /

Recovery Manager: Release 10.1.0.2.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle. All rights reserved.

connected to target database (not started)

RMAN> startup mount; 

Oracle instance started

database mounted

Total System Global Area 314572800 bytes

Fixed Size 1301704 bytes

Variable Size 261890872 bytes

Database Buffers 50331648 bytes

Redo Buffers 1048576 bytes

RMAN> run {

2> set until sequence 8 thread 1;

3> restore database;

4> recover database;

5> }  

executing command: SET until clause

using target database controlfile instead of recovery catalog

Starting restore at 2005-04-05 16:39:17

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=160 devtype=DISK

datafile 8 not processed because file is read-only

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /opt/oracle/oradata/eygle/system01.dbf

restoring datafile 00002 to /opt/oracle/oradata/eygle/undotbs01.dbf

restoring datafile 00003 to /opt/oracle/oradata/eygle/sysaux01.dbf

restoring datafile 00006 to /opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_test_03xv34ny_.dbf

restoring datafile 00009 to /data1/oradata/systemfile/bigtbs.dbf

restoring datafile 00010 to /opt/oracle/oradata/eygle/dfmbrc.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=/data5/flash_recovery_area/EYGLE/backupset

/2005_04_05/o1_mf_nnndf_TAG20050405T162921_154m33kf_.bkp tag=TAG20050405T162921

channel ORA_DISK_1: restore complete

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00004 to /opt/oracle/oradata/eygle/users01.dbf

restoring datafile 00005 to /data1/oradata/systemfile/eygle01.dbf

restoring datafile 00007 to /opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_itpub_03xv5g66_.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=/data5/flash_recovery_area/EYGLE/backupset

/2005_04_05/o1_mf_nnndf_TAG20050405T162921_154m6dxm_.bkp

tag=TAG20050405T162921

channel ORA_DISK_1: restore complete

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00011 to /opt/oracle/oradata/eygle/t2k01.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=/data5/flash_recovery_area/EYGLE/backupset

/2005_04_05/o1_mf_nnndf_TAG20050405T162921_154m76kz_.bkp

tag=TAG20050405T162921

channel ORA_DISK_1: restore complete

Finished restore at 2005-04-05 16:41:45

上一页  [1] [2] [3] [4] 下一页

【责编:Ken】

中国IT教育

相关产品和培训
文章评论
 友情推荐链接
 认证培训
 专题推荐

 ·关于Java框架技术专题
 ·XML全攻略技术专题
 ·JAVA开源技术介绍专题
 ·Java嵌入式开发之J2ME技术专题
 ·超前体验 Oracle 11g的5个新特性…
 ·揭密使用VB.NET的五个实用技巧
 ·Oracle和SQL Server常用函数对比专题…
 ·展现C#世界 C#程序设计专题…
 ·Java入门 Tomcat的配置技巧精华专题…
 ·Oracle RMAN物理备份技术详解…
 今日更新
 社区讨论
 博客论点
 频道精选
 Oracle频道相关导航