Monday, October 21, 2013

SQLLDR, with Oracle OC4J 10.1.3.4, errors out.

sqlldr ($ORACLE_HOME/bin/sqlldr.exe), installed as part of OC4J 10.1.3.4, fails with the following error when executed.

..>sqlldr
Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL.


Process explorer showed that it was looking for $ORACLE_HOME/rdbms/mesg/ulus.msb, and it did not find it there. Not sure whether the bundled version is same as the Oracle client install on a different computer, but found this file anyway and copied it over to OC4J/rdbms/mesg/ directory.

It worked!

Thursday, October 17, 2013

Oracle BPEL - Slow "Search by Title" and "Tree Finder" Actions

Search by "Title" in the instances tab and also "Tree Finder" in an individual instance page got really slow - 10 - 24 secs, in 10.1.3.4 instance.

The following custom indexes were added to bring them below 0.06 secs. in our instance.

See the highlighted indexes added recently.

SQL> select index_name, index_type, table_name, uniqueness from all_indexes where table_name = 'CUBE_INSTANCE';

INDEX_NAME        INDEX_TYPE            TABLE_NAME     UNIQUENESS
----------------- --------------------- -------------- ----------
STATE_IND         NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_CUSTOM4        FUNCTION-BASED NORMAL CUBE_INSTANCE  NONUNIQUE  
CI_PARENT_ID_IDX  NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_TITLE_IDX      NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_ROOT_ID_IDX    NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_CONV_ID_IDX    NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_PK             NORMAL/REV            CUBE_INSTANCE  UNIQUE     
CI_CUSTOM2        NORMAL                CUBE_INSTANCE  NONUNIQUE  
CI_CUSTOM3        NORMAL                CUBE_INSTANCE  NONUNIQUE  

Thursday, July 18, 2013

Multi-line match in Java RegEx

Recently had to format some messages for HTML display
     - by adding "<br>" to plain text where newlines were found.
     - If a line already ends with "<br>", then do not add extra "<br>".
     - break tags were appearing as "<br>", "<br/>", &quo
t;<br />" and also as "<BR>", "<BR/>", "<BR />
"
     - goto be a multi-line match.
     - wherever empty lines are that had to be replaced with "<br>"


...
import java.util.regex.Pattern;
...
Pattern pat = Pattern.compile("((?<!\\<(?i)br(?-i)\\s?/?\\s?\\>\\s{0,100})\\n)|(^\\s*$)", Pattern.MULTILINE);
System.out.println(pat.matcher(mystring.trim()).replaceAll("<br>\n")); // Adding a new line to easily spot the newly added "br" tag.


Without \\s{0,100} JVM threw
      "java.util.regex.PatternSyntaxException: Look-behind group does not have an obvious maximum length near index ..."

Tomcat7 Registry Settings

Needed to adjust the heap settings for Tomcat running as a service, but tomcat7w.exe did not launch on a Windows 2008 server, so had to dig out the registry settings.

Right click to open this image in a separate window to see the complete image.

Wednesday, January 2, 2013

Outlook Rule to Capture Replies and Forwards While Ignoring Original Email

I get copied on a lot of alerts from many systems and tools every day, which get filed away in specific folders by using Outlook rules.

Some of the alerts get responded to by a tech person, and I was interested only in those responses.
I thought I will share one of rules, so that responses and forwards get dropped in my "inbox", not in "File-Away" folders, to get my immediate attention.