The Use of "Patches"
A traditional Oracle BI Applications implementation involves customizations which require changes in Data Warehouse Administration Console (DAC) metadata objects like Tasks, Tables, Indices, Subject Areas, etc.
In order to move/migrate these changes from one environment to other, we need to migrate the total repository, or the container where changes are done. This can be a time consuming process.
In order to reduce the amount of time involved, Oracle has designed a new feature called "Patches" that allows the movement of only a subset of the DAC metadata. The sections within this article provide insight on how to start working with "Patches".
DAC Metadata "Patch" Cycle
Here is the simple process that's followed for creating and applying patches to the DAC Metadata.
Creating A "Patch"
We can create a patch in two ways:
1. Use the "Working Patches" Tab to create a patch.
2. Create a new patch at the time you add contents to the patch.
Adding Contents To The "Patch"
We can add the contents to the patch in two ways:
1. Selected parent object(s) and immediate child object.
When we select option 1 to add the object to the patch, we can see that all the child objects are added to the patch contents. For example, if we add a task to the patch we can see that immediate child objects, such as the Table link(s), Index link(s),Group link(s), Parameter(s), Phase link(s), Task action(s), Extended property(s) Configuration point link(s), are added.
2. Selected parent object(s) and all child object(s).
When we select option 2 to add object to the patch, we can see that all the child objects and the children of the child objects are also added to the patch contents. For example, if we add a task to the patch we can see that table links and index links are its immediate child objects. When we use this option we can also see that the Table’s child objects, such as the Columns, Indices, and Table Actions, are also added.
What Contents Can Be Added To A "Patch"?
Here’s the list of contents and its immediate child objects that are added to a patch.
We can even add a patch to another patch. The patch added becomes the Child Patch where the Parent Patch is referred to as the Cumulative Patch which consists of the objects as well as the other patches.
Note: We need to reassemble the subject area after the patch has been applied to the target repository.
Changing The Status Of A "Patch"
After the contents have been added to the patch, we need to change the patch status to closed in order to export the patch. We can even reopen a closed patch in order to add or remove objects. Each time we change the status from "Closed" to "Open", Patch version value is incremented by one.
Here are steps needed to change the status of the patch:
- Navigate to the "Working Patches" tab in setup view and query for the patch that needed the change of status.
- "Right Click" on the selected patch and select "Re-Open Patch" or "Close Patch" and the status will be displayed in the status column of the Working Patches tab.
Exporting A DAC Metadata "Patch"
In order to export a patch we need to make sure the patch that needs to be exported is in "Closed" status. DAC exports the patch to a XML File which contains the identifying information about the patch and its contents which include repository object name, the object's source system container, and the parent object of child objects.
Here are the steps needed to export the patch:
- Navigate to the "Working Patches" tab query for the patch that needs to exported.
- Make sure the patch is in "Closed" state.
- "Right Click" and select "Export Patch."
- Provide the directory name and file name for the patch and click "Save".
Applying A DAC Metadata "Patch"
The following are the steps to apply the patch:
- Navigate to the DAC Repository Management and select "Apply Patch".
- In the open dialog box select the folder that contains the XML file to import and Click "Open".
- We can see a dialog box which consists of the status of the patch applied.
- There are three types of the status.
- All the objects in the patch are applied successfully.
- Some objects are applied and few other objects failed to apply.
- None of the objects are applied
When applying a patch and it asks for the Generating DW Table Scripts and click "OK."
Select "Upgrade Existing" and provide the physical data source type and Physical Data Source and check in the execute and click "OK."
The application will pop-up a dialog box with the status.
When Does A "Patch" Fail To Be applied?
Following are a few reasons why the patch may fail:
- Container name does not match one in the XML of the exported patch.
- When the object has a different container name that does not exist in the repository.
Raviteja Mamillapalli is a Senior Consultant at KPI Partners and works with the expert team within the KPI Partners Offshore Technology Center. His areas of professional focus include OBIEE, Oracle Business Intelligence Applications, Informatica, and DAC. He has received praise for his functional knowledge in healthcare and high-tech industries. Check out Ravi's blog at KPIPartners.com.