溫馨提示×

溫馨提示×

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

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

EXP/IMP雙引號有什么用

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

小編給大家分享一下EXP/IMP雙引號有什么用,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

在導(dǎo)出表時會有大小寫之分,這個時候就需要用到雙引號
表名的限制條件:
1.默認(rèn)情況下,數(shù)據(jù)庫存儲的是大寫的表名。如果有表名是大小寫混用或者都是小寫的情況,應(yīng)該使用雙引號。
2.在某些操作系統(tǒng)上需要使用\轉(zhuǎn)義。下面是示例
命令行:
TABLES='\"Emp\"'
交互模式
"Emp"
參數(shù)文件:
TABLES='"Emp"'(單引號加雙引號)
1.表名不能有#號,除非使用雙引號。同樣的,在參數(shù)文件中,如果表包含#號,那么導(dǎo)出工具會把剩下的語句當(dāng)成命令去執(zhí)行,所以如果表名包含#號,最好加上雙引號。
例如,如果參數(shù)文件包含TABLES=(emp#, dept, mydata),那么#號后面都是命令,不會被正確導(dǎo)出。如果增加了雙引號,導(dǎo)出就會正常進(jìn)行。
值得注意的是,某些操作系統(tǒng)只需要單引號就可以行使雙引號的含義,不同的操作系統(tǒng)有不同的表面限制,應(yīng)當(dāng)注意操作系統(tǒng)的環(huán)境。

如果以SYS用戶連接,必須指定 AS SYSDBA。操作系統(tǒng)可能會把AS SYSDBA當(dāng)做其他命令,所以可能會用到雙引號。
[oracle@lzl ~]$ vi parfile_lzl.txt 
[oracle@lzl ~]$ cat parfile_lzl.txt 
userid=sys/oracle as sysdba
file=/home/oracle/exp_lzl.dmp
log=/home/oracle/exp_lzl.log
tables=scott.emp
buffer=102400
rows=y
[oracle@lzl ~]$ exp parfile=parfile_lzl.txt 
LRM-00112: multiple values not allowed for parameter 'userid'
LRM-00113: error when processing file 'parfile_lzl.txt'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@lzl ~]$ vi parfile_lzl.txt 
[oracle@lzl ~]$ cat parfile_lzl.txt 
userid="sys/oracle as sysdba"
file=/home/oracle/exp_lzl.dmp
log=/home/oracle/exp_lzl.log
tables=scott.emp
buffer=102400
rows=y
[oracle@lzl ~]$ exp parfile=parfile_lzl.txt 
Export: Release 11.2.0.3.0 - Production on Mon Jul 10 16:50:19 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 ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
Current user changed to SCOTT
. . exporting table                            EMP         14 rows exported
Export terminated successfully without warnings.

以上是“EXP/IMP雙引號有什么用”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

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

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

AI