Get the App
SLTechnology News&Howtos  ›  Servers  › 

Can select's watch be exp?

Shulou Source: shulou.com Published: 2022-05-31 12:23:12 09月21日 Update

This article mainly explains the "can select table can exp", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "can select table can exp?"

1. Establish export test users and grant relevant permissions

[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.

two。 Export the dep_study.bas_ region table

[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. Grant exp_full_database permission to test_exp

SQL > grant exp_full_database to test_exp

Grant succeeded.

4. Successful export table

[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 successfully exported

5. Revoke select permissions and export the table

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.

Conclusion:

Exp other users' tables, the user needs to have both select table and exp_full_database (role) permissions.

Thank you for your reading, the above is "can select table can exp" content, after the study of this article, I believe you can select the table can exp this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Permissions users learning success content two that is ideas situations articles more knowledge knowledge points articles conclusions roles follow questions practice push Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Shulou Technology vpn Xiaomi