2012-08-03 78 views
0

我可以使用SQLDeveloper導出表並且工作正常。但是用oracle的exp命令,我有以下錯誤導出SqlDeveloper的工作,但不使用Exp Oracle命令

C:\>exp CHORUS_RO/[email protected] TABLES=(USER_CHORUS.CHO_FAQ_ITEM) file='D:\exports' 

Export: Release 11.2.0.2.0 - Production on Ven. Ao¹t 3 18:30:47 2012 

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit 
Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set 
server uses AL32UTF8 character set (possible charset conversion) 

About to export specified tables via Conventional Path ... 
EXP-00009: no privilege to export USER_CHORUS's table CHO_FAQ_ITEM 
Export terminated successfully with warnings. 

爲什麼?除了給予出口特權之外,我可以做什麼,因爲我沒有能力做到這一點?

回答

3

您無法在沒有權限的情況下在其他模式上使用導出實用程序 - 這是一個安全問題。

From the docs

如果你沒有包含在 EXP_FULL_DATABASE角色的系統權限,那麼你就不能導出包含在 另一個用戶的模式對象。例如,即使您爲其創建了一個同義詞,也不能在另一個用戶的模式中導出表。

還要注意,使用exp是從11g開始不支持的。最好使用expdp。

可能的解決方法是通過調用exp作爲該用戶來導出USER_CHORUS的模式。

+1

在MySQL中,即使沒有權限,您也可以使用--single-transaction選項來備份數據:http://www.cyberciti.biz/faq/linux-unix-mysqldump-got-error1044-access-denied/。我不理解Oracle的哲學,所以我可以在不是我的表上使用SELECT讀取數據,但我無法備份這些數據? WTF? – baptx 2013-10-13 13:54:30

+0

如果您需要權限,請讓DBA授予他們。如果DBA不會,那麼可能有一個原因。 – DCookie 2013-10-14 21:27:16

+1

如果您可以閱讀,我看不到任何阻止數據備份的理由。 – baptx 2013-10-27 17:26:30