-
Nov13
RMAN TAG参数的禁区
Posted in Database, 911 views
-
RMAN具有非常丰富的命令,为这些命令服务的保留字有几十上百个,如allocate、rsync、show、backup等等。
在书写RMAN脚本时,需要特别小心不要用到保留字,否则会导致RMAN-01007错误
以TAG参数为例:
当tag为backup时,报错RMAN> run{
2> backup tablespace user
3> tag backupRMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "backup": expecting one of: "double-quoted-string, equal, identifier, single-quoted-string"
RMAN-01007: at line 3 column 5 file: standard input当tag为backup1时,正常运行RMAN> run {
2> backup tablespace users
3> tag backup1;
4> }Starting backup at 13-NOV-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=/opt/u01/oracle/oradata/mydb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 13-NOV-08
channel ORA_DISK_1: finished piece 1 at 13-NOV-08
piece handle=/oracle/flash_recovery_area/MYDB/backupset/o1_mf_nnndf_BACKUP1_4kq7rcpv_.bkp tag=BACKUP1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 13-NOV-08Starting Control File and SPFILE Autobackup at 13-NOV-08
piece handle=/oracle/flash_recovery_area/MYDB/autobackup/o1_mf_s_670678156_4kq7rfb5_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 13-NOV-08RMAN>
Blogged with the Flock BrowserRelated posts:

Leave a comment | Trackback 这篇文章还没有评论.