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

echo.
echo ==================================================
echo [BEGIN]: Exporting the %PDB_NAME% database.
echo ==================================================
echo.

REM %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/draradb-bucket/o/20250416/EXPDP_%PDB_NAME%_%YYYYMMDD%_META.DMP logfile=EXPDP_META.log FULL=YES CONTENT=METADATA_ONLY FLASHBACK_SCN=%ORA_SCN% LOGTIME=ALL REUSE_DUMPFILES=YES

 rem              set PAR_CHUNK=RARDW&      set EXP_CHUNK=01_DW_RAR&         start run_expdp_RAR.bat 
rem timeout  600 & 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

