首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

ORA-00901: invalid CREATE command

2012-03-08 
高分求unix下expdp导出exclude的正确语法!!!高分求unix下expdp导出exclude的正确语法!!!oracle文档上公布

高分求unix下expdp导出exclude的正确语法!!!
高分求unix下expdp导出exclude的正确语法!!!
oracle文档上公布的:EXCLUDE=OBJECT_TYPE[:NAME_CLAUSE][,....]
但实际操作中直接套用exclude=TABLE:(table1,table2)不行
exclude=TABLE:"in('table1','table2')" 也行不通
加入各种/转义字符也不行,求正确语法!


[解决办法]

引用楼主 ddbaby 的帖子:
高分求unix下expdp导出exclude的正确语法!!!
oracle文档上公布的:EXCLUDE=OBJECT_TYPE[:NAME_CLAUSE][,....]
但实际操作中直接套用exclude=TABLE:(table1,table2)不行
exclude=TABLE:"in('table1','table2')" 也行不通
加入各种/转义字符也不行,求正确语法!

[解决办法]
SQL code
$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 8 10:04:51 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected.SQL> create directiory tmp as '/tmp/';create directiory tmp as '/tmp/'       *ERROR at line 1:ORA-00901: invalid CREATE commandSQL> create directory tmp as '/tmp/';Directory created.SQL> GRANT READ,WRITE ON DIRECTORY tmp to hnky;SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP and Data Mining options$ expdp hnky/hnky dumpfile=exp_dir:tmp EXCLUDE=TABLE:"IN ('T1','T2')"Export: Release 10.2.0.1.0 - 64bit Production on Wednesday, 08 April, 2009 10:17:49Copyright (c) 2003, 2005, Oracle.  All rights reserved.Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP and Data Mining options.....
[解决办法]
建立一个参数文件mypar.par

directory=mydir
dumpfile=myfile.dmp
logfile=myfile.log
exclude=TABLE:"IN('TABLE1','TABLE2')"

然后导出
expdp user/passwd parfile=mypar.par
[解决办法]
探讨
SQL code
$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 8 10:04:51 2009

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

SQL> conn / as sysdba
Connected.
SQL> create directiory tmp as '/tmp/';
create directiory tmp as '/tmp/'
*
ERROR at line 1:
ORA-00901: invalid CREATE command


SQL> create directory tmp as '/tmp/';

Directory created.


[解决办法]
引用楼主 ddbaby 的帖子:
高分求unix下expdp导出exclude的正确语法!!!
oracle文档上公布的:EXCLUDE=OBJECT_TYPE[:NAME_CLAUSE][,....]
但实际操作中直接套用exclude=TABLE:(table1,table2)不行
exclude=TABLE:"in('table1','table2')" 也行不通
加入各种/转义字符也不行,求正确语法!

热点排行