zoukankan      html  css  js  c++  java
  • rman checksyntax和解决RMAN-01009: syntax error: found "dot"

    在日常清归档时候执行脚本报错

    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.

    找到问题行

    RMAN_LOG_FILE=`pwd`/${0}.`date +%Y%m%d%H%M%S`.out

    当时没有加这个'pwd',没有绝对路径导致报错.

    关于此类问题,也可以使用也可以使用rman checksyntax 命令检查RMAN 脚本的语法问题

    How to check for correct RMAN syntax [ID427224.1]

    $ 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)

    RMAN> list backup of database completed before 'sysdate-10'; 

    The command has no syntax errors

    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 input

    CHECKSYNTAX can also check the syntax in the command file.

    $ rman CHECKSYNTAX @filename
     
    如果是正确的rman命令则会返回The command has no syntax errors
  • 相关阅读:
    周鸿祎:很多程序员聪明,但我一看就知道他不会成功
    Ubuntu/centos/redhat/SUSE sipp安装(带rtp支持,3.5.1版本)
    ffmpeg源码分析之媒体打开过程
    搜集的动植物分类、检索网站
    sipp命令 各参数含义
    最简单的一个win32程序
    vi学习笔记
    删除结点 (双向链表)
    插入结点(双向链表)
    La=LaULb (单链表)
  • 原文地址:https://www.cnblogs.com/kawashibara/p/9552499.html
Copyright © 2011-2022 走看看