Sunday, October 30, 2011

My new job

This is to update you all that I am back to my home country India and have taken a new job at Oracle Corporation as Principal Consultant. Currently working on some exciting stuff using products like Oracle GoldenGate, ODI, SOA suite, etc. I will revive my blog and will post some interesting blog entries soon.

Wednesday, August 4, 2010

Oracle Weblogic Workshop 10gR3 on Linux


If you installed Oracle Service Bus 10gR3 and tried to run workshop using
./$MIDDLEWARE_HOME/OSB/workshop_10.3/workshop, then there is a high probability that workshop will not start. And will result in JVM errors. If you see the stack trace then it will be like:

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x736434cc, pid=29469, tid=78347152
#
# Java VM: OpenJDK Server VM (1.6.0-b09 mixed mode linux-x86)
# Problematic frame:
# C  [libxul.so+0xce34cc]

and lot of other blah blah. 
To fix the issue follow below steps:
1. Run the command:
rpm - qa | grep xul* and see if linux machine has xulrunner already configured. As xulrunner version 1.9.0.x or above is not supported by workshop. 
When I ran the command on my linux box, I got the output as below:
xulrunner-1.9.0.19-1.el5_5

2. Now download old version of xulrunner from 
http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/linux-i686/xulrunner-1.8.1.3.en-US.linux-i686-20080128.tar.gz

3. Unzip and Untar using:
gunzip xulrunner-1.8.1.3.en-US.linux-i686-20080128.tar.gz
tar -xvf xulrunner-1.8.1.3.en-US.linux-i686-20080128.tar.gz

4. You will now have folder xulrunner on your local machine. Assume in path /home/oracle/xulrunner

5. Now open the workshop.ini file present at $MIDDLEWARE_HOME/OSB/workshop_10.3/workshop folder and add below line:
-Dorg.eclipse.swt.browser.XULRunnerPath=/home/oracle/xulrunner

6. Save the file and again start your workshop, it should work like a cake :)

Thursday, July 1, 2010

TOGAF 9 Certified Enterprise Architect

I just want to publish that today I passed TOGAF 9 Level 1 (Foundation) and Level 2 (Certified) exam with a combined score of 89% and is now a TOGAF certified Enterprise Architect. Soon I will also start writing about Enterprise Architecture blog posts ranging across topics of TOGAF 9, Archimate, BPMN, TM-Forum Frameworx etc. and their relationship with Oracle Fusion Middleware and Oracle AIA (Application Integration Architecture).
Watch out for this space!

Friday, May 14, 2010

Install Oracle Database 11gR2 and Repository Creation Utility 11.1.1.3.0 on CentOS 5.4


Step 1: Verify System Requirements
1. Check all the required packages and libraries are available on the CentOS system by running the below command as root:
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver
libaio openmotif21 libXp.so.6 libstdc++* compat-libstdc++-3.2.3 elfutils-libelf-devel-0.97 libaio-devel-0.3.105unixODBC-2.2.11 unixODBC-devel-2.2.11 compat-libstdc++*
* Libraries required for Oracle Database 10g version
* Additional libraries required for Oracle Database 11g version
If any of the package or libraries is not available on system, then output
of the above command will contain an entry like:
compat-db-4.1.25-9 not installed
Install all such packages using command:
yum install
2. Create Oracle Groups and User Account
Execute the following commands as root:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
passwd oracle
3. Create Directories
Execute the following commands as root:
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/

chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
4. Configure the Linux Kernel parameters
Execute the following commands as root:

cat >> /etc/sysctl.conf <
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
fs.aio-max-nr = 1048576
EOF
/sbin/sysctl -p



5. Setting Shell limits for the oracle User
Execute the following commands as root:

cat >> /etc/security/limits.conf <
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login <
session required /lib/security/pam_limits.so
EOF

cat >> /etc/profile <
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >> /etc/csh.login <
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF

Step 2: Install Oracle database version 11gR2
1. Login as user oracle
2. Unzip the Oracle database Installable file using command:
unzip
3. Execute ./database/runInstaller
4. Provide the settings as per your requirement during the installation process.
But as a recommendation choose:
- Specify Oracle Home Location as /u01/app/oracle/product/11.2.0/dbhome_1
- Specify Inventory directory as /u01/app/oraInventory
- Create Starter Database
- Set the Database character set as 'ALT32UTF8'.
5. In the end of the installation process, it will ask to run some configuration scripts
like /u01/app/oraInventory/orainstRoot.sh and /u01/app/oracle/product/11.2.0/dbhome_1/root.sh. Execute these as root user in another terminal window before ending the installation process.
6. After that if you try to execute sqlplus then below error will occur:
SELinux is preventing sqlplus from loading
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 which requires text relocation.
To debug this error run below command as root user:
chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1' 
7. Set ORACLE_HOME and ORACLE_SID environment variables in your .bash_profile file and again launch a new terminal window.
8.  Go to $ORACLE_HOME/bin directory and excecute below commands:
./sqlplus /nolog
sql>connect / as sysadmin
sql>startup
sql>exit
./lsnrctl start

If everything goes fine then your database will be up and running. While starting the database you may also encounter ORA-00845 MEMORY_TARGET not supported on this system error. This error is related to Automatic Memory Management feature for Oracle 11g database on Linux. For a good post about this concept and error resolution you can refer to the link: http://blog.tanelpoder.com/2007/08/21/oracle-11g-internals-part-1-automatic-memory-management/
In my scenario I encountered the above error but my memory setting were already in line of what was suggested in the above link, hence for me just a simple restart of CentOS machine solved the issue.
9.  To run the Oracle RCU utility 11.1.1.3.0, some database parameters needs to be modified. These are: open_cursors=500 and processes=500.
You can edit these parameters by running the below commands:
./sqlplus /nolog
sql>connect / as sysadmin
sql>startup
sql>alter system set open_cursors=500 scope=both;
sql>shutdown
-- Backup your spfile e.g.  spfileorcl.ora present in $ORACLE_HOME/dbs directory
sql>create pfile from spfile
initorcl.ora in $ORACLE_HOME/dbs directory
-- Open the initorcl.ora file in vi editor and change the processes parameter value to 500
sql>create spfile from pfile
-- This will create a new file spfileorcl.ora in $ORACLE_HOME/dbs directory with the required database settings
sql>startup
sql>exit

Step 3: Install Repository Creation Utility (RCU) version 11.1.1.3.0

1. Login as user oracle
2. Unzip the RCU Installable file using command:
unzip
3. Execute ./rcuHome/bin/rcu
4. During installation, give the details of the Oracle database created in step 2, select all the SOA schemas to install and select default settings for all other options during the installtion.

Thursday, March 25, 2010

Recommendations for JMS (Oracle SOA Suite deployed on Weblogic Cluster)

The current blog post assumes that user has deployed the Oracle SOA Suite 10.x on Weblogic cluster and have configured distributed JMS queues and topics that are used by various OSB business/proxy services or BPEL processes. The below are some recommendations for configuring the distributed JMS queues and topics which generally users overlook but can give various advantages in a particular scenario:

Distributed Queue/Topic
- Threshold and Quotas: The default values for ‘Messages Threshold High’ and ‘Messages Threshold Low’ are set to 9223372036854775807. This may lead to JMS server crash or out of Memory issues in case of peak message produce rate scenarios where consumer is not available or consuming at speed very less then message producing speed. These values should be set as per NFRs.

- Delivery Failure: Set ‘Expiration Policy’ to ‘Redirect’. (By default its Discard). Set ‘Error Destination’ as ‘Error Queue’. (By default its None). Otherwise in Error and Message Expiration scenario, the messages will be lost.

- Set the 'Forward Delay' parameter to appropriate value. This will make sure that in case if one of the queues has 0 consumers then messages received on that queue will be forwarded to another queue in DQ group for processing.

-
Separate tool to monitor Queue. It should raise custom alerts in certain scenarios, e.g. as below two and and proper actions should be defined for each scenario:
1. The Consumers Current value becomes 0 for any of the members of the Distributed Queue
2. The ‘Messages Current’ or ‘Messages Pending’ counter is above some threshold value and time

