@echo off
set ORACLE_HOME=F:\Oracle_client_21c\client
set DB_PASSWORD="v4F_hIe0M1D4#t9impp5"
set DB_NAME=TRARADB
set PDB_NAME=TRARADB
set RUN_ID=1
set credential=DEF_CRED_NAME
set ORA_SCN=44484502309920
set BUCKET_LOCATION=https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/frcnomajoc7v/b/traradb-bucket/o/
set YYYYMMDD=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%


echo.
echo ==================================================
echo [BEGIN]: Exporting the %PDB_NAME% database.
echo ==================================================
echo.
%ORACLE_HOME%\bin\expdp ADMIN/%DB_PASSWORD%@%DB_NAME% credential=DEF_CRED_NAME directory=DATA_PUMP_DIR DUMPFILE=https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/frcnomajoc7v/b/traradb-bucket/o/18032025_export/EXPDP_%PDB_NAME%_%YYYYMMDD%_META.DMP logfile=EXPDP_META.log FULL=YES CONTENT=METADATA_ONLY  LOGTIME=ALL REUSE_DUMPFILES=YES FLASHBACK_SCN=%ORA_SCN%

                set PAR_CHUNK=RARDW&      set EXP_CHUNK=01_DW_RAR&         start run_expdp_RAR.bat 
rem timeout  6000 & set PAR_CHUNK=RARDW&      set EXP_CHUNK=02_DM_RISKENGINE&  start run_expdp_RAR.bat 
timeout  9000 & set PAR_CHUNK=TRARDW&      set EXP_CHUNK=03_all&            start run_expdp_RAR.bat
pause
