同事在测NBU调用RMAN进行备份时,出现如下错误:
Both single and double quotes (’ or “) are accepted for a quoted-string.
Quotes are not required unless the string contains embedded white-space.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00552: syntax error in command line arguments
RMAN-01009: syntax error: found “dot”: expecting one of: “double-quoted-string, equal, identifier, single-quoted-string”
RMAN-01007: at line 2 column 1 file: command line arguments
Script ./hot_database_backup.sh
==== ended in error on Fri Feb 20 15:47:36 CST 2009 ====
发生这个错误的原因是:热备脚本hot_database_backup.sh 中的$RMAN_LOG_FILE变量来自shell变量$0,使用了相对路径,而有些版本rman不支持相对路径,因此执行时报错。
解决方法是给$RMAN_LOG_FILE予绝对路径:
修改$RMAN_LOG_FILE变量:
原来:
RMAN_LOG_FILE=${0}.out
修改成:
$RMAN_LOG_FILE=`pwd`/${0}.out
更详细的介绍可参考veritas的文档: Document ID: 249670