ORACLE database server exports DMP format prompts that there is no access permission solution

In the oracle database, if the data needs to be exported to DMP format, it cannot be done using PLSQL and needs to be exported through the database server.

The operation method is as follows:

1. Log in to the database server

2. Switch the database user
insert image description here
3. Execute the command of the table data that needs to be exported

Take the table APPLSYS.FND_ID_FLEX_SEGMENTS as an example

exp gl/gl file=/data03/bakdmp/test.dmp log=/data03/bakdmp/test.log tables=APPLSYS.FND_ID_FLEX_SEGMENTS

Command explanation:

exp: export (the import command is imp)

gl/gl: user name and secret
file=/data03/bakdmp/test.dmp: exported file name and path
log=/data03/bakdmp/test.log: exported log name and path tables
=APPLSYS.FND_ID_FLEX_SEGMENTS: tables that need to be exported The data
prompts after execution: EXP-00009: no privilege to export APPLSYS's table FND_ID_FLEX_SEGMENTS (no permission to export the table). The
insert image description here
reason is that the user does not have the permission role to export database data: EXP_FULL_DATABASE;
insert image description here
therefore, first give the user the EXP_FULL_DATABASE role:

alter user 此处填用户名 default role EXP_FULL_DATABASE;

After the user is assigned the EXP_FULL_DATABASE role, the query is as follows:
insert image description here
After being assigned the EXP_FULL_DATABASE role, exporting a DMP format file from the database still reports an error, indicating that there is no permission. The reason is that the default value of the export role permission EXP_FULL_DATABASE is NO.

The solution is as follows:

Execute the command:

alter user 此处填用户名 default role all;

Command interpretation: Enable all role permissions for this user by default.

After execution, the query is as follows:
insert image description here
4. Execute the export command again
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_38696286/article/details/125975861