RMAN中檢查指令碼語法錯誤的命令

litterbaby發表於2007-09-12
RMAN中檢查指令碼語法錯誤的命令[@more@]

RMAN中檢查指令碼語法錯誤的命令

在執行RMAN指令碼或者命令之前,需要將這個指令碼或者命令檢查一遍,看看命令或者指令碼上是否存在語法錯誤,這就可以使用Oracle提供的一個檢查RMAN指令碼,命令語法錯誤的命令checksyntax ,(檢查命令檔案中的語法錯誤)但是這個命令執行的時候是不實際執行的。例如:

RMAN> run < backup database;>

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01006: error signaled during parse

RMAN-02001: unrecognized punctuation symbol "

RMAN> run {backup database}

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "}": expecting one of: "archivelog, auxiliary, backup, backupset, channel, copy, controlfilecopy, current, database, datafile, datafilecopy, delete, diskratio, db_recovery_file_dest, filesperset, format, from, force, file, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, plus, reuse, recovery, section, ;, skip, spfile, skip readonly, setsize, tablespace, tag, to"

RMAN-01007: at line 1 column 21 file: standard input

RMAN> run { backup database;}

The command has no syntax errors

RMAN>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/222350/viewspace-969035/,如需轉載,請註明出處,否則將追究法律責任。

相關文章