@echo off
set ORACLE_HOME=C:\OracleClient\oracle64\19.3.0\client
set DB_PASSWORD="Agvdk_12Vfsjsm_87Luas"
set DB_NAME=arardw_svc.acc.tns
set PDB_NAME=ARARDW
set RUN_ID=1

set YYYYMMDD=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
set ORA_SCN=41453758655839
echo.
echo ==================================================
echo [BEGIN]: Exporting the %PDB_NAME% database.
echo ==================================================
echo.

%ORACLE_HOME%\bin\expdp PDBADMIN/%DB_PASSWORD%@%DB_NAME% directory=%PDB_NAME%_DUMP_DIR DUMPFILE=EXPDP_%PDB_NAME%_%YYYYMMDD%_META.DMP logfile=EXPDP_%PDB_NAME%_%YYYYMMDD%_META_%RUN_ID%.log FULL=YES CONTENT=METADATA_ONLY FLASHBACK_SCN=%ORA_SCN% LOGTIME=ALL REUSE_DUMPFILES=YES

           set PAR_CHUNK=RARDW&      set EXP_CHUNK=01_DW_RAR&         start run_expdp_RAR.bat 
timeout  300 & set PAR_CHUNK=RARDW&      set EXP_CHUNK=02_DM_RISKENGINE&  start run_expdp_RAR.bat 
timeout  900 & set PAR_CHUNK=%PDB_NAME%& set EXP_CHUNK=03_all&            start run_expdp_RAR.bat 
pause

