Wednesday, September 3, 2008

java.lang.UnsatisfiedLinkError: libawt.so: libXp.so.6 during 10g Install on OEL 5.0

Today, while I attempting to install Oracle10gR2 (10.2.0.1) on a new server with Oracle Enterprise Linux 5.0, got the following error when OUI was invoked.

java.lang.UnsatisfiedLinkError: libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

Later, found that the package libXp-1.0.0-8.i386.rpm doesn't get installed by default with OEL 5.0. Once the package was installed, the OUI was good to go!

[root@rhvm01 RPMs]# rpm -ivh libXp-1.0.0-8.i386.rpm
warning: libXp-1.0.0-8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libXp ########################################### [100%]
[root@rhvm01 RPMs]#

Monday, May 19, 2008

Oracle Home Cloning For RAC

A short note on the steps for cloning Oracle Home for RAC:

1. On all Nodes: Copy existing ORACLE_HOME binaries to a new OH location
$cp -pr /opt/oracle/product/10.2.0.2 /opt/oracle/product/10.2.0.4

2. Add entries for the new Oracle_HOME into the inventory
  • CD to the new OH: cd /opt/oracle/product/10.2.0.4/clone/bin
  • perl clone.pl ORACLE_HOME=/opt/oracle/product/10.2.0.4 ORACLE_HOME_NAME=Ora10g_10204 "CLUSTER_NODES=alps,everest" "LOCAL_NODE=alps"
  • Execute /opt/oracle/product/10.2.0.4/root.sh script as root.
  • Apply the 10.2.0.4 patchset unto the newly created OH

Sunday, April 27, 2008

APEX Configuration - 11g

APEX is included with the default Oracle11g installation. You can check if the APEX component is included in the installation by verifying the existence of apex directory under $OH and also by checking DBA_REGISTRY:

SQL> Select comp_name, version, status from dba_registry where comp_name
2 like '%Express%';

COMP_NAME VERSION STATUS
------------------------------ ------------------------------ -----------
Oracle Expression Filter 11.1.0.6.0 VALID
Oracle Application Express 3.0.1.00.08 VALID

Configuring APEX

1. Login as SYSDBA and run the script $OH/apex/apxconf

SQL> @apxconf

PORT
----------
8080

Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user.
Default values are in brackets [ ].
Press Enter to accept the default value.


Enter a password for the ADMIN user [] chandra
Enter a port for the XDB HTTP listener [ 8080]
...changing HTTP Port

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Session altered.

...changing password for ADMIN

PL/SQL procedure successfully completed.


Commit complete.

SQL>

2. Set the port number:

SQL> exec dbms_xdb.sethttpport(8080);

PL/SQL procedure successfully completed.

3. Unlock the ANONYMOUS ACCOUNT:

4. Logon to APEX using http://hostname:8080/apex/apex_admin



Use ADMIN as the username and the password which we used at step one above.



5. Create a WORKSPACE










With this we will have a WORKSPACE to start creating our own applications.

Saturday, March 8, 2008

ORA-27102: out of memory

Though we may have sufficient free physical memory, we often see this error message indicative of low memory availability. But the actual cause of this error is typically caused by the incorrect value set for shmall kernel parameter.

1. Let' set the value for shmall to a very low value.
Current Value:

[root@chandra ~]# sysctl -a |grep shmall
kernel.shmall = 1000000
[root@chandra ~]#

Setting the value to a new/low value:

[root@chandra ~]# sysctl -w kernel.shmall=10000
kernel.shmall = 10000
[root@chandra ~]# sysctl -a |grep shmall
kernel.shmall = 10000
[root@chandra ~]#

2. An attempt to startup the database fails with ORA-27102

SQL> startup
ORA-27102: out of memory
Linux Error: 28: No space left on device
SQL>

It failed with "out of memory" error message, though, we have 500M free space

[root@chandra ~]# free
total used free shared buffers cached
Mem: 2066192 1488748 577444 0 18496 1134776
-/+ buffers/cache: 335476 1730716
Swap: 8225172 0 8225172
[root@chandra ~]#

3. Let's set the shmall back to value to a high value:

[root@chandra ~]# sysctl -w kernel.shmall=1000000
kernel.shmall = 1000000
[root@chandra ~]#

4. An attempt to startup the database just works, even though nothing from the memory utilization or availability perspective changed!

Saturday, February 9, 2008

Oracle 10g CRS upgrade to 11g CRS

To upgrade Oracle 10g CRS to 11g CRS, we have two options -
  • Perform a rolling upgrade (this requires that your current CRS version >=10.2.0.3 (or 10.2.0.2 with Bundle patch). This option allows us to upgrade the CRS without a complete unavailabilty of downtime
  • Upgrade the CRS on all the nodes at the same time with complete downtime.
I will go over the steps for upgrading the CRS to 11g using the first option mentioned above.

On Node 1:

1. Stop the CRS: Either use $CRS_HOME/bin/crsctl stop crs as root or run the following from the staging as root:

/Staging_Area/11.1.0.6/clusterware/upgrade/preupdate.sh –crshome $CRS_HOME –crsuser oracle


2. Invoke runInstaller from the staging area:



3. As you notice, the option to specify the Home and the destination directory is disabled since OUI has detected the existence of a Cluster.


4. Select the local node (in my case it is alps01), selecting both the nodes requires the CRS to be down on both the nodes - meaning it would require a complete downtime - and would no more be a rolling upgrade:



5. Not shutting down the CRS on the local node would cause the following error:

6. This information would appear in the install logs - pretty detailed and informative :-)

7. Once you shutdown the CRS on the local node and when re-attempted, it should be fine (no errors or warnings):


8. On clicking next, the summary screen would appear. Note that we are upgrading the CRS only the local node (alps01):

9. Install progress screen:

10. At the end of the upgrade, the Installer would prompted us to run the rootupgrade script as root:


11. Output of the rootupgrade script:

12. Check the status of CRS versions:


On Node 2:
13. Shutdown the CRS on node 2. Note that while performing a rolling upgrade, we have to invoke the OUI from the second node and this can't be done from node 1.

14. Invoke the OUI from node 2 and select only the local node and deselect the remote or first node:

15. Cluster Verification screen....looks good.

17. Prompt to run rootupgrade script after the upgrade on Node 2:

18. Output of rootupgrade script on Node 2:

[root@everest02 upgrade]# /opt/oracle/product/crs/install/rootupgrade
Checking to see if Oracle CRS stack is already up...
WARNING: directory '/opt/oracle/product' is not owned by root
WARNING: directory '/opt/oracle' is not owned by root

Oracle Cluster Registry configuration upgraded successfully
Adding daemons to inittab
Attempting to start Oracle Clusterware stack
Waiting for Cluster Synchronization Services daemon to start
Waiting for Cluster Synchronization Services daemon to start
Waiting for Cluster Synchronization Services daemon to start
Cluster Synchronization Services daemon has started
Event Manager daemon has started
Cluster Ready Services daemon has started
Oracle CRS stack is running under init(1M)
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 2: everest02 everest02-priv everest02
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
CRS stack on this node, is successfully upgraded to 11.1.0.6.0
Checking the existence of nodeapps on this node
Creating '/opt/oracle/product/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/oracle/product/crs/install/paramfile.crs

[root@everest02 upgrade]#



19. Check or verify the version of CRS: