Search This Blog

Total Pageviews

Monday, 12 January 2026

oracle impdp example for pdb


expdp with password !!!!

$expdp anuj directory=DP_EXP_DIR dumpfile=emp.dmp logfile=emp.log encryption=all encryption_mode=password encryption_password=vihaan123 tables=anuj.emp

Export: Release 12.2.0.1.0 - Production on Tue Jan 20 07:17:17 2026

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
Password:




Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "ANUJ"."SYS_EXPORT_TABLE_01":  anuj/******** directory=DP_EXP_DIR dumpfile=emp.dmp logfile=emp.log encryption=all encryption_mode=password encryption_password=******** tables=anuj.emp
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
. . exported "ANUJ"."EMP"                                145.2 MB 3670016 rows
Master table "ANUJ"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ANUJ.SYS_EXPORT_TABLE_01 is:
  /dumps/dp_exp_dir/emp.dmp
Job "ANUJ"."SYS_EXPORT_TABLE_01" successfully completed at Tue Jan 20 07:21:50 2026 elapsed 0 00:04:21


=====
only metadata 

expdp \'/as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_TST_FULL_DDL_%U.dmp logfile=expdp_TST_FULL_DDL.log FULL=Y CONTENT=METADATA_ONLY PARALLEL=4 EXCLUDE=STATISTICS EXCLUDE=TABLE_STATISTICS,INDEX_STATISTICS EXCLUDE=AUDIT_TRAILS

Export: Release 12.2.0.1.0 - Production on Tue Jan 20 08:56:28 2026

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

Starting "SYS"."SYS_EXPORT_FULL_01":  "/******** AS SYSDBA" directory=DP_EXP_DIR dumpfile=expdp_TST_FULL_DDL_%U.dmp logfile=expdp_TST_FULL_DDL.log FULL=Y CONTENT=METADATA_ONLY PARALLEL=4 EXCLUDE=STATISTICS EXCLUDE=TABLE_STATISTICS,INDEX_STATISTICS EXCLUDE=AUDIT_TRAILS
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABAS

Master table "SYS"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_FULL_01 is:
  /dumps/dp_exp_dir/expdp_TST_FULL_DDL_01.dmp
  /dumps/dp_exp_dir/expdp_TST_FULL_DDL_02.dmp
  /dumps/dp_exp_dir/expdp_TST_FULL_DDL_03.dmp
  /dumps/dp_exp_dir/expdp_TST_FULL_DDL_04.dmp
Job "SYS"."SYS_EXPORT_FULL_01" successfully completed at Tue Jan 20 09:05:26 2026 elapsed 0 00:08:52

====
[oracle@ibrac01:~] $impdp \'/as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_TST_FULL_DDL_%U.dmp logfile=impdp_TST_FULL_DDL.log sqlfile=full.sql

Import: Release 12.2.0.1.0 - Production on Tue Jan 20 09:30:05 2026

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "SYS"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_SQL_FILE_FULL_01":  "/******** AS SYSDBA" directory=DP_EXP_DIR dumpfile=expdp_TST_FULL_DDL_%U.dmp logfile=impdp_TST_FULL_DDL.log sqlfile=full.sql
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/TABLESPACE
P

===

PDB 

nohup impdp system/vihaan@TESTORC1 directory=DATA_PUMP_EXP1 dumpfile=ANUJ_JAN071125.dmp logfile=impdp_CHECK_12JAN2025_.log  REMAP_TABLESPACE=USERS:ANUJTB schemas=ANUJ CLUSTER=N full=N status=10 metrics=Y TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y EXCLUDE=STATISTICS &



========================================================================================

example !!!!!!!!!!!!!!!


w expdp \'/ as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_tables.dmp logfile=expdp_tables.log INCLUDE=table:\"in \(select table_name from all_tables where table_name like \'IMG_%\' or table_name like \'%HIST%\'\)\" w expdp \'/ as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_tables.dmp logfile=expdp_tables.log schemas=DATA INCLUDE=table:\"in \(select table_name from all_tables where table_name like \'%TRACKER%\'\)\" w expdp \'/ as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_tables.dmp logfile=expdp_tables.log schemas=DATA INCLUDE=table:\"in \(select table_name from all_tables where table_name=\'CSI_TRACKER\'\)\" expdp \'/ as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_tables.dmp logfile=expdp_tables.log schemas=DATA INCLUDE=table:\"in \(select table_name from all_tables where table_name=\'C_TRACKER\'\)\" w working Table expdp \'/ as sysdba\' directory=DP_EXP_DIR dumpfile=expdp_tables2.dmp logfile=expdp_tables2.log tables=DATA.CSI_TRACKER,DATA.T w ******************************** expdp vihaan/vihaan123@anujpdb directory=anujdp schemas=vihaan dumpfile=vihaan.dmp FLASHBACK_TIME=\"TO_TIMESTAMP\(\'20-05-2015 08:24:25\', \'DD-MM-YYYY HH24:MI:SS\'\)\" expdp \'/as sysdba\' directory=DP_EXP_DIR tables=scott.emp dumpfile=expdp_emp_%U.dmp logfile=expdp_emp.log estimate=STATISTICS PARALLEL=4 EXCLUDE=STATISTICS EXCLUDE=TABLE_STATISTICS,INDEX_STATISTICS Export: Release 12.2.0.1.0 - Production on Tue Apr 21 01:55:46 2026 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production Starting "SYS"."SYS_EXPORT_TABLE_01": "/******** AS SYSDBA" directory=DP_EXP_DIR tables=scott.emp dumpfile=expdp_emp_%U.dmp logfile=expdp_emp.log estimate=STATISTICS PARALLEL=4 EXCLUDE=STATISTICS EXCLUDE=TABLE_STATISTICS,INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . estimated "SCOTT"."EMP" 4.683 KB Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT . . exported "SCOTT"."EMP" 0 KB 0 rows Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type TABLE_EXPORT/TABLE/TABLE Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.SYS_EXPORT_TABLE_01 is: /dumps/dp_exp_dir/expdp_emp_01.dmp /dumps/dp_exp_dir/expdp_emp_02.dmp Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Tue Apr 21 01:56:07 2026 elapsed 0 00:00:18 [oracle@ibrac01:~] $ls -ltr /dumps/dp_exp_dir/expdp_emp_01.dmp -rw-r----- 1 oracle oinstall 8192 Apr 21 01:56 /dumps/dp_exp_dir/expdp_emp_01.dmp Dump file set for SYS.SYS_EXPORT_TABLE_01 is: /dumps/dp_exp_dir/expdp_emp_01.dmp /dumps/dp_exp_dir/expdp_emp_02.dmp Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Tue Apr 21 01:56:07 2026 elapsed 0 00:00:18 remap option !!!! impdp \'/as sysdba\' REMAP_SCHEMA=SCOTT:SCOTT1 REMAP_TABLE=emp:emp2 directory=DP_EXP_DIR dumpfile=expdp_emp_%U.dmp logfile=impdp_emp1.log [oracle@irac01:~] $sqlme SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 21 02:33:41 2026 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> select count(*) from scott1.emp2; COUNT(*) ---------- 0



No comments:

Oracle DBA

anuj blog Archive