How can I migrate all the reports developed at a development instance to a testing or production instance with BI Publisher Server ?
This is very typical thing you as an administrator or reports developer would concern. The good news is, migrating BI Publisher reports from one instance to anther is pretty simple. All the reports are stored in a BI Publisher repository, which is typically on a file system or inside Oracle XML database. So, all you need to do is to copy the BI Publisher repository from the source system and paste it to the target system. Here is a diagram that shows the migration.
Of course you need to have BI Publisher server installed and up-and-running at the target system before the migration. Either if your repository is on the file system or XML DB, this process would be pretty much the same. I’ll talk about the process assuming that the repository is on the file system in this post.
What is BI Publisher Repository?
So what is really the BI Publisher repository. It stores the following types of contents and information.
- Server Configuration
BI Publisher Repository Screenshot
It not only stores the reports but also contains all the configuration related information. Let’s take a look at the detail for each.
Under ‘Reports’ folder in the repository all the reports are organized in a folder based structure, which is in the same way that you see in the BI Publisher Enterprise server’s reports list UI page. Each report has its own folder, which contains one report definition file (.xdo) and report templates such as .rtf or .pdf.
All the information for the BI Publisher reports are stored in the reports definition files which has a file extension as ‘.xdo’ It stores the information like sql query, report name, parameter name, list of values, template name, reports translation, bursting setting, report property, etc.
When you work on reports development most of the work is done within the report layout templates such as RTF Templates, PDF Templates, to design the reports layout and formatting. Once you complete the development you upload them to the BI Publisher Enterprise Server and register them as layout templates for each report. These uploaded report templates are also stored in the BI Publisher repository and resides along with the reports definition file (.xdo) in a same report folder.
All the BI Publisher server configuration related information is also stored in the BI Publisher repository. The configuration information includes the following.
- Server Configuration
- Data Source
These information is stored under Admin folder within the repository.
There are two types of the translation. One is a translation for the BI Publisher Server product UI. BI Publisher Server supports 28 languages translations (includes English) for its UI. All the translated strings are stored in a set of XLIFF files and each language has its own XLIFF file to store the translation. These translations are located under Admin/Translation.
And another is a translation for the reports. If you are a French and open a report you want to see all the text are written in French. If you are a German you expect the same way. BI Publisher separates the translation from the report so you don’t need to create multiple reports for each language. Instead, you can just have one report and multiple translation XML files (XLIFF format), which contains only the translatable strings. These translations are located along with each report.
Now you get an idea of the BI Publisher Repository. Let’s start the migration.
Before you start the migration, again, ensure the BI Publisher Server exists at a target instance! The migration process has two parts.
- Migrate BI Publisher repository
- Perform Post-Migration Configuration
1 Migrate BI Publisher Repository
First, we need to obtain the repository from the source instance. Then locate it to the target BI Publisher repository.
The screen below shows the root directory of the BI Publisher repository
- Identify the BI Publisher Repository at the source instance
You can find this information in a BI Publisher’s system configuration file, which can be found at %J2EE_HOME%/applications/xmlpserver/xmlpserver/WEB-INF/xmlp-server-config.xml (e.g. C:\OracleBI\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\WEB-INF)
<?xml version="1.0" encoding="UTF-8"?>
- Go to the BI Publisher Repository folder
- Copy all the folders except ‘DemoFiles’ under the above folder. (If you want to migrate a set of demo XML data files you can copy the ‘DemoFiles’ folder as well.
- Save the folders onto your local machine or check them into your source control system
- Login to the target instance machine
- Go to the BI Publisher Repository directory.
- Copy the source repository folders, which are the ones you have copied at the above steps, to this folder.
- Restart your target J2EE server, such as Oracle OC4J server.
- Login to the Target BI Publisher Enterprise Server
Once you have logged in, you should see all the directories and reports migrated from the source instance under Reports tab in the new target BI Publisher Enterprise Server.
After the BI Publisher Repository has been migrated successfully you want to perform a post-migration task to review a target specific information. Often that the development application instance doesn’t share the same information such as data source, delivery system, scheduling information, etc with the target instance.
For example, when you have a project where you develop financial reports out of a financial database, usually you would have one financial database for development, one for Testing, and one for Production. And you would expect that each of the BI Publisher Enterprise Server instance would talk to each financial database but not share the same database among multiple BI Publisher servers. This is just an example for a data source but it can be applied to other settings such as follows.
- Data Source
When you have completed the migration process all the above settings are just the copies from the source system so you want to review the settings and update them appropriately so that they can be specific to a target system.
When you do this review and need to update any of the information, it is strongly recommended that you do it through the BI Publisher Enterprise Server Admin UI, not through the manual file modification. Just to make sure you don’t accidentally broken the system.