Monday, November 24, 2008

sqlplus give error /usr/lib/hpux64/dld.so: Unable to find library 'libclntsh.so.10.1'

When other user in HP-UX run sqlplus and system give following error:
/usr/lib/hpux64/dld.so: Unable to find library 'libclntsh.so.10.1'

Solution:chmod -R 755 $ORACLE_HOME

Wednesday, November 19, 2008

Oracle 11g New Feature - Checking DB alert log

Checking alert log is no longer necessary to be done from OS level.
You can query v$diag_info view for alert information.

Wednesday, November 12, 2008

Drop dbcontrol repository

emca -config dbcontrol db -repos drop -silent -PORT -SERVICE_NAME -SYS_PWD -SID -DBSNMP_PWD -SYSMAN_PWD -DBCONTROL_HTTP_PORT -AGENT_PORT -RMI_PORT -JMS_PORT

Eg.
emca -config dbcontrol db -repos drop -silent -PORT 1521 -SERVICE_NAME MESTEST -SYS_PWD SYS -SID MESTEST -DBSNMP_PWD dbsnmp -SYSMAN_PWD sysman -DBCONTROL_HTTP_PORT 1158 -AGENT_PORT 3938 -RMI_PORT 5521 -JMS_PORT 5541

Create new repository to enable dbcontrol in Oracle 10.2

emca -config dbcontrol db -repos create -silent -PORT -SERVICE_NAME -SYS_PWD -SID -DBSNMP_PWD -SYSMAN_PWD -DBCONTROL_HTTP_PORT -AGENT_PORT -RMI_PORT -JMS_PORT

Eg.
emca -config dbcontrol db -repos create -silent -PORT 1521 -SERVICE_NAME MESTEST -SYS_PWD SYS -SID MESTEST -DBSNMP_PWD dbsnmp -SYSMAN_PWD sysman -DBCONTROL_HTTP_PORT 1158 -AGENT_PORT 3938 -RMI_PORT 5521 -JMS_PORT 5541

Error accessing PRODUCT_USER_PROFILE

Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM

Solution: Run pupbld.sql at $ORACLE_HOME/sqlplus/admin

Install Oracle 10R2 on SUN Solaris 10 X86-64

Download Oracle Database 10gR2 installer from http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201solx8664soft.html

Checking the Hardware Requirements
1. Login as root.
2. To determine whether the system architecture can run the software,
# /bin/isainfo -kvThe result return should be "64-bit amd64 kernel modules"
3. Minimal 1024MB of physical RAM
# /usr/sbin/prtconf grep Memory
4. Minimal Swap
Between 512MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM
# /usr/sbin/swap -s
5. To add additional swap, use mkfile to create a file suitable for a local swap area. For example, to create a 600MB swap file:
# /usr/sbin/mkfile 600m /swap
where /swap is the name of the file to be used as swap space. Units for the size can be kilobytes (k), blocks (b), or megabytes (m).
Tell the system to start using the file as swap
# /usr/sbin/swap -a /swap
Use swap -l to verify that the swap file has been activated.
6. Minimal 400MB of free space in /tmp and minimal 1.7GB of disk space for Oracle binaries
# df -k

Checking the Software Requirements
1. To check your solaris version,
# uname -a
2. To determine whether the required packages are installed
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms \ SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
3. If any of the package is not installed, install the package from Solaris CD. Eg.
# pkgadd -d /cdrom/sol_10_1008_x86/Solaris_10/Product SUNWi1cs
# pkgadd -d /cdrom/sol_10_1008_x86/Solaris_10/Product SUNWi15cs
(Pls note that pkgadd -d required a full path follow by a space and package name)
4. Create the Oracle Inventory and DBA group
# groupadd oinstall
# groupadd dba
5. Create the Oracle Software Owner user
# useradd -s /bin/ksh -d /export/home/oracle -m -g oinstall -G dba oracle
# passwd oracle
6. Set Oracle environment parameter by modify $HOME/.profile
export ORACLE_BASE=/opt/apps/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=MESTESTexport ORACLE_TERM=vt100
export TNS_ADMIN=$ORACLE_HOME/network/adminexport EDITOR=vi
export TERM=vt100
PATH=$PATH:/usr/sbin:$ORACLE_HOME/bin:$ORACLE_HOME/lib
7. Configuring Kernel ParametersIn Solaris 10, you are not required to make changes to the /etc/system file to implement the System V TPC. Solaris 10 uses the resource control facility for its implementation.
Note: Oracle Universal Installer(OUI) will give a warning on Kernel parameter because OUI is looking at /etc/system to check kernel parameter setting hence included below in /etc/system.
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=128
set semsys:seminfo_semmni=128
set semsys:seminfo_semmsl=256

8. To modify the kernel parameters,
# projadd -U oracle -K "project.max-shm-memory=(priv,4096MB,deny)" user.oracle
# projmod -s -K "project.max-shm-ids=(priv,128,deny)" user.oracle
# projmod -s -K "project.max-sem-ids=(priv,128,deny)" user.oracle
# projmod -s -K "project.max-sem-nsems=(priv,256,deny)" user.oracle

Run Oracle Universal Installer
1. Login as oracle.
2. To view the values of kernel parameter,
$ prctl -i project user.oracle
3. To unzip Oracle Software,
$ unzip 10201_database_solx86_64.zip
4. Login as oracle in a xterm,
$ export DISPLAY=:0.0
$ cd /export/home/oracle/database
$ ./runInstaller
5. At the end of installation, run the scripts prompt as root
$ /opt/apps/oracle/oraInventory/orainstRoot.sh
$ /opt/apps/oracle/product/10.2.0/db_1/root.sh

Download Oracle Opatch

To download OPatch, visit metalink and go to Patches & Updates and download patch 6880880.