I was trying to take full export
backup of the database using user from the pluggable database, the export
command threw below error
Users\shaik>expdp userid=techno_user@technopdb directory=export_dir
dumpfile=expdp_full_db.dmp logfile=expdp_full.log full=y
Export: Release 19.0.0.0.0 - Production on Tue Jun 14 20:42:47 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights
reserved.
Password:
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
- Production
ORA-31631: privileges are required
ORA-39161: Full database jobs require privileges
I realized that SYS, SYSTEM does
not need any explicit privileges to be granted while performing export and import,
but while using any other user, we need to grant proper privileges to take full
database export.
SQL> alter session set container=technopdb;
Session altered.
SQL> grant DATAPUMP_EXP_FULL_DATABASE to techno_user;
Grant succeeded.
Here I granted DATAPUMP_EXP_FULL_DATABASE
privileges to user and tried taking export and it worked
C:\Users\shaik>expdp userid=techno_user@technopdb
directory=export_dir dumpfile=expdp_full_db.dmp logfile=expdp_full.log full=y
Export: Release 19.0.0.0.0 - Production on Tue Jun 14 20:44:50 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights
reserved.
Password:
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
- Production
Starting "TECHNO_USER"."SYS_EXPORT_FULL_01":
userid=techno_user/********@technopdb directory=export_dir
dumpfile=expdp_full_db.dmp logfile=expdp_full.log full=y
Processing object type
DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type
DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Here we need to note that,
taking export and performing import requires special privileges
0 comments:
Post a Comment