February 23, 2011

Changing LDAP settings in an OBIEE RPD with UDML

Filed under: hack, ldap, obiee, udml — rmoff @ 17:06

A chap called Kevin posted a comment on a previous posting of mine asking

did you ever come across anything that could be used to change the LDAP server settings from a command line (admintool.exe, UDML, or otherwise)?

I did a quick play around with some UDML and it appears that you can.

Set up the initial LDAP server definition in the RPD

First I added a dummy LDAP server to samplesales.rpd:

A LDAP server added to samplesales.rpd

Then save and close the RPD.

Export the RPD to UDML format, and isolate the LDAP server UDML definition

Next open up a command prompt and run the following, which will export the UDML for the whole RPD:

c:\oraclebi\server\bin\NQUDMLGen.exe -U Administrator -P Administrator -R c:\oraclebi\server\repository\samplesales.rpd -O c:\scratch\udml.txt

Running the export of UDML

Open up the generated UDML in your favourite text editor. In the above example, it will have been written to c:\scratch\udml.txt.

Do a search for the name of your LDAP server, and you should hopefully find a line like this:


What you do now is remove all the rest of the RPD UDML, so cut from the beginning of the file up to the DECLARE LDAP SERVER, through to the next DECLARE statement. You should end up with something like this:

Example UDML for the LDAP server definition

Make the required LDAP server change in the UDML

On a copy of the UDML extracted above, make the required changes to the LDAP server definition.
For this example, let’s imagine we’re moving the RPD to use a pre-production LDAP server.
In a copy of the original udml.txt file, now called ldap_preprod.udml, I’ve simply amended the HOST NAME field:

HOST NAME 'ldap.preprod.server.com'

Save the changed file (ldap_preprod.udml in my example).

Apply the LDAP server change to the RPD

Back at the command line, and this time NQUDMLExec

c:\OracleBI\server\Bin\nQUDMLExec.exe -U Administrator -P Administrator -I c:\scratch\ldap_preprod.udml -B c:\OracleBI\server\Repository\samplesales.rpd -O c:\OracleBI\server\Repository\samplesales.preprod.rpd

This applies the UDML in the file specified by “-I” (c:\scratch\ldap_preprod.udml) to be applied to “-B” base repository file (c:\OracleBI\server\Repository\samplesales.rpd) and write the output to “-O”, a new repository file (c:\OracleBI\server\Repository\samplesales.preprod.rpd).

Open up the new RPD in Administration Tool and check the results of your handiwork:

LDAP settings showing the change made in the UDML file

Further reading

UDML in OBIEE is nothing new, and there are some very good articles to read if you want to understand more about it:


All this can be done on Unix too, just make sure you have set your OBIEE environment first with sa-init.sh (or sa-init64.sh) before calling nqudmlgen / nqudmlexec

Whether Windows or Unix, make sure you work on a copy of your RPD, because you might corrupt it otherwise. I’m pretty sure some UDML hacking is unsupported, so use this at your own risk. And did I mention, work on a copy of your files and take backups.

From a note that I wrote last year it looks like UDML is on its way out and an XML-based version on its way in for OBIEE 11g.

The code snippets assume that you have OBIEE installed to c:\OracleBI – amend the path as necessary if you have it elsewhere. You’ll always find NQUDMLGen & NQUDMLExec in <wherever you installed OracleBI>/server/Bin (or Bin64).


Create a free website or blog at WordPress.com.

%d bloggers like this: