Just Analytics Blog | Performance Management News, Views and Op-ed

Repository Migration/Movement from Dev to QA/Prod

Written by Umesh Kakkad | Nov 14, 2013 6:19:00 PM

Background:

We often do repository migration from DEV to QA/PROD, so every time we manually modify production parameters in DEV repository, because of this manual modification, most of the times it may end up in some problem after the migration of repository due to wrong change / missed to update. To avoid this kind of issues find out a way to update configuration settings/parameter using OBIEE utilities/commands.

This document explains about how to update the production repository, initialization block, variables & connection pool from DEV to DEV or DEV to PROD or any to any.

 

Steps to Migrate

  • Set OBIEE environment variables

[sourcecode language="sql" padlinenumbers="true"]$> export WORK_LOC=/obiee/rpdmig$> export MW_HOME=/obiee/obiee11g$> source $MW_HOME/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh[/sourcecode]

$> export WORK_LOC=/obiee/rpdmig$> export MW_HOME=/obiee/obiee11g$> source $MW_HOME/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh

 

  • Generate XUDML (eXtensible Universal Database Markup) XML file using below command

Syntax:

$> $ORACLE_HOME/bifoundation/server/bin/biserverxmlgen -R <Prod RPD> -P <RPD Password> -O <XUDML File Name> -8-R : Represent Repository Path
-O : Generates the output XUDML XML file
-8 : Represent the UTF-8 formatting for the XML file
-P : Represents the password of the base repository

Example:

$> biserverxmlgen -R PROD.rpd -P Password -O PROD.xml -8XUDML generation was successful.

 

  • Edit PROD.xml file to remove inapplicable entries manually or use step 5 & 6

Depending on migration you may remove xml tag other than ConectionPool, InitBlock, & Variables. If, you migrate only then you may remove “other than ConnectionPool entries”.

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='trimnodes.xsl'?>
<Repository xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DECLARE>
<Connection Pool ......>
</ConnectionPool>
<InitBlock .....>
</InitBlock>
<variable .....>
</variable>
</DECLARE>
</Repository>

 

  • After removing inapplicable entries from PROD.xml file, add below entry in PROD.xml file as second line like above
<?xml-stylesheet type='text/xsl' href='trimnodes.xsl'?>

 

  • Create file trimnodes.xsl in $WORK_LOC to remove inapplicable entries from PROD.xml file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/><xsl:template match="/Repository">
<xsl:copy>
<xsl:apply-templates select="DECLARE"/>
</xsl:copy>
</xsl:template><xsl:template match="DECLARE">
<xsl:copy>
<xsl:apply-templates select="ConnectionPool"/>
<xsl:apply-templates select="InitBlock"/>
<xsl:apply-templates select="Variable"/>
</xsl:copy>
</xsl:template><xsl:template match="ConnectionPool">
<xsl:copy-of select="."/>
</xsl:template><xsl:template match="InitBlock">
<xsl:copy-of select="."/>
</xsl:template><xsl:template match="Variable">
<xsl:copy-of select="."/>
</xsl:template></xsl:stylesheet>

 

  • Trim the XUDML XML file using below command
$> xsltproc $WORK_LOC/trimnodes.xsl PROD.xml > PROD_CONN.xml

 

  • Apply prod connection settings from PROD_CONN.xml to QA/DEV/DEV repository

 

Syntax:

$> $ORACLE_HOME/bifoundation/server/bin/biserverxmlexec -I [XUDML File] -B [DEV Repository] -P [RPD Password] -O [RPD NAME]-I : Option take input as production connection pool XUDML file name and location.
-B : To input DEV respository name and location
-P : To input DEV respository password
-O : To input output respository name and location

 

Example:

$> biserverxmlexec -I PROD_CONN.xml -B QA.rpd -P Password -O PROD_NEW.rpd

---------------Complete Success!!---------------

 

PROD_NEW.rpd repository file is ready with Production configurations, so you can use deploy for new repository in production environment.