12
返回列表 发新帖
楼主: lues

我的rman定点恢复以后,就无法再次定点恢复了(因为原来帖子有点长,所以在开一贴,还

[复制链接]
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
11#
发表于 2004-12-23 17:23 | 只看该作者
在rman的手冊中,有一章是說:
Performing Point-in-Time Recovery with Recovery Manager
的,你可以看看,它可以只恢復這個tablespace而不影響整個數據庫。

使用道具 举报

回复
论坛徽章:
0
12#
 楼主| 发表于 2004-12-23 17:29 | 只看该作者
谢谢大家

最初由 lues 发布
[B]

偶用until time之前有一个数据库全备,我现在试试 [/B]


以下是我的备份集

[root@test7 rman]# ll -rth
总用量 8.4G
-rw-r-----    1 oracle   oinstall     623M 12月 22 13:48 SZDB_1_545579276
-rw-r-----    1 oracle   oinstall     1.5G 12月 22 13:54 SZDB_1_545579496.bak
-rw-r-----    1 oracle   oinstall     1.5G 12月 22 13:57 SZDB_1_545579683.bak
-rw-r-----    1 oracle   oinstall     623M 12月 22 13:59 SZDB_1_545579886.bak
-rw-r-----    1 oracle   oinstall     623M 12月 22 14:01 SZDB_1_545580042.bak
-rw-r-----    1 oracle   oinstall     1.5G 12月 22 14:06 SZDB_1_545580240.bak
-rw-r-----    1 oracle   oinstall     1.3M 12月 22 14:07 0ug89pd3_1_1_30.bak
-rw-r-----    1 oracle   oinstall     623M 12月 22 14:17 SZDB_1_545580979.bak
-rw-r-----    1 oracle   oinstall     1.5G 12月 22 14:19 SZDB_1_545581077.bak
-rw-r-----    1 oracle   oinstall     775K 12月 22 14:20 14g89q52_1_1_36.bak

SZDB_1_545581077.bak是我最后一次备份,不过在我前面操作了以后,最后一次备份集无法使用

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     236000356 bytes

Fixed Size                      451684 bytes
Variable Size                201326592 bytes
Database Buffers              33554432 bytes
Redo Buffers                    667648 bytes

RMAN>  run{
2> allocate channel c1 type disk;
3> set until time "to_date('2004-12-22 14:17:00','yyyy-mm-dd hh24:mi:ss')";
4>  restore database;
5> recover database;
6> sql 'ALTER DATABASE OPEN RESETLOGS';
7> release channel c1;
8> }

allocated channel: c1
channel c1: sid=8 devtype=DISK

executing command: SET until clause

Starting restore at 23-DEC-04

channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/oradata/szdb/system01.dbf
restoring datafile 00002 to /oracle/oradata/szdb/undotbs01.dbf
restoring datafile 00003 to /oracle/oradata/szdb/cwmlite01.dbf
restoring datafile 00004 to /oracle/oradata/szdb/drsys01.dbf
restoring datafile 00005 to /oracle/oradata/szdb/example01.dbf
restoring datafile 00006 to /oracle/oradata/szdb/indx01.dbf
restoring datafile 00007 to /oracle/oradata/szdb/odm01.dbf
restoring datafile 00008 to /oracle/oradata/szdb/tools01.dbf
restoring datafile 00009 to /oracle/oradata/szdb/users01.dbf
restoring datafile 00010 to /oracle/oradata/szdb/xdb01.dbf
channel c1: restored backup piece 1
piece handle=/opt/rman/SZDB_1_545580240.bak tag=TAG20041222T140359 params=NULL
channel c1: restore complete
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00011 to /oracle/oradata/szdb/GAME.dbf
channel c1: restored backup piece 1
piece handle=/opt/rman/SZDB_1_545580979.bak tag=TAG20041222T141619 params=NULL
channel c1: restore complete
Finished restore at 23-DEC-04

Starting recover at 23-DEC-04

starting media recovery

archive log thread 1 sequence 33 is already on disk as file /oracle/oradata/szdb/archive/1_33.dbf
channel c1: starting archive log restore to default destination
channel c1: restoring archive log
archive log thread=1 sequence=32
channel c1: restored backup piece 1
piece handle=/opt/rman/0ug89pd3_1_1_30.bak tag=TAG20041222T140730 params=NULL
channel c1: restore complete
archive log filename=/oracle/oradata/szdb/archive/1_32.dbf thread=1 sequence=32
archive log filename=/oracle/oradata/szdb/archive/1_33.dbf thread=1 sequence=33
media recovery complete
Finished recover at 23-DEC-04

sql statement: ALTER DATABASE OPEN RESETLOGS

released channel: c1

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     236000356 bytes

Fixed Size                      451684 bytes
Variable Size                201326592 bytes
Database Buffers              33554432 bytes
Redo Buffers                    667648 bytes

RMAN> run{
2> allocate channel c1 type disk;
3> restore database;
4> recover database;
5> sql 'ALTER DATABASE OPEN RESETLOGS';
6> release channel c1;
7> }

allocated channel: c1
channel c1: sid=8 devtype=DISK

Starting restore at 23-DEC-04

released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/23/2004 17:17:22
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN>

使用道具 举报

回复
论坛徽章:
86
ITPUB元老
日期:2005-02-28 12:57:002012新春纪念徽章
日期:2012-01-04 11:49:542012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20咸鸭蛋
日期:2012-05-08 10:27:19版主8段
日期:2012-05-15 15:24:112013年新春福章
日期:2013-02-25 14:51:24
13#
发表于 2004-12-23 17:33 | 只看该作者
最初由 oracle-plus 发布
[B]在rman的手冊中,有一章是說:
Performing Point-in-Time Recovery with Recovery Manager
的,你可以看看,它可以只恢復這個tablespace而不影響整個數據庫。 [/B]


这不过是在新的环境中,把除该表空间、系统表空间、回滚段表空间之外的所有表空间的数据文件给offline,然后恢复而已。


没什么特别的

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表