Index syndication
comment syndication

BOE XIR2 cmsdbsetup failure on Oracle10g

If you use Unix, and need to migrate your Business objects CMS from one database to another database, you will probably use the cmsdbsetup.sh script. This script migrates and manages your database connection in a Unix environment using Business Objects Enterprise (BOE).

In my case I am Using Solaris 9, and have Oracle 10g databases and client files for use by BOE.

When running the cmsdbsetup.sh script you get the following error pertaining to clntsh:

           Business Objects 

Current CMS Data Source: DBNAME 

err: Error: Failed to get cluster name.
err: Error description: Unable to load clntsh 

select (Select a Data Source)
reinitialize (Recreate the current Data Source)
copy (Copy data from another Data Source)
changecluster (Change current cluster name)
selectaudit (Select an Auditing Data Source) 

[select(6)/reinitialize(5)/copy(4)/changecluster(3)/selectaudit(2)/back(1)/quit(0)]
----------------------------------------------------------

This error “Unable to load clntsh” refers to the libclntsh.so library used by the Oracle client. Since BOE runs as 32bit, the 32bit Oracle client libraries should be accessible by the user running BOE.

If you are running a 64 bit Unix and a 64bit Oracle install check that the environment for the user running BOE (user that will run the CMS) has the 32bit libraries in the path:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32

Then check that either the user is a member of the Oracle dba Unix group or everyone has permissions to access the 32bit libraries under Oracle 10g:

su - oracle
chmod o+rx $ORACLE_HOME/lib32/*

Feel free to leave any comments if you need help with this.

awk oneliner to find large files

A mega geeky awk one-liner today. Tested on Solaris under bash, so YMMV.

Have you ever found that a filesystem is filling up fast, and dont know what is causing it? This one liner (which can be placed in a cron job if you like) is best run as a super user.

It will:

  1. Search for all files in the current dir and subdirs that are modified in the last 3 days;
  2. list them, filtering just the filesize and name/path;
  3. sort/order by the largest file; and
  4. Email you a copy of the report.
find / -type f -mtime -3 -exec ls -l {} \; 2>/dev/null \
| awk '{print $5 " " $9}' \
| awk '{printf "%12d\t%s\n", $1, substr($0,index($0,$2),80)}' \
| sort -r >/tmp/largefiles.txt && \
( uuencode /tmp/largefiles.txt largefiles.txt ) \
| mailx -s 'Large Files Report' -r mail2@youremail.com `cat /tmp/mailrecipients` &

Nice. If you just want to see the response on stdout then try this:

find / -type f -mtime -3 -exec ls -l {} \; 2>/dev/null \
| awk '{print $5 " " $9}' \
| awk '{printf "%12d\t%s\n", $1, substr($0,index($0,$2),80)}' \
| sort -r

Have fun.

Mailing attachments from the Solaris Shell

I needed a quick way to send some files from the command line when logged into a Solaris server via ssh.
This assumes the server is already configured to deliver your smtp mail. I also used mailx for the sending client.
Here is how I did it, for your geeky reference.

First write your message:
cat << EOF > /tmp/mailmsg
Hi this is a message
And this is the second line
EOF

Then populate your recipient list, comma delimited as per the mailx(1) man page:
cat << EOF > /tmp/mailrecipients
john.doe@nodomain.com.it,jack.black@someplace.co.za
EOF

  • Then the actual command that will send your mail
  • . You need to uuencode your binary attachments, and you can send as many as you need.
    (cat /tmp/mailmsg ; uuencode /path/to/file.txt file.txt ; uuencode /location/of/otherfile otherfile) | mailx -s 'Subject' -r myemail@some.place.mx `cat /tmp/mailrecipients`

    You need to specify each file name twice, once for source file to encode, and once for the encoded file name; as per the uuencode(1C) man page. If you are sending from some local account on the server, the -r switch allows you to specify an alternate return address for the recipients (in other words your normal email address).

    PS: watch for the quotes and backticks. Dont mix them up!

    Hope this helps you out someday.

    Clearcase Tips Number 03 – managing label conventions with perl

    I previously showed you how to use a shell script with Rational Clearcase, to alert you when a new branch type was created.

    In this post, I will show you how to use a Perl script to enforce Clearcase labeling conventions. Perl LogoThis example is directed toward Clearcase on UNIX (i.e. Solaris or similar) and assumes you have Perl installed, working and have a basic knowledge of how to program in Perl. It is a reworked version of the windows script supplied by IBM on Developerworks.

    This is a long post, but a good one if you are a new clearcase admin who needs to enforce label names.

    Read the rest of this entry »

    Understanding the effect of MQ persistence on disk performance

    Do you use MQ? do you have performance problems when using persistence? An interesting article on understanding this on a Solaris platform. Koops has always been an informative source on getting my MQ performance under check, and again he comes to the front of the pack on analysis of performance issues.

    read more | digg story

    Next entries »