Oracle导出时报00904,exp导出报错ORA-00904

Oracle导出时报00904,exp导出报错ORA-00904小叶同学用exp导出数据,加了query参数,结果命令执行报ORA-00904错误如果query在命令行直接指定的话,所有的特殊字符都需要做转义的,如果是放到参数文件里,就无需转义了简单的做个测试:[oracle@goolengoolen]$expuserid=scott/tigertables=empfile=./a.dmpquery=\’whereename=’SCOTT’\’E…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全家桶1年46,售后保障稳定

小叶同学用exp导出数据,加了query参数,结果命令执行报ORA-00904错误

如果query在命令行直接指定的话,所有的特殊字符都需要做转义的,如果是放到参数文件里,就无需转义了

简单的做个测试:

[oracle@goolen goolen]$ exp userid=scott/tiger tables=emp file=./a.dmp query=\’where ename=’SCOTT’\’

Export: Release 10.2.0.4.0 – Production on Tue Dec 23 11:54:47 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path …

. . exporting table                            EMP

EXP-00056: ORACLE error 904 encountered

ORA-00904: “SCOTT”: invalid identifier

Export terminated successfully with warnings.

[oracle@goolen goolen]$

转义后可以成功导出:

[oracle@goolen goolen]$ exp userid=scott/tiger tables=emp file=./b.dmp query=\”where\ ename\=\’SCOTT\’\”  STATISTICS=none

Export: Release 10.2.0.4.0 – Production on Tue Dec 23 11:55:45 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path …

. . exporting table                            EMP          1 rows exported

Export terminated successfully without warnings.

把query加到parfile里:

[oracle@goolen goolen]$ cat parfile

query=”where ename=’SCOTT'”

[oracle@goolen goolen]$ exp userid=scott/tiger tables=emp file=./c.dmp parfile=./parfile STATISTICS=none

Export: Release 10.2.0.4.0 – Production on Tue Dec 23 11:57:48 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path …

. . exporting table                            EMP          1 rows exported

Export terminated successfully without warnings.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23249684/viewspace-1377028/,如需转载,请注明出处,否则将追究法律责任。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/219257.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • label 的autosize属性

    label 的autosize属性label的autosize属性,显示不全的问题。转载于:https://www.cnblogs.com/sfbrzkh/p/4487911.html

    2022年5月20日
    31
  • php源码中powerby,如何去掉织梦dedecms底部调用cfg_powerby的power by dedecms

    php源码中powerby,如何去掉织梦dedecms底部调用cfg_powerby的power by dedecms我们平常使用织梦后台做建站的时候都会发现,如果调用版权信息的时候,在底部使用cfg_powerby调用的时候出现powerbydedecms的链接信息,而这个链接又是个导出链接,我们怎么样才能一劳永逸的直接去掉呐,下面站优云小编就跟大家分享一下。在之前版本我们的解决方法是:1、去掉{dede:globalname=’cfg_powerby’/};2、进入后台,点击系统->系统基本设…

    2022年7月13日
    15
  • python中读写LMDB数据库[通俗易懂]

    python中读写LMDB数据库[通俗易懂]转自原文:https://blog.csdn.net/dcrmg/article/details/79144507LMDB的全称是LightningMemory-MappedDatabase(快如闪电的内存映射数据库),它的文件结构简单,包含一个数据文件和一个锁文件:LMDB文件可以同时由多个进程打开,具有极高的数据存取速度,访问简单,不需要运行单独的数据库管理进程,只要在访问数据的代码…

    2022年9月29日
    3
  • 三十名网友共同自主研发粤语打字软件「建议收藏」

    三十名网友共同自主研发粤语打字软件「建议收藏」来源:羊城晚报 日期:2007-7-23  王许乐是厚街镇前进小学的语文教师。2005年底,他和网上其他29人一起用半年时间研发了一套粤语打字软件,在网友中大受欢迎,下载量过万。王许乐等人研发的这套轻松粤拼输入法目前已经推出了两个版本,他们正打算推出进一步改良版。 王许乐一直致力于粤语研究。2005年底,一个偶然的机会,他在网络上认识了一大批热爱粤语的人,大家一起交流从简单的粤语方言到省

    2022年7月16日
    14
  • pta集合相似度_结构相似度

    pta集合相似度_结构相似度原题链接输入样例:33 99 87 1014 87 101 5 877 99 101 18 5 135 18 9921 21 3输出样例:50.00%33.33%#include<bits/stdc++.h>#define x first#define y second#define send string::nopsusing namespace std;typedef long long ll;const int N = 1e4 + 10;cons

    2022年8月8日
    5
  • Python re正则表达式

    Python re正则表达式

    2022年1月15日
    36

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号