JMS Server
- Logging: The default logging settings are Rotate the JMS log files when file size reaches 500 KB and to retain 7 files max. These settings can be reviewed as per reqn and available storage planning. Also a separate SAN/NAS should be used for log files storage.
- Separate tool to monitor JMS Server. Monitor parameters like ‘Active Destinations’, ‘Active Transactions’, ‘Active Connections’, ‘Active Pooled Connections’. Alerts and Actions should be configured as per defined SLA.

OFM JMS Consumer i.e. OSB Proxy Service
- The parameter
‘Is XA Required ‘ should be set to ‘true’.
- The
Endpoint URLs that Proxy service uses to connect to JMS Resource to consume the message can be like
jms://osbhost1:port,jms://osbhost2:port. This will result in configuration like

OSB Server 1 -> Queue 1 -> Proxy Service 1, Proxy Service 2 and OSB Server 2 -> Queue 2 -> Proxy Service 2, Proxy Service 1.

So every Queue has 2 consumers. Hence its more load balanced and inherently more fault tolerant. Also set the
‘Server Affinity’ parameter to true which will ensure that for Queue1 message processing priority is given to Proxy Service 1 on OSB Server 1 and for Queue 2 to Proxy service 2 on OSB Server 2.

Also now it’s possible to clone the proxy service so we can have another proxy service with same endpoint URL which will result in having 4 consumers for each queue. i.e.

OSB Server 1 -> Queue 1 -> Proxy Service 1, Proxy Service, 2 Proxy Service 1, Proxy Service 2 and OSB Server 2 -> Queue 2 -> Proxy Service 2, Proxy Service 1, Proxy Service 2, Proxy Service 1.

Hence system can be scaled without needing any additional OSB Servers in cluster. Also additional service can be undeployed if required. Also in above configuration, it’s not necessary to explicitly set Forward Delay attribute.

OFM JMS Producer i.e. OSB Business Service
- BS for JMS has
default values as Retry Count = 0, Retry Iteration Interval = 30, Retry Application Errors = ‘Yes’. These parameters should be changed as per the requirement.

- Above points for proxy service related to
endpoint URL configuration is applicable and should be applied. In case of BS, it’s possible to specify multiple endpoint URLs as jms://osbhost1:port
and as jms://osbhost2:port

General
- Use Security. So that authorized Consumers and Producers are only allowed to interact with the JMS resources.

- A
centralized monitoring solution for all servers, queues and topics, etc. To answer questions like where are messages lost, which consumer is consuming which message, etc.

- Restart sequence in case of server crash or server restart should be decided in most optimum way in order to achieve initial state i.e. same no. of active producers and consumers after any end system or OFM server restart.

- The end systems e.g. a System ABC and OSB should have inherent reconnect logic in which on getting exception while consuming message from a particular Queue (because Queue is down), the consumer should gracefully handle this exception scenario and should reconnect to another available Queue in DQ group.

- If you have two different Weblogic Server versions running and a message bridge needs to be created between two, then its better to use 'Store and Forward' rather then creating JMS Bridge.

Wednesday, March 10, 2010

Installing Oracle SOA Suite 10.1.3.4 on CentOS - Part III

The further steps to install Oracle SOA Suite 10.1.3.4 on CentOS are as below:
Please read Part-I and Part-II in previous blog entries.

Step 1: Install Oracle SOA Suite v 10.1.3.1
1. Download the installable file soa_linux_x86_101310_disk1.cpio from Oracle website.
2. Unzip the file by executing the command:
cpio -idmv <
soa_linux_x86_101310_disk1.cpio
3. Make sure that your environment variables ORACLE_HOME and ORACLE_SID are setup properly. And the lsnctrl process and database is started. Verify the same by connecting to the database using sqlplus.
To set env variables:
export ORACLE_HOME= ORACLE_HOME_PATH
export ORACLE_SID= ORACLE_SID_VALUE
To run the listener:
lsnctrl start
To start the database:
sqlplus /nolog
sqlplus>connect / as sysdba
sqlplus>startup

4. Run the IRCA utility to set up the SOA schemas
5. Start the installer as:
runInstaller -ignoreSysPrereqs
* Proceed even if some pre requisite checks fail.
6. Choose the default settings during the installation process. At the end of the installation verify that all Oracle SOA suite components are running by executing the command:
opmnctl -l
The output should show all the status as 'Active'
If all Oracle components are not running, then execute the command:
opmnctl startall
7. Login to the default BPEL console at http://Hostname:8888/BPELConsole with oc4jadmin username and password to verify that BPEL console is up and running.

Step 2: Upgrade Oracle SOA Suite to v 10.1.3.4 (Patch 7272722)
1. Download the installable file p7272722_101340_LINUX.zip from Oracle website.
2. Stop all Oracle components by running the command:
opmnctl stopall
3. Upgrade the Oracle SOA schemas by running the scripts:
upgrade_10131_10134_oracle.sql (located in Disk1/install/soa_schema_upgrade/bpel/scripts directory with orabpel user)
upgrade_10133_10134_oracle.sql (located in Disk1/install/soa_schema_upgrade/esb/sql/oracle directory with oraesb user)
4. Start all Oracle components by running the command:
opmnctl startall
5. Unzip the file
p7272722_101340_LINUX.zip and run the installer ./runInstaller
6. Run the configuration scripts as specified by the installer in the end of the installation process

Step 3: Replace OPatch Utility (Patch 6880880)
1. Download the installable file p6880880_101340_LINUX.zip from Oracle website.
2. Unzip the file
p6880880_101340_LINUX.zip directly under ORACLE_HOME directory

Step 4: Make SOA Suite Weblogic ready (Patch 7337034)
1. Download the installable file p7337034_101340_GENERIC.zip from Oracle website.
2. Stop all Oracle components by running the command:
opmnctl stopall
3. Unzip the file p7337034_101340_GENERIC.zip and change the directory to 7337034 folder
4. Run the command
opatch apply
5. Run the command
opmnctl startall

Step 5: Install Weblogic Server version 9.2 MP3
1. Download the installable file server923_linux32.bin.zip from Oracle website and run the installer.

Step 6: Install Oracle SOA Suite 10.1.3.4 on Weblogic 9.2 MP3 (Patch 7490612)
1. Download the installable file p7490612_101340_GENERIC.zip from Oracle website and unzip the file.
2. Modify the properties in WL_SOA10134_Installables/SOADomain.properties file as per your environment.

3. Make sure all the Oracle components and Oracle database is running and execute the command
sh setup.sh (from WL_SOA10134_Installables directory)

Step 7: Update Oracle SOA Suite 10.1.3.4 to MLR8 (Patch 8372150)
1. Download the installable file p8372150_101340_GENERIC.zip from Oracle website and unzip the file.
2. Stop all Oracle components by running the command:
opmnctl stopall
3. Edit the file MLR_Hotplug/MLR_weblogic.properties and set the properties as per your environment.
4. Make sure the environment variables ORACLE_HOME, BEA_HOME, and JAVA_HOME are set to correct values.
5. Set the environment variable as export OPATCH_PLATFORM_ID=0
6. Change the directory to 8372150/MLR_Hotplug and run the Hotplug PrePatch command:
./Hotplug_Patch.sh Prepatch 8372150 Weblogic
7. C
hange the directory to 8372150 folder and run the command
opatch apply
8. Login to Oracle database using sys user and run the command
alter session set nls_numeric_characters=".";
9. Run the below database upgrade scripts:
upgrade_10134_10134mlr_oracle.sql (located in 8372150/files/bpel/system/database/scripts/ directory for orabpel user)
upgrade_10134_10134MLR_oracle.sql (located in 8372150/files/integration/esb/sql/oracle/ directory for oraesb user)
10. Change directory to 8372150/MLR_Hotplug and run the Hotplug Postpatch command:
./Hotplug_Patch.sh Postpatch 8372150 Weblogic
11. Run the below command
opmnctl startall


