Problem:-Impdp (network_link) over db_link issue with ORA-31631
Source side
create database link chennai_link connect to hari identified by “hari” using ‘pdb1’;
[oracle@devdb ~]$ impdp system/Chennai#123@devdb directory=dump_dir network_link=chennai_link tables=hari.chennai remap_schema=hari:system LOGFILE=delhi.log Import: Release 18.0.0.0.0 - Production on Fri Jul 13 04:20:43 2018 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production ORA-31631: privileges are required ORA-39149: cannot link privileged user to non-privileged user
Solution
Target side
SQL> conn system/Chennai#123@pdb1
Connected.
SQL> grant imp_full_database,exp_full_database to hari;
Grant succeeded.
[oracle@devdb ~]$ impdp system/Chennai#123@devdb directory=dump_dir network_link=chennai_link tables=chennai remap_schema=hari:system LOGFILE=delhi.log Import: Release 18.0.0.0.0 - Production on Fri Jul 13 04:27:37 2018 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Warning: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database. Starting "SYSTEM"."SYS_IMPORT_TABLE_01": system/********@devdb directory=dump_dir network_link=chennai_link tables=chennai remap_schema=hari:system LOGFILE=delhi.log Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 64 KB Processing object type TABLE_EXPORT/TABLE/TABLE . . imported "SYSTEM"."CHENNAI" 107 rows Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at Fri Jul 13 04:27:58 2018 elapsed 0 00:00:20