ITPub博客

首页 > 数据库 > Oracle > [20160809]exp语法问题.txt

[20160809]exp语法问题.txt

原创 Oracle 作者:lfree 时间:2016-08-10 08:44:50 13 删除 编辑

[20160809]exp语法问题.txt

http://blog.itpub.net/267265/viewspace-2122890/

--一开始以为上面的语法是shell有关.测试一下在windows的情况,如果windows下没有问题,这个应该是exp内部的一个功能.
--可以一边传一边压缩.

1.环境:
SCOTT@test01p> @ ver1

PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.1.0.1.0     Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

SCOTT@test01p>  create table t as select * from dba_objects ;
Table created.

SCOTT@test01p> select count(1) from t;
  COUNT(1)
----------
     91680

2.使用exp:
D:\tools\rlwrap>exp scott/btbtms@test01p tables=t  file=>(gzip >t.dmp.gz)
exp scott/btbtms@test01p tables=t  file=>(gzip >t.dmp.gz)
LRM-00118: syntax error at '=' at the end of input

EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully

--windows这样操作确实不行.也就是这种语法应该跟bash shell有关.如何理解呢?
--仔细看我问这个问题的链接:http://www.itpub.net/thread-2064992-1-1.html
--才明白我的错误在那里.exp 的语法 file=....,这样等号不能出现.

--我看了一些bash shell关于管道的内容:

exp scott/btbtms@test01p tables=t  file=>(gzip >t.dmp.gz)

--写成如下,上面的命令格式就很好理解了。
(gzip - > b.sh.gz) <b.sh

--可以确定这就是bash shell语法。

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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969673