您的位置:首页 >> 数据库 >> Oracle >> 备份恢复 >> 正文
备份恢复 RSS
 

rman进行累积增量备份时又报错了

http://www.rdxx.com 06年12月22日 00:00 ChinaUnix.net 我要投稿

关键词: 报错 , rman , 备份 , RM

run{
  allocate channel d1 type disk;
  backup 
  incremental cumulative level 1        或者level=1
  (database format 'f:\backup\db_%d_%s_%p_%t');
}
rman报错:
  RMAN>run{
2>   allocate channel d1 type disk;
3>   backup
4>   incremental cumulative
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "cumulative": expecting one of: "level"
RMAN-01007: at line 4 column 15 file: b_whole_inc1.rcv
我是按oracle的中文教程来学习的,不知道是打印错了还是我的理解有问题,请指教

 一不 回复于:2003-09-22 21:24:45
非得做增量么?你的教程是什么版本的,数据库又是什么版本的?做增量怪麻烦的。

 lb_20016 回复于:2003-09-23 08:46:02
我的是windows平台下的oracle8.17的版本,我看的书是机械出版社出的《oracle备份与恢复培训教程》。

 lb_20016 回复于:2003-09-23 09:25:27
我把上述代码中的cumulative 关键字去掉的话,代码就能够执行了,增量备份不是有差异增量备份(默认方式)和累积增量备份两种吗,去掉cumulative 我想应该就是默认的差异增量备份,我怎么样才能进行累积增量备份呢,我试了若干写法rman都报错,非常疑惑中,请指教

 nomood 回复于:2003-09-23 09:45:52
error encountered while parsing input commands 
RMAN-01005: syntax error: found "cumulative": expecting one of: "level" 
RMAN-01007: at line 4 column 15 file: b_whole_inc1.rcv 

错误明显,是多了cumulative

备份的方式由level控制

 nomood 回复于:2003-09-23 09:48:12
lb_20016,仔细读完以下解答,应该会帮助你理解incremental backup
***************************************
 Let's talk about backups and backup types.  What types of backups can we do?

1. Full - All used blocks are copied to output.
2. Incremental - Backing up all used blocks since a backup => LEVEL N
    Level is a base number used at block level to identify if the block is => 
    the incremental number specified.  It's really not that bad.

If I back up using an LEVEL 2 incremental backup strategy then 1st I would have a full or LEVEL 0 
incremental  backup for the baseline starting on Sunday.  

Then perform a LEVEL 2 backup on Monday and then again on Tuesday, I only backup what changes 
each day.  When I do a LEVEL 1 backup on Wednesday the I get all blocks that have changed since the 
LEVEL 0 backup because LEVEL 1 is < the 2 it continues to backup what the level 2 backups had 
already done a backup of the 2 days before.  Next run the LEVEL 2 backups Thursday, Friday, 
and Saturday, then back to the Sunday Level 0 backup so we get a fresh copy of all used blocks in the 
database.

LVL - Sunday  Monday  Tuesday  Wednesday  Thursday  Friday  Saturday
 0   Baseline ( All Used Blocks 
 2                  ---------|
 2                               ------------|
 1           ---------------------------------------------|
 2                                                                       ---------------|
 2                                                                                           -----------|
 2                                                                                                          -------------|
 0   Baseline New
 

With this strategy we can restore and recover a database only having to restore 2-3 incrementals besides 
the baseline to recover the database to as current a state as possible.  The nice thing is when you tell 
RMAN to recover it will try and perform a complete recovery and when you set until for incomplete 
recovery RMAN still determines what backups will be needed to recover until a point in time, a logseq, 
or an scn number.  All set until recoveries are still resolved to an scn by RMAN if "until time" or "until 
logseq" are used.

set snapshot controlfile name to '@snapcf_TARGET.f';
run {
allocate channel t1 type 'sbt_tape';
sql "alter system archive log current";
backup incremental level 2;
format 'df_%t_%s_%p' database;
sql "alter system archive log all";
backup format 'cf_%t_%s_%p' current controlfile;
}

Incremental backups are only available in the Oracle Enterprise Edition.  The levels 0 and 1-4 are only 
reference points.  One level does not backup blocks any differently.  But the level that was last used 
will be retained in the block header so when you specify a higher level the candidate blocks are 
verified in descending order.

 lb_20016 回复于:2003-09-23 09:48:18
[quote:0294499d13="nomood"]error encountered while parsing input commands 
RMAN-01005: syntax error: found "cumulative": expecting one of: "level" 
RMAN-01007: at line 4 column 15 file: b_whole_inc1.rcv 

错误明显,是多了cu..........[/quote:0294499d13] 
差异增量和累积增量都有level级别的,level=1的话怎么能够判断是哪种增量方式呢?

 nomood 回复于:2003-09-23 10:04:07
[quote:6505ac8e15="nomood"]error encountered while parsing input commands 
RMAN-01005: syntax error: found "cumulative": expecting one of: "level" 
RMAN-01007: at line 4 column 15 file: b_whole_inc1.rcv 

错误明显,是多了cu..........[/quote:6505ac8e15]     

查了下,应该是语法错误
RMAN> run { 
    2> allocate channel dev01 type disk; 
    3> backup incremental level 1 cumulative database; 
    4> release channel dev01; 
    5> }

 nomood 回复于:2003-09-23 10:06:01
以下是incremental 与Cumulative incremental的说明
9. Incremental backups 

A level N incremental backup backs up blocks that have changed since the 
most recent incremental backup at level N or less. 

9.1. Level 0 - the basis of the incremental backup strategy 

    RMAN> run { 
    2> allocate channel dev1 type disk; 
    3> backup 
    4> incremental level 0 
    5> filesperset 4 
    6> format '/oracle/backups/sunday_level0_%t' 
    7> (database); 
    8> release channel dev1; 
    9> } 

Line# 
4: Level 0 backup - backups of level > 0 can be applied to this 
5: Specifies maximum files in the backupset 

A list of the database backupsets will show the above backup. The 'type' 
column is marked 'Incremental'; the 'LV' column shows '0'. 

9.2. Example backup strategy using incremental backups 

A typical incremental backup cycle would be as follows: 

    - Sun night - level 0 backup performed 
    - Mon night - level 2 backup performed 
    - Tue night - level 2 backup performed 
    - Wed night - level 2 backup performed 
    - Thu night - level 1 backup performed 
    - Fri night - level 2 backup performed 
    - Sat night - level 2 backup performed 

If the database suffered a failure on Sat morning and this resulted in 
a restore operation, RMAN could recover to the point of failure by 
restoring the backups from Sunday, Thursday, and Friday. This is 
because Thursdays level 1 backup contains all changes since Sunday, and 
Friday's level 2 backup contains all changes since Thursday. Whether 
the database could be completely recovered would depend on whether 
archive logging is enabled. 
  

10. Cumulative incremental backups 

A cumulative incremental backup backs up all blocks that have changed since 
the the most recent incremental backup at level N-1 or less (contrast with 
non-cumulative incremental backups that backup blocks that have changed 
since the the most recent incremental backup at level N or less). This 
means that more work is done in performing the backup (duplication of 
backup effort), but time may be saved when restoring (potentially fewer 
backupsets to restore). 

    RMAN> run { 
    2> allocate channel dev01 type disk; 
    3> backup incremental level 1 cumulative database; 
    4> release channel dev01; 
    5> }

 lb_20016 回复于:2003-09-23 10:38:08
恩,学习中..........

 lb_20016 回复于:2003-09-23 10:42:45
果然是语法错误,这本书已经有两个地方出现语法错误了,误人子弟,特别是对我这样的新手,谢谢大家的帮助!!

 rollingpig 回复于:2003-09-23 10:59:14
hehe
还是找本英文的来看吧!!

 lb_20016 回复于:2003-09-23 11:06:48
[quote:a64c2f0fed="rollingpig"]hehe
还是找本英文的来看吧!![/quote:a64c2f0fed]   
呵呵,一直在尝试,但都是看了几十页就看不下了,速度太慢了,虽然英语还可以 


 
 
标签: 报错 , rman , 备份 , RM 打印本文
 
 
  热点搜索
 
 
 


Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站