@echo off
set ORACLE_HOME=F:\Oracle_client_21c\client
set DB_PASSWORD="_S-uFRsT3-S#mH0teX4R"
set DB_NAME=TODSADB
set PDB_NAME=ODSADB
set RUN_ID=1
set credential=DEF_CRED_NAME
set BUCKET_LOCATION=https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/frcnomajoc7v/b/todsadb-bucket/o/18032025_export/
set ORA_SCN=44484502309920
set YYYYMMDD=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%


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

               set PAR_CHUNK=ODSADB&     set EXP_CHUNK=01_all_test&         start run_expdp_ODS.bat 
  timeout  4500 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=02_OU_RIAD&     start run_expdp_ODS.bat 
  timeout  4500 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=03_OU_SHS&      start run_expdp_ODS.bat 
  timeout  4500 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=04_OU_TMS&      start run_expdp_ODS.bat 
  timeout  9000 & set PAR_CHUNK=ODSADB&     set EXP_CHUNK=05_CSDB_TAB_1&  start run_expdp_ODS.bat 
  timeout  3000 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=06_CSDB_TAB_2&  start run_expdp_ODS.bat 
  timeout  3000 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=07_CSDB_TAB_3&  start run_expdp_ODS.bat 
  timeout  3000 & set PAR_CHUNK=ODSADB&      set EXP_CHUNK=08_CSDB_TAB_4&  start run_expdp_ODS.bat  
  timeout  4500& set PAR_CHUNK=ODSADB&      set EXP_CHUNK=09_OU_CSDB_all& start run_expdp_ODS.bat  
pause   


