溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

CentOS7使用exp/imp時(shí)報(bào)錯(cuò)怎么辦

發(fā)布時(shí)間:2021-11-10 09:51:43 來源:億速云 閱讀:229 作者:小新 欄目:關(guān)系型數(shù)據(jù)庫

這篇文章給大家分享的是有關(guān)CentOS7使用exp/imp時(shí)報(bào)錯(cuò)怎么辦的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過來看看吧。

在CentOS7下使用exp語句導(dǎo)出數(shù)據(jù)時(shí)遇到報(bào)錯(cuò),使用的腳本都是其他環(huán)境下驗(yàn)證過的腳本,很是奇怪。

1.測試環(huán)境

CentOS 7+Oracle11.2.0.3.0

點(diǎn)擊(此處)折疊或打開

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

  2. CentOS Linux release 7.2.1511 (Core)

  3. [root@localhost hoegh]#

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


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


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



  7. Connected to:

  8. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

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


  10. SQL> select * from v$version;


  11. BANNER

  12. --------------------------------------------------------------------------------

  13. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

  14. PL/SQL Release 11.2.0.3.0 - Production

  15. CORE    11.2.0.3.0    Production

  16. TNS for Linux: Version 11.2.0.3.0 - Production

  17. NLSRTL Version 11.2.0.3.0 - Production


  18. SQL>

  19. SQL>

  20. SQL> exit

  21. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

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

  23. [root@localhost hoegh]#

2.exp語句報(bào)錯(cuò)

點(diǎn)擊(此處)折疊或打開

  1. [root@localhost hoegh]#

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

  3. bash: syntax error near unexpected token `(

3.解決

需要在括號上添加雙引號才行。

點(diǎn)擊(此處)折疊或打開

  1. [root@localhost hoegh]#

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


  3. Export: Release 11.2.0.3.0 - Production on 星期三 11月 1 11:44:58 2017


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



  5. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

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

  7. Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set


  8. About to export specified tables via Conventional Path ...

  9. . . exporting table HOEGH1          2 rows exported

  10. . . exporting table HOEGH2        500 rows exported

  11. . . exporting table HOEGH3       1500 rows exported

  12. . . exporting table HOEGH4          2 rows exported

  13. . . exporting table HOEGH5        500 rows exported

  14. Export terminated successfully without warnings.

  15. [root@localhost hoegh]#

感謝各位的閱讀!關(guān)于“CentOS7使用exp/imp時(shí)報(bào)錯(cuò)怎么辦”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI