Oracle MVA

Tales from a Jack of all trades

Archive for the ‘Oracle Application Server’ Category

SSO registration

leave a comment »

Since I always seem to have to lookup how to call the ssoreg.sh script, here’s a reminder to myself. Hopefullu other people find this helpfull too.

#!/bin/bash
#
# Remember to setup the oratab!

VHOST=$1

if [ “${VHOST}x” = “x” ]
then
 echo “usage $0 virtual_host_url”
 exit 1
fi

ORAENV=/usr/local/bin/oraenv
 
ORACLE_SID=appserv
ORAENV_ASK=NO
. ${ORAENV}
ORAENV_ASK=YES
 
${ORACLE_HOME}/sso/bin/ssoreg.sh -oracle_home_path ${ORACLE_HOME} -config_mod_osso TRUE -site_name ${VHOST} -remote_midtier -config_file /opt/vhosts/${VHOST}/osso.conf -mod_osso_url http://${VHOST} -virtualhost

Written by Jacco H. Landlust

October 4, 2009 at 1:35 pm

clone.pl and oc4jadmin_obf_old_password

leave a comment »

Currently I am working on a BPEL deployment for a customer. Cloning the software tree is part of deployment to ensure fast and repeatable deployment. Having used the clone.pl script from Oracle numerous times, I started creating a golden image. Next I ran the prepare_clone.pl script to prepare the image. Next I rushed to the documentation to look for the exact syntax to clone a BPEL instance and to check for restrictions.

Having used the clone.pl script before, I was surprised to find some new parameters:

perl clone.pl ORACLE_HOME=OH_dir
              ORACLE_HOME_NAME=OH_Name
              -instance Instance_Name
              -db_vendor vendor_name
              -db_user username
              {-db_password db_pass | -db_obf_password db_obf_pass}
              -db_string connect_db_string
              -db_sid db_service_name
              {-oc4jadmin_old_password old_admin_Pass |
               -oc4jadmin_obf_old_password old_obf_admin_pass}
              {-oc4jadmin_new_password new_admin_pass |
               -oc4jadmin_obf_new_password new_obf_admin_pass}
              [-Ostring]
              [-silent]
              [-debug]
              [-help]

Most happy I was with the discovery of oc4jadmin_obf_old_password, since this enables me to put an obfuscated password in the script and just leave it there instead of jumping through hoops with decryption tooling and variables.  Less happy I was with the absence of any documentation of how to create the obfuscated password.

After some investigation and some asking with around some really knowledgeable people I found out that you can create the obfuscated password by running this command:

$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/jlib/instanceconfig.jar -e YOUR_PASSWORD | awk ‘{ print substr($2, index($2, “pwd$”)+4,index($2, “$Success”)-5)}’

This generates the correct obfuscated string. Now all I have to do is find out why CRS reboots my (Oracle-) VM if I clone an instance.

Written by Jacco H. Landlust

October 1, 2009 at 5:37 pm