exp时对密码中含“)”的处理

今天在做exp的时候,该用户的密码为Rdy)Jl!S。在做exp的时候总是报错:

$ exp testuser/Rdy\)Jl!S@hbreport owner=testuser
LRM-00116: syntax error at ')' following 'testuser/Rdy'

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

用了引号也不行:

$  exp "testuser/Rdy)Jl!S" owner=testuser
LRM-00116: syntax error at ')' following 'testuser/Rdy'

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

虽然遇到这样的情况,我们可以用不含)密码的dba权限用户来导出,或者用parfile,但是如果直接用命令行,我们应该怎么做呢?

win下,用\:

D:\>exp testuser/Rdy\)Jl!S@oralocal owner=testuser

Export: Release 9.2.0.1.0 - Production on 星期三 7月 11 16:34:56 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


连接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的用户...
. 正在导出 pre-schema 过程对象和操作
. 正在导出用户 TESTUSER 的外部函数库名称
. 导出 PUBLIC 类型同义词
. 导出私有类型同义词
. 正在导出用户 TESTUSER 的对象类型定义
即将导出 TESTUSER 的对象 ...
. 正在导出数据库链接
. 正在导出序号
. 正在导出群集定义
. 即将导出 TESTUSER 的表通过常规路径 ...
. . 正在导出表                              KK        915 行被导出
(以下省略)

unix下,用””和\:

$ exp "testuser/Rdy\)Jl!S" owner=testuser

Export: Release 9.2.0.6.0 - Production on Wed Jul 11 17:05:08 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TESTUSER 
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user TESTUSER 
About to export TESTUSER's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export TESTUSER's tables via Conventional Path ...
. . exporting table                            KKK          8 rows exported
(以下省略)

相关文章

发表回复

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

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据