Step 8: Install Oracle Service Bus 10.3.1 and Weblogic Server 10.3.0
1. Download the installable file osb1031_wls103_linux32.bin from Oracle website and run the installer.

Thursday, March 4, 2010

Installing Oracle SOA Suite 10.1.3.4 on CentOS - Part II

After assigning static IP to CentOS Virtual image, the first step is to install Oracle database v 10.2.0.4. During installation process I refer to the installation guide on Oracle website available at link http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html
But steps for installing on CentOS differs a little due to difference in system libraries etc. The installation of required Oracle database is mainly a four step process:
1. Verify system requirements
2. Install Oracle database v 10.2.0.1
3. Install Patch 6810189 to upgrade the Oracle Database top 10.2.0.4
4. Run Database Upgrade Assistant

Step 1: Verify System Requirements
1. Check all the required packages and libraries are available on the system by running the below command as root:
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver
libaio openmotif21

If any of the package or libraries is not available on system, then output
of the above command will contain and entry like:
compat-db-4.1.25-9 not installed
Install all such packages using command:
yum install

2. Create Oracle Groups and User Account
Execute the following commands as root:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
passwd oracle

3. Create Directories
Execute the following commands as root:
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

4. Configure the Linux Kernel parameters
Execute the following commands as root:

cat >> /etc/sysctl.conf <kernel.shmall = 2097152

kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
EOF
/sbin/sysctl -p

5. Setting Shell limits for the oracle User
Execute the following commands as root:
cat >> /etc/security/limits.conf <oracle soft nproc 2047

oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login <session required /lib/security/pam_limits.so
EOF
cat >> /etc/profile <if [ \$USER = "oracle" ]; then

if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >> /etc/csh.login <if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
5. Troubleshooting
While installing Oracle database on CentOS there were some other issues and
hence I also recommend executing below steps as root:

yum install libXp.so.6
yum install libstdc++*
xhost +

Step 2: Install Oracle database version 10.2.0.1
1. Login as user oracle
2. Unzip the file 10201_database_linux32.zip using command:
unzip 10201_database_linux32.zip
3. Execute ./runInstaller
4. Provide the settings as per your requirement during the installation process.
But as a recommendation choose:
- 'Advanced Installation'
- Specify Oracle Home Location as /u01/app/oracle/product/10.2.0/db_1
- Specify Inventory directory as /u01/app/oracle/oraInventory
- Create Starter Database
- Set the Database character set as 'ALT32UTF8'.
5. In the end of the installation process, it will ask to run some configuration scripts
like orainstRoot.sh and root.sh. Execute these as root user in another terminal
window before ending the installation process.
6. Verify that the database is installed properly by confirming that database processes are running and login to the database using sqlplus
7. Set ORACLE_HOME and ORACLE_SID environment variables if they are not already set.

Step 3: Install Patch 6810189 to upgrade the Oracle Database to v 10.2.0.4
1. Unzip the file p6810189_10204_Linux-x86.zip using command:
unzip p6810189_10204_Linux-x86.zip

2. Shutdown the database
SQL> CONNECT SYS AS SYSOPER
Enter password: SYS_password
SQL> SHUTDOWN

3. Shutdown all other database processes as below:
emctl stop dbconsole
isqlplusctl stop
lsnrctl stop

4. Run the patch installer as ./runInstaller. On the Specify Home Details screen, select the name of the Oracle home that you want to update, or select the Path that you want to update from the list.

5. After the installation is finished run any configuration scripts e.g. root.sh as specified by the installer.

Step 4: Run database upgrade Assistant
1. Start the database processes as:
emctl start dbconsole
isqlplusctl start
lsnrctl start

2. Run the database upgrade assistant as:
dbua
On the Databases screen, select the name of the Oracle Database that you want to update

3. After its successfully completed, start the database as:
SQL> CONNECT SYS AS SYSOPER
Enter password: SYS_password
SQL> STARTUP

4. Login to the starter database to verify that everything is as expected.

For any other issues encountered during installation process, I will suggest to refer to the link:
http://www.puschitz.com/InstallingOracle10g.shtml