Concatenating lines in ldapsearch results

Many of us have had reasons to migrate Oracle Application Server (specifically, Portal) environments from one server or group of servers to another. This is often the case when hardware upgrades are needed and the whole environment must be moved to another set of hosts.

Recently, I was helping move an Oracle Portal (10.1.2.0.2) environment from one host to another. This was due to a company spin off, so the “sticky” part of this move was that the domain name and resulting realm changed (more on that in a minute).

First, if you’ve had to perform this task, you should have already identified Metalink Note 251776.1 which describes the process necessary for moving users and groups from one OracleAS Infrastructure to another. The note’s step 3 mentions that the LDIF file must be edited to replace all references to the old realm with the new realm in the target system. However, this can prove difficult if you do actually have to change the realm name because of the way that ldapsearch produces output. The LDIF standard specifies that lines can be continued on the following line if a space is the first character on the line. The corresponding ldapadd command can properly import lines that are broken into multiple lines, but the standard search and replace tools (in notepad, vi or any other standard text editor) can’t find the occurrences properly to replace them. So, some entries are able to be replaced easily like this one (assume we need to replace “dc=dannorris,dc=local” with “dc=newcorp,dc=com“): Continue reading “Concatenating lines in ldapsearch results”

On handling logging in a script

This tip isn’t really new, but it is one of those things that I used to know, forgot, remembered, and am now blogging so that it will be easier to find (for me) when I finally forget it again. Besides, I was hanging out with Bex Huff earlier tonight and he told me I need to blog more and this was what popped into my head. On a side note, I would encourage everyone to seek out someone that you “know” from this internet thang when you’re traveling. Meeting in person certainly beats any “8 things” list :). I happen to be in Minneapolis this month, so I looked up Bex and also hope to find a bar or similar establishment where Billy can don the kilt 2.0 for another picture (that may be asking a lot in 31-degree temps, though).

Enough soapbox…on with the tech talk. Continue reading “On handling logging in a script”