Friday, December 28, 2012

Merging and Importing Objects from Different Repositories by Using the Oracle BI 11g Administration Tool


Overview

This tutorial provides step-by-step procedures for merging objects from different repositories by using the Administration Tool.

Scenario

In this tutorial, you initially review two different concepts for merging. You then practice these two concepts by performing a standard three-way merge and a three-way merge with no common parent.

Software Requirements

Following is a list of software requirements:
  • Oracle BI EE 11.1.1.5 or later must be installed along with the Sample Application schema (BISAMPLE) that is available for use with Oracle Business Intelligence 11g. If you haven't installed the Sample Applications (825), you can install both the Sample Application schema and repository from here.
  • SampleAppLite.rpd must be available on an accessible drive (local or network) as an alternate repository for merging. If SampleAppLite.rpd is not available, you can unzip it from here and save it to <ORACLE_INSTANCE>\bifoundation\OracleBIServerComponent\coreappplication_obips1\repository (for example,c:\bi11g\instances\instance3\bifoundation\OracleBIServerComponent\coreappplication_obips1\repository). SampleAppLite is a lightweight version that ships with the Oracle BI EE Simple Install, while SampleApp is the full version with many more examples and features.
  • A text editor, such as MS Notepad or MS WordPad must be installed.
Note: Oracle BI Release 11g (11.1.1.5) automatically appends a numeric suffix to each version of the .rpd file. In this tutorial, the repository is SampleApp_BI0009.rpd. Additionally, the SampleAppLite repository file also follows this version naming convention (for example, SampleAppLite_BI0001.rpd).

Prerequisites

Before starting this tutorial, you should:
  • Have some familiarity with the Oracle BI 11g Administration Tool
  • Have proper permissions for installing and configuring Oracle BI EE on your company's system
Note: Screen captures for this tutorial were taken in a Windows XP Professional environment; therefore, Start menu options and colors may vary.

Examining Merge Scenarios

The Oracle BI Repository development process is conceptually identical to the classic Software Configuration Management (SCM) three-way merge, in that changes are managed by merge and reconciliation in a multiuser development environment (MUDE). The Oracle BI Repository is stored as an .rpd file. Changes are managed by using the Administration Tool. Developers check out the file and make changes locally. Then, these changes are reconciled and merged into the master repository. To read a more detailed description and view an image of the merge process, click this link. Please note that this process is covered in detail in the OBE,"Setting Up a Multiuser Development Environment by Using the Oracle BI 11g Administration Tool" (located in the Business Intelligence section of the Oracle Learning Library).
However, as an administrator, you may want to manually merge the changes from multiple repositories or import objects from different repositories outside of the MUDE. Oracle BI EE offers inherent support for the classic three-way merge inside and outside the MUDE. The two main scenarios (outside of the MUDE) are discussed in this tutorial.

Describing Merge Types

