在平常清歸檔時候執行腳本報錯ide
RMAN-00552: syntax error in command line arguments
RMAN-01009: syntax error: found "dot": expecting one of: "double-quoted-string, identifier, single-quoted-string, "
RMAN-01007: at line 2 column 1 file: command line arguments.spa
找到問題行code
RMAN_LOG_FILE=`pwd`/${0}.`date +%Y%m%d%H%M%S`.outip
當時沒有加這個'pwd',沒有絕對路徑致使報錯.get
關於此類問題,也可使用也可使用rman checksyntax 命令檢查RMAN 腳本的語法問題input
How to check for correct RMAN syntax [ID427224.1]string
$ rman checksyntax
Recovery Manager: Release 10.2.0.2.0 - Production on Sun Apr 15 11:39:39 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=3932056136)io
RMAN> list backup of database completed before 'sysdate-10';
The command has no syntax errorstable
RMAN> list backup of database complete before 'sysdate-10';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "archivelog, by,
backed, completed, controlfile, database, datafile, device, like, recoverable,
;, skip, summary, spfile, tablespace, tag, verbose"
RMAN-01008: the bad identifier was: complete
RMAN-01007: at line 1 column 25 file: standard inputclass
CHECKSYNTAX can also check the syntax in the command file.