ITPub博客

首页 > 数据库 > Oracle > RMAN中检查脚本语法错误的命令

RMAN中检查脚本语法错误的命令

原创 Oracle 作者:litterbaby 时间:2007-09-12 07:58:10 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    131
  • 访问量
    431864