@echo off
set ORACLE_HOME=C:\OracleClient\product\19.0.0\client_1
set DB_PASSWORD="4uCrX_aPKukRYHRIJVg0M"
set DB_NAME=tsbiods_svc.tst.tns
set PDB_NAME=TSBIODS
set RUN_ID=1

set YYYYMMDD=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
set ORA_SCN=982347558041

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=%PDB_NAME%&  set EXP_CHUNK=01_all&         start run_expdp_ODS.bat 
timeout  450 & set PAR_CHUNK=SBIODS&      set EXP_CHUNK=02_OU_RIAD&     start run_expdp_ODS.bat 
timeout  300 & set PAR_CHUNK=SBIODS&      set EXP_CHUNK=03_OU_SHS&      start run_expdp_ODS.bat 
timeout  300 & set PAR_CHUNK=SBIODS&      set EXP_CHUNK=04_OU_TMS&      start run_expdp_ODS.bat 
timeout  900 & set PAR_CHUNK=SBIODS&      set EXP_CHUNK=05_CSDB_TAB_1&  start run_expdp_ODS.bat 
timeout  300 & set PAR_CHUNK=SBIODS&      set EXP_CHUNK=09_OU_CSDB_all& start run_expdp_ODS.bat  
pause   


