共計 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 時報錯怎么辦”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!