The two merge types discussed in this tutorial are presented below:
1 .Screenshot for StepStandard three-way merge (three-way merge with a common parent): This merge is useful when you have a common parent repository and two derived repositories.
For example, you may have development and production repositories, both derived from a common parent repository. You may want to import or merge the changes from the development repository into the production repository. The three-way merge process, as indicated in the diagram to the right, depicts the Parent RPD, and two derived RPDs—RPD A and RPD B. After the merge, a fourth merged repository file, Merged RPD, is created. Note that modified or new objects are listed with an asterisk (*).
In RPD A, the object, Obj1, is modified, and a new object, NewObjX, is created. Similarly, a new object, NewObjB, is created in RPD B. When these two repositories are merged, the merged repository containsobj1 (inherited from the parent and modified in RPD A), and also the new objects (NewObjX and NewObjB from both repositories.
2 .Screenshot for StepThree-way merge with no common parent: This is a special case for merging, where you are merging objects from two different repositories with no common parent.
For example, as an administrator, you may want to import objects, such as subject areas or folders, from a different repository into your current or working repository. In this particular case, the repositories to be merged do not have a common parent—this scenario is depicted in the diagram to the right.
Both repositories are treated differently. Conflicting object names are duplicated while merging or importing. A suffix #n is appended (where #n is a variable number). RPD A and RPD B are treated as separate repositories and are compared to a blank repository (representing no common parent). The merging process will not overwrite Obj1; instead, both copies of Obj1 (Obj1 and, Obj1#1*) from RPD A and RPD B are retained in the merged repository. Also note that new objects from both repositories (NewObjB* andNewObjX*) are created in the merged repository.

Merging Objects from Different Repositories with a Common Parent (Standard Three-Way Merge)

In the scenario within this topic, you have a development (or current) repository in which you are working. A modified repository in which the changes are made is also present. Both these repositories are derived from the same parent.
To compare these two repositories against the original repository and merge your changes to create a fourth merged repository file, perform the following steps:
1 .Create copies with which to work. Navigate to<ORACLE_INSTANCE>\bifoundation\OracleBIServerComponent\coreappplication_obips1\repository (for example,c:\bi11g\instances\instance3\bifoundation\OracleBIServerComponent\coreappplication_obips1\repository) and select the SampleApp repository (for example, SampleApp_BI0009.rpd).
Screenshot for Step
2 .Right-click and from the shortcut menu, select Copy.
Screenshot for Step
3 .Click Edit > Paste three times, and then rename the three copied repositories as follows: original_SampleApp_BI0009.rpd,modified_SampleApp_BI0009.rpd, and current_SampleApp_BI0009.rpd. Your repository folder should look similar to this:
Screenshot for Step
4 .Open modified_SampleApp_BI0009.rpd in offline mode by using the Administration Tool. Click Start > All Programs > Oracle Business Intelligence > BI Administration. The Administration Tool appears.
Screenshot for Step
Note: When you first start the Administration Tool, a DOS window appears. Keep this window open while you work. You can minimize the window to avoid accidentally closing it.
5 .Click File > Open > Offline.
Screenshot for Step
6 .In the Open dialog box, select modified_SampleApp_BI0009.rpd and click Open.
Screenshot for Step
7 .In the Open Offline dialog box, enter the administrator's Repository Password (this password should be Admin123) and click OK. If you are unsure of this password, you can verify it with your local administrator.
Screenshot for Step
The repository opens in offline mode.
Screenshot for Step
8 .Change the view within the Administration Tool to gain more space. Click View, and then deselect Business Model and Mapping Layer. Similarly deselect the Physical layer. Only the Presentation layer should be visible.
Your repository should look like this:
Screenshot for Step
9 .Make your changes to the modified repository. Expand A- Sample Sales and Time, select T05 Per Name Year (to change the display name), and then right-click and select Properties from the shortcut menu.
Screenshot for Step
The Presentation Column - T05 Per Name Year Properties dialog box appears.
Screenshot for Step
10 .Deselect the Use Logical Column Name check box to enable the Name text box, and delete T05 Per Name. The Properties dialog box should look like this:
Screenshot for Step
11 .Click OK.
12 .Similarly change T01 Per Name Week and T02 Per Name Month. The Presentation layer should look like this:
Screenshot for Step
13 .Save the repository. Click File > Save and when prompted to check for consistency, click No.
Screenshot for Step
Note that in this tutorial, you are simulating a modified repository scenario. You should check global consistency in your real-time production environment because it validates the consistency of the metadata repository. For example, if you click Yes in the above case, the following warnings may appear in the Consistency Check Manager.
Screenshot for Step
14 .Click File > Close to close modified_SampleApp_BI0009.rpd.
15 .Open current_SampleApp_BI0009.rpd in offline mode. Click the Open Offline icon ().
16 .In the Open dialog box, select current_SampleApp_BI0009.rpd and click Open.
Screenshot for Step
17 .In the Open Offline dialog box, enter the administrator's Repository Password (Admin123) and click OK.
The repository opens in offline mode.
Screenshot for Step
Review the A - Sample Sales node, specifically Time. Note that your changes are not reflected in this version of the repository.
Screenshot for Step
18 .Delete the following nodes:
  • B - Sample Quotas
  • C - Sample Headcount
  • E - Sample Essbase
  • F - Sample Essb Federated
  • H - Sample Olap
  • M - Datamining
  • O - Fusion Order Demo
  • U - Usage Tracking
Ctrl-click to select multiple nodes, and then right-click and select Delete from the shortcut menu. When prompted to confirm the deletion, click Yes.
The repository should look like this:
Screenshot for Step
Note that you can still expand the node, A - Sample Sales, to view the Presentation layer tables.
19 .Now you have a current, working repository (current_SampleApp_BI0009.rpd) and a modified repository (modified_SampleApp_BI0009.rpd) that is derived from the same parent repository (original_SampleApp_BI0009.rpd).
Save the repository and do not check for consistency.
20 .The next step is to merge the changes. Select File > Merge.
Screenshot for Step
21 .The Merge Repository Wizard - Select Input Files page appears. Click Select for Original Master Repository.
Screenshot for Step
22 .Select original_SampleApp_BI0009.rpd.
Screenshot for Step
23 .Click Open. The original repository name appears in the Original Master Repository text box.
Screenshot for Step
24 .Enter the original repository password (Admin123) in the Repository Password text box.
Screenshot for Step
25 .Click Select for Modified Repository.
Screenshot for Step
26 .Select modified_SampleApp_BI0009.rpd and click Open.
Screenshot for Step
27 .Enter the modified repository password (Admin123) in the Repository Password text box.
28 .Click Select for "Save Merged Repository as."
Screenshot for Step
The "Select repository file to save the merged result" dialog box appears.
Screenshot for Step
29 .Change the default name of the merge repository. Enter merged_SampleApp_BI0009.rpd in the "File name" text box, and then click Save.
Screenshot for Step
The wizard should look like this:
Screenshot for Step
30 .Click Next. The Merge Repository Wizard - Define Merge Strategy page appears. This page allows you to make informed decisions about changed objects. You decide whether to include or exclude objects by choosing Current or Modified from the Decision drop-down list.
Screenshot for Step
31 .Select the first row (Subject Area, C - Sample Headcount). The Differences pane refreshes with conflict details. Also notice that the repository panes area displays the original (original_SampleApp_BI0009), modified (modified_SampleApp_BI0009), and current (current_SampleApp_BI0009) repositories.
Screenshot for Step
32 .Click the ellipsis button () to the right of the Differences table to review the details of the objects that were modified.
Screenshot for Step
33 .Click Cancel.
34 .At this point, you need to make a decision about how to proceed with the merge. In the Conflicts table at the top of the wizard, from the Decision drop-down list for each Subject Area object, select Current for each subject area node except U - Usage Tracking. For this node, select Modified (A), indicating that you do not accept deletion of the Usage Tracking subject area.
Screenshot for Step
Object relationships can be interconnected through their properties. If this is the case, By Property appears in the Decision drop-down list. The wizard page in the image below is such an example:
Screenshot for Step
To learn more about Merge Strategy, refer to Oracle Fusion Middleware Metadata Repository Builder’s Guide for Oracle Business Intelligence Enterprise Edition 11g Release 1.
35 .Click Finish. The merged_SampleApp_BI0009.rpd repository appears with your changes. Expand the A - Sample Sales subject area and the Time node. Review the changes to the Time node columns. The Usage Tracking subject area is still available, because Modified (A) was chosen versus Current (where the subject area was deleted).
Screenshot for Step

Merging Objects from Different Repositories Without a Common Parent (Two-Way Merge)

Although there are numerous scenarios for this technique, a simple scenario of importing new objects from two different repositories is employed in this topic. Initially, you create a blank repository (this simulates that there isn't a parent), and then you merge the objects from two different repositoriesSampleApp_BI0009.rpd andSampleApp Lite.rpd.
To merge these two repositories and to create a new merged repository file, perform the following steps:
1 .Create a blank repository in offline mode by using the Administration Tool. This is a one-time process.
Click Start > All Programs > Oracle Business Intelligence > BI Administration. The Administration Tool appears.
Screenshot for Step
2 .Click File > New Repository.
Screenshot for Step
The Create New Repository - Repository Information page appears.
Screenshot for Step
3 .Enter Blank in the Name text box.
Screenshot for Step
4 .Select No for the Import Metadata radio button.
Screenshot for Step
5 .Enter Admin123 in the Repository Password and Retype Password text boxes, and then click Finish.
Screenshot for Step
6 .The Blank.rpd repository appears.
Screenshot for Step
7 .Review SampleAppLite_BI0001.rpd in offline mode. Click File > Open > Offline.
8 .In the Open dialog box, select SampleAppLite_BI0001.rpd and click Open.
Screenshot for Step
9 .In the Open Offline dialog box, enter the administrator's Repository Password (Admin123) and click OK.
Screenshot for Step
The repository opens in offline mode.
Screenshot for Step
10 .Expand the Sample Sales Lite subject area and review the available objects.
Your repository should look like this:
Screenshot for Step
11 .Click File > Merge. The Merge Repository Wizard - Select Input Files page appears. Click Select for Original Master Repository.
Screenshot for Step
12 .Select Blank.rpd as the original repository.
Screenshot for Step
13 .Click Open.
Screenshot for Step
14 .Enter the Original Master Repository password (Admin123) in the Repository Password text box.
Screenshot for Step
15 .Click Select for Modified Repository.
Screenshot for Step
16 .Select SampleApp_BI0009.rpd and click Open.
Screenshot for Step
17 .Enter the Modified Repository password (Admin123) in the Repository Password text box.
18 .Click Select for "Save Merged Repository as."
Screenshot for Step
The "Select repository file to save the merged result" dialog box appears.
Screenshot for Step
19 .Change the default name of the merge repository. Enter SampleApp_BI0009_no_CP.rpd (where no_CP indicates that no common parent exists) in the File Name text box, and then click Save.
Screenshot for Step
20 .Click Next. The Merge Repository Wizard - Define Merge Strategy page appears. It should be intuitively obvious that you want to include the new subject areas because you are merging two totally different repositories. However, note that there is an additional conflict for a variable, BI_EE_HOME. This variable must point to the correct "Oracle BI Home" directory. For the example in this tutorial, the correct path is<ORACLE_INSTANCE>\bifoundation\OracleBIServerComponent\coreappplication_obips1 (for example,c:\bi11g\instances\instance3\bifoundation\OracleBIServerComponent\coreappplication_obips1).
Screenshot for Step
21 .Select the first row (Subject Area, Sample Targets Lite), and then select Current from the Decision drop-down list.
Screenshot for Step
22 .Select the second row (Subject Area, Sample Sales Lite), and then select Current from the Decision drop-down list. The wizard page should look like this:
Screenshot for Step
23 .Select the third row (Variable, BI_EE_HOME), and then click the plus sign to expand the detail. The wizard page should look like this:
Screenshot for Step
Before you make a decision about this conflict, you should investigate further.
24 .Double-click BI_EE_HOME in the "Modified repository" pane. The "Static Repository Variable - BI_EE_HOME" dialog box appears. Notice that the Default Initializer location does not comply with the suggested path that is offered as an example in the Description box. Make a note of the Description box path, so that you can compare it to the value in the current repository.
Click Cancel.
Screenshot for Step
25 .Double-click BI_EE_HOME in the "Current repository" pane. The "Static Repository Variable - BI_EE_HOME" dialog box appears. Notice that the Default Initializer location complies with the suggested path in the previous step.
Click Cancel.
Screenshot for Step
26 .Select the Current radio button for the BI_EE_HOME variable. The wizard page should look like this:
Screenshot for Step
27 .Click Finish. The new SampleApp_BI0009_no_CP.rpd appears with all merged nodes.
Screenshot for Step
28 .Verify that the BI_EE_HOME variable was set properly. Click Manage > Variables.
Screenshot for Step
29 .In the Variable Manager dialog box, expand Repository > Variables, select Static, and then select BI_EE_HOME in the pane at the right.
Screenshot for Step
30 .Right-click and select Properties to display the "Static Repository Variable - BI_EE_HOME" properties dialog box. The Default Initializer value points to the current Oracle BI Home.
Screenshot for Step
31 .Click Cancel to close the "Static Repository Variable - BI_EE_HOME" properties dialog box, and then click Action > Close to close the Variable Manager dialog box.
Screenshot for Step

Summary

This tutorial illustrated how to merge and import repositories by using the Oracle BI 11g Administration Tool.
In this tutorial, you should have learned how to:
  • Merge objects from different repositories into a common parent repository
  • Merge objects from different repositories and create a new repository