CentOS7使用exp/imp时报错怎么办

28次阅读
没有评论

共计 2149 个字符,预计需要花费 6 分钟才能阅读完成。

这篇文章给大家分享的是有关 CentOS7 使用 exp/imp 时报错怎么办的内容。丸趣 TV 小编觉得挺实用的,因此分享给大家做个参考,一起跟随丸趣 TV 小编过来看看吧。

在 CentOS7 下使用 exp 语句导出数据时遇到报错,使用的脚本都是其他环境下验证过的脚本,很是奇怪。

1. 测试环境

CentOS 7+Oracle11.2.0.3.0

点击 (此处) 折叠或打开

[root@localhost hoegh]# cat /etc/centos-release

CentOS Linux release 7.2.1511 (Core)

[root@localhost hoegh]#

[root@localhost hoegh]# sqlplus sys/sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on 星期三 11 月 1 11:43:51 2017

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

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

SQL select * from v$version;

BANNER

——————————————————————————–

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

PL/SQL Release 11.2.0.3.0 – Production

CORE 11.2.0.3.0 Production

TNS for Linux: Version 11.2.0.3.0 – Production

NLSRTL Version 11.2.0.3.0 – Production

SQL

SQL

SQL exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

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

[root@localhost hoegh]#

2.exp 语句报错

点击 (此处) 折叠或打开

[root@localhost hoegh]#

[root@localhost hoegh]# exp hoegh/hoegh tables=(HOEGH1,HOEGH2,HOEGH3,HOEGH4,HOEGH5) file=/home/hoegh/hoegh.dmp

bash: syntax error near unexpected token `(

3. 解决

需要在括号上添加双引号才行。

点击 (此处) 折叠或打开

[root@localhost hoegh]#

[root@localhost hoegh]# exp hoegh/hoegh tables= (HOEGH1,HOEGH2,HOEGH3,HOEGH4,HOEGH5) file=/home/hoegh/hoegh.dmp

Export: Release 11.2.0.3.0 – Production on 星期三 11 月 1 11:44:58 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

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

Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path …

. . exporting table HOEGH1          2 rows exported

. . exporting table HOEGH2        500 rows exported

. . exporting table HOEGH3       1500 rows exported

. . exporting table HOEGH4          2 rows exported

. . exporting table HOEGH5        500 rows exported

Export terminated successfully without warnings.

[root@localhost hoegh]#

感谢各位的阅读!关于“CentOS7 使用 exp/imp 时报错怎么办”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-24发表,共计2149字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)