Hello Everyone,
In this article , we will learn how to utilize PARFILE parameter in DATAPUMP Exports and Imports.

what is parfile ?
Parfile is a parameter in datapump exports and imports . The name of the parfile can give in any format but extension should be .par .
We can make a simple text file anywhere you want in your system and name it as filename.par.
DATAPUMP Export using PARFILE:
create a sample text file with the extension .par , and include all the parameters which we use for export operation
| 1 2 3 4 5 6 | [oracle@oracle ~]$ cat >EXP_AVPROD_OE.par directory=dpump  dumpfile=EXP_AVPROD_OE_28012021.dmp   logfile=AVPROD_OE_28012021.log   schemas=OE parallel=3 Job_name=AVPROD_OE | 
After creating the parameter file you can execute the expdp export utility using PARFILE parameter.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | [oracle@oracle ~]$ expdp  parfile=EXP_AVPROD_OE.par               Export: Release 12.1.0.2.0 - Production on Thu Jan 28 07:13:15 2021 Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "SYS"."AVPROD_OE":  /******** AS SYSDBA parfile=EXP_AVPROD_OE.par  Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 5.375 MB . . exported "OE"."PRODUCT_DESCRIPTIONS"                 2.379 MB    8640 rows Processing object type SCHEMA_EXPORT/USER . . exported "OE"."CUSTOMERS"                            81.17 KB     319 rows . . exported "OE"."PRODUCT_INFORMATION"                  73.05 KB     288 rows . . exported "OE"."PRODUCT_REF_LIST_NESTEDTAB"           12.58 KB     288 rows . . exported "OE"."CATEGORIES_TAB"                       14.43 KB      22 rows . . exported "OE"."SUBCATEGORY_REF_LIST_NESTEDTAB"       6.656 KB      21 rows . . exported "OE"."INVENTORIES"                          21.77 KB    1112 rows . . exported "OE"."ORDERS"                               12.60 KB     105 rows . . exported "OE"."ORDER_ITEMS"                          21.02 KB     665 rows . . exported "OE"."PROMOTIONS"                           5.578 KB       2 rows Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM Processing object type SCHEMA_EXPORT/TYPE/INC_TYPE Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC Processing object type SCHEMA_EXPORT/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/XMLSCHEMA/XMLSCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/VIEW/COMMENT Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/VIEW/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER . . exported "OE"."PURCHASEORDER"                        247.7 KB     132 rows . . exported "OE"."WAREHOUSES"                           12.75 KB       9 rows Master table "SYS"."AVPROD_OE" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.AVPROD_OE is:   /u01/oradata/avprod/dpump/EXP_AVPROD_OE_28012021.dmp Job "SYS"."AVPROD_OE" successfully completed at Thu Jan 28 07:14:15 2021 elapsed 0 00:00:55 | 
Export completed successfully .
Note: We cannot write login information of the database user in Parameter file.
Dataump import using Parfile.
create different parfile for import.
| 1 2 3 4 5 6 | [oracle@oracle ~]$ cat >IMP_AVPROD_OE.par dumpfile=AVPROD_OE_28012021.dmp   logfile=AVPROD_IMP_OE_28012021.log   schemas=OE parallel=3 Job_name=AVPROD_IMP_OE | 
Now perform IMPDP utility using above PARFILE parameter.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | [oracle@oracle ~]$ impdp directory=dpump parfile=IMP_AVPROD_OE.par Import: Release 12.1.0.2.0 - Production on Thu Jan 28 07:21:41 2021 Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Master table "SYS"."AVPROD_IMP_OE" successfully loaded/unloaded Starting "SYS"."AVPROD_IMP_OE":  /******** AS SYSDBA directory=dpump parfile=IMP_AVPROD_OE.par  Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM Processing object type SCHEMA_EXPORT/TYPE/INC_TYPE Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC Processing object type SCHEMA_EXPORT/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/XMLSCHEMA/XMLSCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE ORA-39151: Table "OE"."PURCHASEORDER" exists. All dependent metadata and data will be skipped due to table_exists_action of skip Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "OE"."PRODUCT_DESCRIPTIONS"                 2.379 MB    8640 rows . . imported "OE"."CUSTOMERS"                            81.17 KB     319 rows . . imported "OE"."PRODUCT_INFORMATION"                  73.05 KB     288 rows . . imported "OE"."WAREHOUSES"                           12.75 KB       9 rows . . imported "OE"."PRODUCT_REF_LIST_NESTEDTAB"           12.58 KB     288 rows . . imported "OE"."CATEGORIES_TAB"                       14.43 KB      22 rows . . imported "OE"."SUBCATEGORY_REF_LIST_NESTEDTAB"       6.656 KB      21 rows . . imported "OE"."INVENTORIES"                          21.77 KB    1112 rows . . imported "OE"."ORDERS"                               12.60 KB     105 rows . . imported "OE"."ORDER_ITEMS"                          21.02 KB     665 rows . . imported "OE"."PROMOTIONS"                           5.578 KB       2 rows Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/VIEW/COMMENT Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/VIEW/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER ORA-39082: Object type VIEW:"OE"."ACCOUNT_MANAGERS" created with compilation warnings ORA-39082: Object type VIEW:"OE"."CUSTOMERS_VIEW" created with compilation warnings Job "SYS"."AVPROD_IMP_OE" completed successfully at Thu Jan 28 07:22:50 2021 elapsed 0 00:01:04 | 
Thank you for giving your valuable time to read the above information.
Follow us on 
Website :  www.ktexperts.com
Facebook Page : KTexperts
Linkedin Page : KT EXPERTS
 
 
		
 Loading...
Loading...


