溫馨提示×

溫馨提示×

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

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

能select的表就可以exp嗎

發(fā)布時間:2022-01-14 15:55:14 來源:億速云 閱讀:113 作者:iii 欄目:建站服務(wù)器

這篇文章主要講解了“能select的表就可以exp嗎”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“能select的表就可以exp嗎”吧!

1.建立導(dǎo)出測試用戶,并授予相關(guān)權(quán)限

[oracle@GXDB1] $sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 3 15:11:19 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.

SQL> create user test_exp identified by a;

User created.

SQL> grant connect to test_exp;

Grant succeeded.

SQL> grant select on dep_study.bas_region to test_exp;

Grant succeeded.

2.導(dǎo)出dep_study.bas_region表

[oracle@GXDB1] $exp test_exp/a@gxtest file=a.dmp tables=dep_study.bas_region

Export: Release 10.2.0.4.0 - Production on Fri May 3 15:26:15 2013

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and UTF8 NCHAR character set

About to export specified tables via Conventional Path ...
EXP-00009: no privilege to export DEP_STUDY's table BAS_REGION
Export terminated successfully with warnings.
[oracle@GXDB1] $

3.給test_exp授予exp_full_database權(quán)限
SQL> grant exp_full_database to test_exp;

Grant succeeded.

4.成功導(dǎo)出表

[oracle@GXDB1] $exp test_exp/a@gxtest file=a.dmp tables=dep_study.bas_region

Export: Release 10.2.0.4.0 - Production on Fri May 3 15:29:20 2013

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and UTF8 NCHAR character set

About to export specified tables via Conventional Path ...
Current user changed to DEP_STUDY
. . exporting table                     BAS_REGION         17 rows exported
Export terminated successfully without warnings.

--ok 成功導(dǎo)出

5.收回select權(quán)限,并導(dǎo)出表

SQL>  revoke select on dep_study.bas_region from test_exp;

Revoke succeeded.

[oracle@GXDB1] $exp test_exp/a@gxtest file=a.dmp tables=dep_study.bas_region

Export: Release 10.2.0.4.0 - Production on Fri May 3 15:32:15 2013

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and UTF8 NCHAR character set

About to export specified tables via Conventional Path ...
Current user changed to DEP_STUDY
. . exporting table                     BAS_REGION
EXP-00056: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
Export terminated successfully with warnings.


結(jié)論:

    exp其他用戶的表,用戶需要擁有select表和exp_full_database(角色)兩個權(quán)限。

感謝各位的閱讀,以上就是“能select的表就可以exp嗎”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對能select的表就可以exp嗎這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!

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

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

AI