Site icon IT Tutorial

Expdp / Impdp Functions Procedure Package View Index Trigger in Oracle

I will explain Expdp / Impdp Functions,Procedure,Package,View,Index,Trigger in Oracle in this post.

 

Expdp / Impdp Functions,Procedure,Package,View,Index,Trigger in Oracle

You can only export and import of Functions,Procedure,Package,View,Index,Trigger and etc using expdp and impdp commands via Exclude and Include parameter.

 

If you want to learn more details about Exclude and Include parameter, read the following posts.

 

Expdp exclude Schemas & Expdp exclude tables in Oracle

 

Include option in EXPDP and IMPDP in Oracle Datapump

 

 

 

 

 

Expdp / Impdp Functions

Sometimes you need only export named stored procedures and functions using the expdp as follows.

EXCLUDE=[object_type]:[name_clause],[object_type]:[name_clause]

INCLUDE=[object_type]:[name_clause],[object_type]:[name_clause]
expdp schemas=HR include=function,package,procedure expdp schemas=HR include=function like 'myFUNCT%'; expdp schemas=HR exclude=package include procedure like '%sales%';

 

For Example; If you want to export only Functions, Procedures,Packages, Views,Indexes,Grant,Constraints, you can perform it as follows.

 

expdp \"/ as sysdba\" directory=DATA_PUMP_DIR dumpfile=MetadataBackup%U.dmp schemas=MSDB logfile=MetadataBackup.log parallel=8 cluster=n  include=function,package,procedure,index,view,grant,constraint

 

Or You can import only Functions, Procedures,Packages, Views,Indexes,Grant,Constraints as follows.

impdp \"/ as sysdba\" directory=DATA_PUMP_DIR dumpfile=FullBackup%U.dmp schemas=MSDB logfile=MetadataBackup.log parallel=8 cluster=n include=function,package,procedure,index,view,grant,constraint

 

 

How to export selected functions ?

If you want to export selected Functions, Procedures,Packages, you can perform it as follows.

expdp schemas=HR include=package include=procedure like '%sales%';

expdp schemas=HR include=package include=function like '%hrFunct%';

expdp schemas=HR include=package include=package like '%CRM_PACKAGE%';

 

 

You can read the following post to learn more details about Oracle Datapump.

Oracle Data Pump – Export Import ( Expdp Impdp ) Tutorial with Examples-4

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

Exit mobile version