楼主: lues

请大家帮忙看看我的备份策略有没有问题

[复制链接]
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
41#
发表于 2004-12-23 11:15 | 只看该作者
执行的是完全恢复,当然不会'恢复'删除的表了.
需要执行不完全恢复.

使用道具 举报

回复
论坛徽章:
0
42#
 楼主| 发表于 2004-12-23 11:18 | 只看该作者
我现在尝试不完全恢复,但是set until time '12 22 2004 14:16:59';有点问题,我的操作系统是redhat linux as 3,我想问一下我的set until time 的格式该怎么写,这个格式和操作系统日期格式定义有什么联系?谢谢

RMAN>  run{
2> allocate channel c1 type disk;
3> sql 'alter tablespace game offline ';
4> set until time '12 22 2004 14:16:59';
5> restore tablespace game from tag='TAG20041222T141619';
6> recover tablespace game from tag='TAG20041222T141619';
7> sql 'alter tablespace game online';
8> release channel c1;
9>  }

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

sql statement: alter tablespace game offline

executing command: SET until clause
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 12/23/2004 11:10:26
ORA-01843: not a valid month

使用道具 举报

回复
论坛徽章:
0
43#
 楼主| 发表于 2004-12-23 12:53 | 只看该作者
我按网上的方法试了一下,rman都进不去了

[oracle@test7 bin]$ env | grep NLS
NLS_LANG=american_america.ZHS16GBK
ORA_NLS33=/oracle/product/9.2.0/ocommon/nls/admin/data
[oracle@test7 bin]$ export NLS_DATE_FORMAT=YYYY-MM-DD:HH24D:SS
[oracle@test7 bin]$ env | grep NLS
NLS_LANG=american_america.ZHS16GBK
ORA_NLS33=/oracle/product/9.2.0/ocommon/nls/admin/data
NLS_DATE_FORMAT=YYYY-MM-DD:HH24D:SS
[oracle@test7 bin]$ ./rman
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03999: Oracle error occurred while while converting a date: ORA-01810:

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
44#
发表于 2004-12-23 13:14 | 只看该作者
set until time '12 22 2004 14:16:59';
-->
set until time "to_date('20041222 14:16:59','yyyymmdd hh24:mi:ss')";

使用道具 举报

回复
论坛徽章:
0
45#
 楼主| 发表于 2004-12-23 13:21 | 只看该作者
谢谢husthxd,时间的问题解决了,但是恢复以后还是没有看到备份以后删除的表,为什么我/opt/rman/SZDB_1_545580979.bak备份后删除的表还是不能恢复呢[/COLOR] ,于是我调整了一下时间点,结果出了新的问题,tar的标示失效了
[oracle@test7 bin]$ ./rman

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

RMAN> connect target /

connected to target database: SZDB (DBID=3541278024)

RMAN>  run{
2> allocate channel c1 type disk;
3> sql 'alter tablespace game offline ';
4> set until time "to_date('2004-12-22 14:16:59','yyyy-mm-dd hh24:mi:ss')";[/COLOR]
5> restore tablespace game from tag='TAG20041222T141619';
6> recover tablespace game from tag='TAG20041222T141619';
7> sql 'alter tablespace game online';
8> release channel c1;
9> }

using target database controlfile instead of recovery catalog
allocated channel: c1
channel c1: sid=8 devtype=DISK

sql statement: alter tablespace game offline

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 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
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 tablespace game online

released channel: c1

在这次恢复以后,再尝试恢复就不行了[/COLOR]
RMAN> run{
2> allocate channel c1 type disk;
3> sql 'alter tablespace game offline ';
4> set until time "to_date('2004-12-22 14:14:59','yyyy-mm-dd hh24:mi:ss')";
5>  restore tablespace game from tag='TAG20041222T141619';
6> recover tablespace game from tag='TAG20041222T141619';
7> sql 'alter tablespace game online';
8> release channel c1;
9> }

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

sql statement: alter tablespace game offline

executing command: SET until clause

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 13:03:14
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 11 found to restore
为什么我/opt/rman/SZDB_1_545580979.bak备份后删除的表还是不能恢复呢[/COLOR]

list backup有关/opt/rman/SZDB_1_545580979.bak的信息

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
32      Full    622M       DISK        00:00:58     22-DEC-04      
        BP Key: 32   Status: AVAILABLE   Tag: TAG20041222T141619
        Piece Name: /opt/rman/SZDB_1_545580979.bak
  List of Datafiles in backup set 32
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  11      Full 2638345    22-DEC-04 /oracle/oradata/szdb/GAME.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
33      Full    1M         DISK        00:00:00     22-DEC-04      
        BP Key: 33   Status: AVAILABLE   Tag:
        Piece Name: /oracle/product/9.2.0/dbs/c-3541278024-20041222-09
  SPFILE Included: Modification time: 10-DEC-04

使用道具 举报

回复
论坛徽章:
0
46#
 楼主| 发表于 2004-12-23 14:02 | 只看该作者
我换了一个备份集,还是不能执行恢复操作,请问这个问题我该怎么解决

RMAN>  run{
2> allocate channel c1 type disk;
3> sql 'alter tablespace game offline ';
4> set until time "to_date('2004-12-22 13:56:00','yyyy-mm-dd hh24:mi:ss')";
5> restore tablespace game from tag='TAG20041222T135806';
6> recover tablespace game from tag='TAG20041222T135806';
7> sql 'alter tablespace game online';
8> release channel c1;
9> }

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

sql statement: alter tablespace game offline

executing command: SET until clause

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 13:55:49
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 11 found to restore

使用道具 举报

回复

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

本版积分规则 发表回复

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