linux as5下用./test.sh执行SH时报错,syntax error near unexpected token '(',请大哥大姐帮帮忙!
test.sh中的内容为:
#!/bin/sh
cd /opt/oracle/dbbak
rm -rf /opt/oracle/dbbak/dbbak.dmp
exp test/test tables=(t_test) file=/opt/oracle/dbbak/dbbak.dmp log=/opt/oracle/dbbak/dbexp.log在网上找了,但没找到解决方法。

解决方案 »

  1.   

    LZ只要将括号去掉就可以了,尝试如下:$ exp obstest/obstest tables=zzw_temp_200902 file=/oradata1/aiobstest/zzw_temp_200902.dmpExport: Release 9.2.0.1.0 - Production on 星期五 8月 21 07:17:53 2009Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    连接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径 ...
    . . 正在导出表                 ZZW_TEMP_200902          5 行被导出
    在没有警告的情况下成功终止导出。
      

  2.   

    加上括号也应该可以的,我在window下试过,C:\Documents and Settings\S8001>exp test1/test1 tables=(test) file=test.dumpExport: Release 10.2.0.1.0 - Production on 星期五 8月 21 08:56:02 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径...
    . . 正在导出表                            TEST导出了           0 行
    你把那行命令单独执行试试。
      

  3.   

    我自己搞定了,可能是LINUX的版本不同,tables=(t_test)需改为tables="(t_test)"就可以执行了。也许楼上的办法也行吧,呵呵。