Export Estimate

        $ expdp "'/ as sysdba'" full=y estimate_only=y   
     

Export Full Database

	expdp "'/ as sysdba'"  
        full=y   
        directory=DATA_PUMP_DIR dumpfile=exp%U.dmp   
        parallel=3   
        content=all   
        compression=all  
        filesize=20G  
        logfile=dbname.log  
      

Export Schemas with Exclusions

        expdp "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" parfile=export_schema.par 
        
        SCHEMAS=AABRIDGEUSER,EXIMSYS,owner,EXIMUSER 
        directory=DATAPUMP_DIR 
        dumpfile=exp%U.dmp 
        parallel=7 
        content=all 
        compression=all 
        filesize=20G 
        logfile=scsAA.log 
        EXCLUDE=TABLE:"IN('TRX_DOCS_INDX_MGR','TRX_GAPI_LOG','AA_BRIDGE_MESSAGES','table_name')" 
      

Export Table with Query

       tables=owner.table_name
       directory=DATAPUMP_DIR_SEC 
       dumpfile=table_name_exp%U.dmp 
       filesize=20G 
       parallel=5 
       compression=all 
       logfile=table_name.log 
       query=owner.table_name:"WHERE rownum < 1001"
      

Export Table

       expdp "'/ as sysdba'" 
       tables=owner.table_name
       directory=DATAPUMP_DIR
       dumpfile=table_name.dmp logfile=table_name.log
      

Source schema to target schema

         impdp a157584/loan12# DIRECTORY=data_pump_dir REMAP_SCHEMA=bs1:bs2 dumpfile= bs1.Jan20_post.dmp
      

Export Specific Schemas

       for sch in EXIMTRX EXIMSYS EXIMUSER AABRIDGEUSER 
       do 
        user_expdp.sh -d s2csAA -u ${sch} -t 1414863 -p DATAPUMP_DIR -l 
       done 
    

  tables=EXIMTRX.PYMT_LEDGER
directory=DATA_PUMP_DIR
dumpfile=PYMT_LEDGER_exp%U.dmp
filesize=20G parallel=5
compression=all
logfile=PYMT_LEDGER.log
query=EXIMTRX.PYMT_LEDGER:"WHERE D_CREA_DATE >= trunc(sysdate-(6*31)) and D_CREA_DATE < trunc(sysdate+1)"

Import Table

       impdp "'/ as sysdba'" 
       tables=owner.table_name
       directory=DATAPUMP_DIR
       dumpfile=table_name.dmp 
       logfile=table_name.log
      

Export with subqueries

CREATE OR REPLACE DIRECTORY DATA_PUMP_DIR AS '/bkp_clouds2z031/datapump/XYZprd01';
GRANT READ, WRITE ON DIRECTORY DATA_PUMP_DIR TO XYZ;
GRANT ALL ON DBA_DIRECTORIES TO XYZ;


customerparamfile.par
---------------------
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=XYZ_20221029%u.dmp
LOGFILE=XYZ_20221029.log
FILESIZE=2GB
EXCLUDE=TABLE:"IN( select DISTINCT table_name from sys_entity_config where runtime_msg_data
EXCLUDE=TABLE:"IN( select DISTINCT table_name from all_tables where table_name like '%_AUDIT')
EXCLUDE=TABLE:"IN (select DISTINCT table_name from all_tables where table_name like '%_ADT')"
EXCLUDE=TABLE:"IN( select DISTINCT table_name from all_tables where table_name in ('ACTIVITY_INSTANCE','TRANS_INST','GTW_TX_MSG_ENTR_TPL','ISIN_SECURITY')"
# ustomer is using oracle version higher than 12.1.x release, then please uncomment the nextline.
# Version=12.1
# end of parameter file


expdp XYZ/****** parfile=customerparamfile.par
HOME