Automating rpd metadata export with admintool.exe
By @lex on Nov 26, 2008
This is an update to a previous post on data lineage in Oracle BI EE.
As Erik Eckhardt describes in his blog, there is a not so widely known - and unsupported(!) - command line feature in the Oracle BI Administration Tool.
It can be used to automate activities such as creating rpd files, importing physical layers, updating connection pools, exporting subsets from projects (which is used during installation of Oracle BI Applications btw) and more.
As described in my post on Oracle BI data lineage, we have to export a csv file in order to get data we can use.
Here is a way to use the admintool.exe /command syntax to automate this.
1. Create an input file with the following content. Save the file on your drive (example: D:\input.txt)
Open samplesales.rpd Administrator Administrator
DescribeRepository D:\samplesales.csv UTF-8
MessageBox "Repository description exported successfully"
This file contains commands to Open the samplesales.rpd using Administrator as username and Administrator as password.
The Hide command hides the Administration Tool window.
The happy command is DescribeRepository which triggers an export of the rpd metadata to the D:\samplesales.csv file in UTF-8 codepage. This is similar to using the Administration Tool utility manually.
The MessageBox command is just given as an example.
Then we Close the file and Exit from Administration Tool.
2. Open a command prompt and type (or write the following into a shell script):
D:\OracleBI\server\Bin\admintool /command d:\input.txt
and execute the script.
The admintool.exe will now open the input file and execute the commands, thus producing a metadata export file in an automated manner.
In Erik's post you can find more commands.
You can also run the Metadata Dictionary export using the GenerateMetadataDictionary command. The syntax for the input file is:
Please note that using the /command switch is not documented and obviously not supported by Oracle Support, so please use it carefully and at your own discretion.