RMAN-01009: syntax error: found "dot" 解决方法
来源:互联网 发布:tensorflow下word2vec 编辑:程序博客网 时间:2024/04/27 17:07
今天调试一个RMAN 的备份脚本,这个脚本以前也用过很多次,并没有什么问题,今天执行时,就是过不去。
操作系统:Redhat 5.8
数据库:11.2.0.3
错误如下:
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-00552: syntax error in command linearguments
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
这个错误,提示在第二行有问题。
根据MOS 文档[ID427224.1]的说明:
How to check for correct RMAN syntax [ID427224.1]
我们也可以使用rman checksyntax 命令检查RMAN 脚本的语法问题。
如下:
[oracle@rac1 scripts]$ rman checksyntaxrman.sh
Argument Value Description
-----------------------------------------------------------------------------
target quoted-string connect-string fortarget database
catalog quoted-string connect-string forrecovery catalog
nocatalog none if specified, thenno recovery catalog
cmdfile quoted-string name of inputcommand file
log quoted-string name of outputmessage log file
trace quoted-string name of outputdebugging message log file
append none if specified, logis opened in append mode
debug optional-args activate debugging
msgno none show RMAN-nnnnprefix for all messages
send quoted-string send a command tothe media manager
pipe string building block forpipe names
timeout integer number of secondsto wait for pipe input
checksyntax none check the commandfile for syntax errors
-----------------------------------------------------------------------------
Both single and double quotes (' or ")are accepted for a quoted-string.
Quotes are not required unless the stringcontains embedded white-space.
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-00552: syntax error in command linearguments
RMAN-01009: syntax error: found"rman": expecting one of: "append, auxiliary, catalog,checksyntax, cmdfile, log, msgno, nocatalog, pipe, script, send, target,timeout, using, @, ;"
RMAN-01007: at line 2 column 1 file:command line arguments
RMAN 脚本的开始一段内容如下:
#!/bin/ksh
export LANG=en_US
BACKUP_DATE=`date +%d`
RMAN_LOG_FILE=${0}.out
TODAY=`date`
USER=`id|cut -d "(" -f2|cut -d")" -f1`
echo"-----------------$TODAY-------------------">$RMAN_LOG_FILE
ORACLE_HOME=/u01/app/oracle/11.2.0/db_1
export ORACLE_HOME
RMAN=$ORACLE_HOME/bin/rman
export RMAN
错误提示的第二行也只是一个大概范围,我们这里报错,是因为$RMAN_LOG_FILE变量来自shell变量$0,使用了相对路径,而有些版本rman不支持相对路径,因此执行时报错。
解决方法是给$RMAN_LOG_FILE予绝对路径:
将:
RMAN_LOG_FILE=${0}.out
修改成:
RMAN_LOG_FILE=`pwd`/${0}.out
再次执行就ok了。
---------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Skype: tianlesoftware
QQ: tianlesoftware@gmail.com
Email: tianlesoftware@gmail.com
Blog: http://blog.csdn.net/tianlesoftware
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
Linkedin: http://cn.linkedin.com/in/tianlesoftware
- RMAN-01009: syntax error: found "dot" 解决方法
- RMAN-01009: syntax error: found "dot" 解决方法
- RMAN-01009: syntax error: found "dot" 解决方法
- RMAN-01009: syntax error: found "dot" 解决办法
- RMAN-01009: syntax error: found “dot”: expecting one of: “double-quoted-string, equal, identifier, s
- RMAN-01009: syntax error: found "all"
- cygwin $'\r': command not found ; syntax error near unexpected token...解决方法
- MyEclipse中出现Multiple annotations found at this line: - Syntax error, insert "}" to complete 错误解决方法
- syntax error near unexpected token `('解决方法
- jquery Syntax error, unrecognized expression:的解决方法
- syntax error: unexpected end of file解决方法
- PHP Parse Error: syntax error, unexpected $end 解决方法
- remote-ext.h(417) : error C2143:syntax error错误解决方法
- syntax error
- error C2449: found '{' at file scope (missing function header?)和error C2059: syntax error : '}'
- ext syntax error syntax error
- smarty syntax error: unrecognized tag 'var' 的原因及解决方法
- You have an error in your SQL syntax的解决方法
- firefox 与IE 对 js获取当前年份的兼容问题
- hdu 1787 GCD again
- hdu2108 Shape of HDU
- jquerymobile-21 jquerymobile默认配置
- 利用XStream在Java对象和XML之间相互转换
- RMAN-01009: syntax error: found "dot" 解决方法
- HTTP 请求浅析
- java设计模式——职责链模式
- Leetcode 69 sqrt(x)
- 黑马程序员 Java正则表达式
- hdu 1722
- Ext+Dwr动态树(增删改)
- Win7 64位系统不能使用农业银行网银
- 黑马程序员 Java高新技术(eclipse的使用,静态导入,可变参数,增强for,自动拆箱与装箱)