Hi I have developed one simple Batch Script for OBIEE RPD xml Patch Merge script.
Could you please do the same in automation using Shall script(For Linux Environment). In my case i gave you a specific one which can deal with 3 xml patch merges and it generates one Output RPD for each successful merge.
But my script will not handles any ERRORS at run time.
OBIEE RPD xml Patch Merge Command:
biserverxmlexec -P RANSBI#2014 -I D:\RPD'S\09032014\DEV\XML1.xml -B D:\RPD'S\09032014\DEV\RPD1.rpd -O D:\RPD'S\09032014\DEV\RPD2.rpd
Algorithm Flow:
All Inputs will in Present folder Named as Patch_Inputs
Inputs: N-number of XML patches(example:10- abc1.xml, abc2.xml,abc3.xml,...abc10.xml,), Main RPD (MASTER.rpd)
Step 1: Under present Directory Check and assign to XMl's to one Array varible xml{i}, and Master. RPD to rpd{j}
Step2: Based on xml file count begin a loop and start the merge process using below command:
biserverxmlexec -P RANSBI#2014 -I D:\RPD'S\09032014\DEV\XML1.xml -B D:\RPD'S\09032014\DEV\RPD1.rpd -O D:\RPD'S\09032014\DEV\RPD2.rpd
for each iteration output RPD will be input to next merge. If merge fails the handle the error and change the xml file without changing the RPD. If possible send a mail to group regarding xml patch error so that corresponding Dev team can know about the error.
Step 3: For each successful merge Output RPD need to be Validate using Validate command.
Under validation if something wrong need to be intimated with ERROR.
validaterpd -R repository.rpd -O results.txt -S
Step 4: For this total process log creation is required.
Regards,
Kishore
[email protected]
Batch Script for OBIEE RPD xml Patch Merge script.
@echo OFF
PAUSE
:: REm The format of %TIME% is HH:MM:SS,CS for example 23:59:59,99
set STARTTIME=%TIME%
CD C:\Middleware\Oracle_BI1\bifoundation\server\bin
set PWD=%CD%
echo **************************************************************************
echo.
echo OBIEE Patch Mearge Process Got Initiated on [%time% - %date%]
echo.
echo **************************************************************************
echo.
echo "Please Check Below parameters are Ok[Y]/Not[N]"
echo.
:: REM Patch Script Parameters Initiallization Start Point.
echo **************************************************************************
echo Number of Patch Merges: 3
echo Script Home path: C:\Middleware\Oracle_BI1\bifoundation\server\bin
echo Current Directory: %PWD%
echo Original Repository: RPD1.rpd
echo XML Patch File Name: XML1.xml
echo Modified Repository: RPD2.rpd
echo **************************************************************************
CHOICE /C YN
IF ERRORLEVEL 1 SET CHOICE=Y
IF ERRORLEVEL 2 SET CHOICE=N
::REM Conditional Check
IF %CHOICE% EQU N (
echo User Terminated the Patch Merge Initialization Process, Exiting now.
TIMEOUT 2
Exit /b
) ELSE (
echo Merge Script is Going to Start NOW:[%time%]
echo.
echo The Team Wise XMl's are Going to mearge by biserverxmlexec Command line Utility...
echo.
CALL biserverxmlexec -P RANSBI#2014 -I D:\RPD'S\09032014\DEV\XML1.xml -B D:\RPD'S\09032014\DEV\RPD1.rpd -O D:\RPD'S\09032014\DEV\RPD2.rpd
CALL biserverxmlexec -P RANSBI#2014 -I D:\RPD'S\09032014\DEV\XML2.xml -B D:\RPD'S\09032014\DEV\RPD2.rpd -O D:\RPD'S\09032014\DEV\RPD3.rpd
CALL biserverxmlexec -P RANSBI#2014 -I D:\RPD'S\09032014\DEV\XML3.xml -B D:\RPD'S\09032014\DEV\RPD3.rpd -O D:\RPD'S\09032014\DEV\RPD4.rpd
echo.
echo Merge Script is Going to End NOW:[%time%]
)
set ENDTIME=%TIME%
:: REM Total Time taken to Merge
set /A DURATION=%ENDTIME%-%STARTTIME%
echo Total Merge Time : %DURATION%
PAUSE 10