免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2203 | 回复: 6
打印 上一主题 下一主题

请教rman恢复表空间的问题?急!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-06 11:24 |只看该作者 |倒序浏览
现有一Oracle10.2.0.3的数据库,通过nbu调用rman进行了整库备份(backup database)备份脚本如下:
CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
send 'NB_ORA_CLIENT=P595ALPAR1';
BACKUP
    $BACKUP_TYPE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
send 'NB_ORA_CLIENT=dbserver';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL delete input;
RELEASE CHANNEL ch00;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file.  This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section.  This step would not be
# necessary if we were using a recovery catalog.
#
ALLOCATE CHANNEL ch00 TYPE disk;
  copy  CURRENT CONTROLFILE to '/usr/openv/scripts/dbserver_control.ctl' ;
RELEASE CHANNEL ch00;
}
EOF


现在遇到一个问题,用户发现这个数据库中有一个表空间中的数据有问题了,想单独恢复这个表空间到3天前的状态(不恢复整个数据库),请问各位可以实现吗?能告诉大致的过程吗?谢谢!

补充一下:最近没有做这个表空间的exp备份。

[ 本帖最后由 lyh303 于 2010-1-6 13:55 编辑 ]

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
2 [报告]
发表于 2010-01-06 13:02 |只看该作者
已经发过N次了还没有解决吗?

论坛徽章:
0
3 [报告]
发表于 2010-01-06 13:17 |只看该作者
基于时间的不完全恢复。

论坛徽章:
0
4 [报告]
发表于 2010-01-06 13:50 |只看该作者
原帖由 renxiao2003 于 2010-1-6 13:02 发表
已经发过N次了还没有解决吗?


我第一次发啊,今天才遇到的问题,找了以前的帖子,但情况与我的不同啊!

论坛徽章:
0
5 [报告]
发表于 2010-01-06 13:54 |只看该作者
原帖由 小木虫子 于 2010-1-6 13:17 发表
基于时间的不完全恢复。


我只知道基于时间点的不完全恢复整库,能恢复某个表空间吗?请告诉我怎么做!


补充一下:最近没有做这个表空间的exp备份。

论坛徽章:
0
6 [报告]
发表于 2010-01-06 14:08 |只看该作者
not likely...

论坛徽章:
0
7 [报告]
发表于 2010-01-06 14:35 |只看该作者
shutdown immediate;
startup mount

进入RMAN
RMAN> run{
  alter tablespace users offline;
  set until time "to_date(01/03/10 00:00:00','mm/dd/yy hh24:mi:ss')";
  restore  tablespace users;
  recover  tablespace users;
  alter database open resetlogs;
  alter tablespace users online;
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP