Total Pageviews

Tuesday, 26 June 2012

Pre-Requests for Installing oracle 10g on RHEL 4 x86_64


Steps  to meet  all the pre-requests for installation of oracle 10g on RHEL6 x86_64 server
 [oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ uname -a
Linux sumit-linux-10g_server 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
[oracle@sumit-linux-10g_server ~]$ pwd
/home/oracle
[oracle@sumit-linux-10g_server ~]$ cat /etc/hosts
127.0.0.1 sumit-linux-10g_server  localhost.localdomain     localhost
192.145.4.56  sumit-linux-10g_server
[oracle@sumit-linux-10g_server ~]$ id oracle
uid=500(oracle) gid=500(oracle) groups=500(oracle)
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ cat /etc/*-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 2)
[oracle@sumit-linux-10g_server ~]$
[root@sumit-linux-10g_server ~]# cat /etc/oraInst.loc
cat: /etc/oraInst.loc: No such file or directory
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]# /usr/sbin/groupadd oinstall
[root@sumit-linux-10g_server ~]# /usr/sbin/groupadd dba
[root@sumit-linux-10g_server ~]# /usr/sbin/usermod -g oinstall -G dba oracle
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]# id oracle
uid=500(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
[root@sumit-linux-10g_server ~]# vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
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.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

~
~
~

"/etc/sysctl.conf" 32L, 887C written
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
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.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]# vi /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

"/etc/security/limits.conf" 51L, 1619C written
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]#
[root@sumit-linux-10g_server ~]# su - oracle
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ vi /home/oracle/.bash_profile


# .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export ORACLE_BASE=/home/oracle/10.2.0/product
export ORACLE_HOME=$ORACLE_BASE/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export TMP=/home/oracle/tempdir
export TEMPDIR=/home/oracle/tempdir

unset USERNAME
~
~
".bash_profile" 23L, 544C written
[oracle@sumit-linux-10g_server ~]$ export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
[oracle@sumit-linux-10g_server ~]$ source ~/.bash_profile
[oracle@sumit-linux-10g_server ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/10.2.0/product/db_1/bin
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ mkdir 10.2.0
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ mkdir tempdir
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ ls -lrth
total 766M
drwxrwxr-x  2 oracle oinstall 4.0K Jun 25 18:20 Desktop
-rwxrwxr-x  1 oracle oinstall 765M Jun 26 08:55 10201_database_linux_x86_64.cpio
drwxr-xr-x  2 oracle oinstall 4.0K Jun 26 09:20 10.2.0
drwxr-xr-x  2 oracle oinstall 4.0K Jun 26 09:21 tempdir
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$
[oracle@sumit-linux-10g_server ~]$ cd 10.2.0
[oracle@sumit-linux-10g_server 10.2.0]$ mkdir product
[oracle@sumit-linux-10g_server 10.2.0]$ cd product
[oracle@sumit-linux-10g_server product]$ mkdir db_1
[oracle@sumit-linux-10g_server product]$ ls -lrth
total 4.0K
drwxr-xr-x  2 oracle oinstall 4.0K Jun 26 09:23 db_1
[oracle@sumit-linux-10g_server product]$
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" binutils
binutils-2.15.92.0.2.15 (x86_64)
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" compat-db
compat-db-4.1.25.9 (i386)
compat-db-4.1.25.9 (x86_64)
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" control-center
control-center-2.8.0.12.rhel4.2 (x86_64)
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" gcc
package gcc is not installed
[root@sumit-linux-10g_server ~]#  rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" gcc-c++
package gcc-c++ is not installed
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" glibc
glibc-2.3.4.2.13 (i686)
glibc-2.3.4.2.13 (x86_64)
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" glibc-common
glibc-common-2.3.4.2.13 (x86_64)
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" gnome-libs
gnome-libs-1.4.1.2.90.44.1 (x86_64)
[root@sumit-linux-10g_server ~]#  rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" libstdc++-devel
package libstdc++-devel is not installed
[root@sumit-linux-10g_server ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" make
make-3.80.5 (x86_64)
[root@sumit-linux-10g_server ~]#  rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" pdksh
pdksh-5.2.14.30.3 (x86_64)
[root@sumit-linux-10g_server ~]#  rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" sysstat
package sysstat is not installed
[root@sumit-linux-10g_server ~]#  rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" xscreensaver
xscreensaver-4.18.5.rhel4.9 (x86_64)

####################################################################################################
Installing the required RPMS:

[root@sumit-linux-10g_server rpm]# rpm -ivh sysstat-5.0.5-19.el4.x86_64.rpm
warning: sysstat-5.0.5-19.el4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 82fd17b2
Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# ls -lrth
total 72M
-rw-r--r--  1 root root 4.4M May  9 14:43 gcc-3.4.3-9.EL4.x86_64.rpm
-rw-r--r--  1 root root 2.7M May  9 14:43 gcc-c++-3.4.3-9.EL4.x86_64.rpm
-rw-r--r--  1 root root 9.6M May  9 14:43 libstdc++-devel-3.4.3-9.EL4.x86_64.rpm
-rw-r--r--  1 root root 2.4M May  9 15:00 glibc-devel-2.3.4-2.13.x86_64.rpm
-rw-r--r--  1 root root 800K May  9 15:08 glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm
-rw-r--r--  1 root root 1.9M May  9 15:22 cpp-3.4.6-11.el4_8.1.x86_64.rpm
-rw-r--r--  1 root root 9.6M May  9 15:34 libstdc++-devel-3.4.4-2.x86_64.rpm
-rw-r--r--  1 root root 126K May  9 16:20 sysstat-5.0.5-19.el4.x86_64.rpm
-rw-r--r--  1 root root  15M May 11 19:45 glibc-2.3.4-2.39.src.rpm
-rw-r--r--  1 root root 2.0M May 11 20:08 glibc-devel-2.3.4-2.39.i386.rpm
-rwxr--r--  1 root root 588K May 11 20:08 glibc-headers-2.3.4-2.39.i386.rpm
-rw-r--r--  1 root root  16M May 11 20:09 glibc-common-2.3.4-2.39.i386.rpm
-rw-r--r--  1 root root 4.3M May 11 20:11 glibc-2.3.4-2.39.i386.rpm
-rw-r--r--  1 root root 562K May 11 20:17 glibc-headers-2.3.4-2.13.x86_64.rpm
-rw-r--r--  1 root root 3.1M May 12 15:18 binutils-2.15.92.0.2-13.0.0.0.2.x86_64.rpm
-rw-r--r--  1 root root  11K May 12 15:49 libaio-devel-0.3.105-2.x86_64.rpm
-rw-r--r--  1 root root  19K May 12 15:53 libaio-0.3.105-2.x86_64.rpm
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm
warning: glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc-kernheaders      ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm -ivh glibc-headers-2.3.4-2.13.x86_64.rpm
warning: glibc-headers-2.3.4-2.13.x86_64.rpm: V3 DSA signature: NOKEY, key ID 0c98ff9d
Preparing...                ########################################### [100%]
   1:glibc-headers          ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm -ivh glibc-devel-2.3.4-2.13.x86_64.rpm
warning: glibc-devel-2.3.4-2.13.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh gcc-3.4.3-9.EL4.x86_64.rpm
warning: gcc-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
error: Failed dependencies:
        cpp = 3.4.3-9.EL4 is needed by gcc-3.4.3-9.EL4.x86_64
[root@sumit-linux-10g_server rpm]# rpm -ivh cpp-3.4.3-9.EL4.x86_64.rpm
warning: cpp-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 192a7d7d
Preparing...                ########################################### [100%]
        file /usr/bin/cpp from install of cpp-3.4.3-9.EL4.x86_64.rpm conflicts with file from package cpp-3.4.4-2
        file /usr/libexec/gcc/x86_64-redhat-linux/3.4.3/cc1 from install of cpp-3.4.3-9.EL4.x86_64 conflicts with file from package cpp-3.4.4-2
        file /usr/share/man/man1/cpp.1.gz from install of cpp-3.4.3-9.EL4 conflicts with file from package cpp-3.4.4-2
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage cpp-3.4.3-9.EL4.x86_64.rpm
warning: cpp-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 73307de6
Preparing...                ########################################### [100%]
   1:cpp                    ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" cpp
cpp-3.4.3.9.EL4 (x86_64)
[root@sumit-linux-10g_server rpm]# rpm -ivh gcc-3.4.3-9.EL4.x86_64.rpm
warning: gcc-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:gcc                    ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh --replacefiles libstdc++-devel-3.4.3-9.EL4.x86_64.rpm
warning: libstdc++-devel-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
error: Failed dependencies:
        libstdc++ = 3.4.3-9.EL4 is needed by libstdc++-devel-3.4.3-9.EL4.x86_64
[root@sumit-linux-10g_server rpm]# rpm -ivh --replacefiles libstdc++-3.4.3-9.EL4.x86_64.rpm
warning: libstdc++-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 73307de6
Preparing...                ########################################### [100%]
        package libstdc++-3.4.4-2 (which is newer than libstdc++-3.4.3-9.EL4) is already installed
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage libstdc++-3.4.3-9.EL4.x86_64.rpm
warning: libstdc++-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 73307de6
Preparing...                ########################################### [100%]
   1:libstdc++              ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage libstdc++-devel-3.4.3-9.EL4.x86_64.rpm
warning: libstdc++-devel-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:libstdc++-devel        ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh gcc-c++-3.4.3-9.EL4.x86_64.rpm
warning: gcc-c++-3.4.3-9.EL4.x86_64.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:gcc-c++                ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh glibc-2.3.4-2.39.i386.rpm
warning: glibc-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
error: Failed dependencies:
        glibc-common = 2.3.4-2.39 is needed by glibc-2.3.4-2.39.i386
[root@sumit-linux-10g_server rpm]# rpm -ivh  glibc-common-2.3.4-2.39.i386.rpm
warning: glibc-common-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
        file /etc/default/nss from install of glibc-common-2.3.4-2.39 conflicts with file from package glibc-common-2.3.4-2.13
        file /usr/bin/ldd from install of glibc-common-2.3.4-2.39 conflicts with file from package glibc-common-2.3.4-2.13
        file /usr/bin/tzselect from install of glibc-common-2.3.4-2.39 conflicts with file from package glibc-common-2.3.4-2.13
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage glibc-common-2.3.4-2.39.i386.rpm
warning: glibc-common-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc-common           ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" glibc-common
glibc-common-2.3.4.2.13 (x86_64)
glibc-common-2.3.4.2.39 (i386)
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage glibc-2.3.4-2.39.i386.rpm
warning: glibc-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc                  warning: /etc/localtime created as /etc/localtime.rpmnew
########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -Uvh --force --oldpackage glibc-headers-2.3.4-2.39.i386.rpm
warning: glibc-headers-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
error: Failed dependencies:
        glibc-headers = 2.3.4-2.13 is needed by (installed) glibc-devel-2.3.4-2.13.x86_64
[root@sumit-linux-10g_server rpm]# rpm -ivh --force --oldpackage glibc-headers-2.3.4-2.39.i386.rpm
warning: glibc-headers-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc-headers          ########################################### [100%]
[root@sumit-linux-10g_server rpm]#
[root@sumit-linux-10g_server rpm]# rpm -ivh --force --oldpackage glibc-devel-2.3.4-2.39.i386.rpm
warning: glibc-devel-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm -ivh --force --oldpackage binutils-2.15.92.0.2-13.0.0.0.2.x86_64.rpm
Preparing...                ########################################### [100%]
   1:binutils               ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm -ivh --force --oldpackage binutils-2.15.92.0.2-10.EL4.i386.rpm
warning: binutils-2.15.92.0.2-10.EL4.i386.rpm: V3 DSA signature: NOKEY, key ID 73307de6
Preparing...                ########################################### [100%]
   1:binutils               ########################################### [100%]
[root@sumit-linux-10g_server rpm]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" binutils
binutils-2.15.92.0.2.15 (x86_64)
binutils-2.15.92.0.2.13.0.0.0.2 (x86_64)
binutils-2.15.92.0.2.10.EL4 (i386)
[root@sumit-linux-10g_server rpm]# rpm -ivh --force --oldpackage libaio-0.3.105-2.x86_64.rpm
warning: libaio-0.3.105-2.x86_64.rpm: V3 DSA signature: NOKEY, key ID 9b3c94f4
Preparing...                ########################################### [100%]
   1:libaio                 ########################################### [100%]
[root@sumit-linux-10g_server rpm~]$ rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" libaio
libaio-0.3.103.3 (i386)
libaio-0.3.105.2 (x86_64)
[root@sumit-linux-10g_server rpm~]$
List of all RPMS essential for oracle 10g on RHEL4 (64 bit)
binutils-2.15.92.0.2.15 (x86_64)
binutils-2.15.92.0.2.10.EL4 (i386)
binutils-2.15.92.0.2.13.0.0.0.2 (x86_64)
compat-db-4.1.25.9 (i386)
compat-db-4.1.25.9 (x86_64)
control-center-2.8.0.12.rhel4.2 (x86_64)
cpp-3.4.3.9.EL4 (x86_64)
gcc-3.4.3.9.EL4 (x86_64)
gcc-c++-3.4.3.9.EL4 (x86_64)
glibc-2.3.4.2.13 (i686)
glibc-2.3.4.2.13 (x86_64)
glibc-2.3.4.2.39 (i686)
glibc-common-2.3.4.2.13 (x86_64)
glibc-common-2.3.4.2.39 (i386)
gnome-libs-1.4.1.2.90.44.1 (x86_64)
libstdc++-3.4.4.2 (i386)
libstdc++-3.4.3.9.EL4 (x86_64)
libstdc++-devel-3.4.3.9.EL4 (x86_64)
pdksh-5.2.14.30.3 (x86_64)
sysstat-5.0.5.19.el4 (x86_64)
xscreensaver-4.18.5.rhel4.9 (x86_64)
libaio-0.3.103.3 (i386)
libaio-0.3.105.2 (x86_64)




Monday, 25 June 2012

PFILE vs SPFILE

When an Oracle Instance is started, the characteristics of the Instance are established by parameters specified within the initialization parameter file. These initialization parameters are either stored in a PFILE or SPFILE. SPFILEs are available in Oracle 9i and above. All prior releases of Oracle are using PFILEs.

SPFILEs provide the following advantages over PFILEs:
  • An SPFILE can be backed-up with RMAN (RMAN cannot backup PFILEs)
  • The SPFILE is maintained by the server. Parameters are checked before changes are accepted.
  • Eliminate configuration problems (no need to have a local PFILE if you want to start Oracle from a remote machine)
  • Easy to find - stored in a central location
What is the difference between a PFILE and SPFILE:

A PFILE is a static, client-side text file that must be updated with a standard text editor like "notepad" or "vi". This file normally reside on the server, however, you need a local copy if you want to start Oracle from a remote machine. DBA's commonly refer to this file as the INIT.ORA file.

An SPFILE (Server Parameter File), on the other hand, is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine. Editing an SPFILE will corrupt it, and you will not be able to start your database anymore.

How will I know if my database is using a PFILE or SPFILE:

Execute the following query to see if your database was started with a PFILE or SPFILE:

SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"
FROM sys.v_$parameter WHERE name = 'spfile';

You can also use the V$SPPARAMETER view to check if you are using a PFILE or not: if the "value" column is NULL for all parameters, you are using a PFILE.

Starting a database with a PFILE or SPFILE:

Oracle searches for a suitable initialization parameter file in the following order:
Try to use the spfile${ORACLE_SID}.ora file in $ORACLE_HOME/dbs (Unix) or ORACLE_HOME/database (Windows)
Try to use the spfile.ora file in $ORACLE_HOME/dbs (Unix) or ORACLE_HOME/database (Windows)
Try to use the init${ORACLE_SID}.ora file in $ORACLE_HOME/dbs (Unix) or ORACLE_HOME/database (Windows)

One can override the default location by specifying the PFILE parameter at database startup:

SQL> STARTUP PFILE='/oradata/spfileORCL.ora'

Note that there is not an equivalent "STARTUP SPFILE=" command. One can only use the above option with SPFILE's if the PFILE you point to (in the example above), contains a single 'SPFILE=' parameter pointing to the SPFILE that should be used. Example:

SPFILE=/path/to/spfile

Changing SPFILE parameter values:

While a PFILE can be edited with any text editor, the SPFILE is a binary file. The "ALTER SYSTEM SET" and "ALTER SYSTEM RESET" commands can be used to change parameter values in an SPFILE. Look at these examples:

SQL> ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE;

SQL> ALTER SYSTEM SET timed_statistics=TRUE
COMMENT='Changed by Frank on 1 June 2003'
SCOPE=BOTH
SID='*';

The SCOPE parameter can be set to SPFILE, MEMORY or BOTH:


- MEMORY: Set for the current instance only. This is the default behaviour if a PFILE was used at STARTUP.

- SPFILE: update the SPFILE, the parameter will take effect with next database startup

- BOTH: affect the current instance and persist to the SPFILE. This is the default behaviour if an SPFILE was used at STARTUP.
The COMMENT parameter (optional) specifies a user remark.

The SID parameter (optional; only used with RAC) indicates the instance for which the parameter applies (Default is *: all Instances).

Use the following syntax to set parameters that take multiple (a list of) values:


SQL> ALTER SYSTEM SET utl_file_dir='/tmp/','/oradata','/home/' SCOPE=SPFILE;

Use this syntax to set unsupported initialization parameters (obviously only when Oracle Support instructs you to set it):

SQL> ALTER SYSTEM SET "_allow_read_only_corruption"=TRUE SCOPE=SPFILE;

Execute one of the following command to remove a parameter from the SPFILE:

SQL> ALTER SYSTEM RESET timed_statistics SCOPE=SPFILE SID=‘*’;
SQL> ALTER SYSTEM SET timed_statistics = '' SCOPE=SPFILE;

Converting between PFILES and SPFILES:


One can easily migrate from a PFILE to SPFILE or vice versa. Execute the following commands from a user with SYSDBA or SYSOPER privileges:

SQL> CREATE PFILE FROM SPFILE;
SQL> CREATE SPFILE FROM PFILE;

One can also specify a non-default location for either (or both) the PFILE and SPFILE parameters. Look at this example:

SQL> CREATE SPFILE='/oradata/spfileORCL.ora' from PFILE='/oradata/initORCL.ora';

Here is an alternative procedure for changing SPFILE parameter values using the above method:
Export the SPFILE with: CREATE PFILE=‘pfilename’ FROM SPFILE = ‘spfilename’;
Edit the resulting PFILE with a text editor
Shutdown and startup the database with the PFILE option: STARTUP PFILE=filename
Recreate the SPFILE with: CREATE SPFILE=‘spfilename’ FROM PFILE=‘pfilename’;
On the next startup, use STARTUP without the PFILE parameter and the new SPFILE will be used.

Parameter File Backups:

RMAN (Oracle's Recovery Manager) will backup the SPFILE with the database control file if setting "CONFIGURE CONTROLFILE AUTOBACKUP" is ON (the default is OFF). PFILEs cannot be backed-up with RMAN. Look at this example:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

Use the following RMAN command to restore an SPFILE:

RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;

Tuesday, 19 June 2012

[Error]: 10g component 'SET_NO_OUTLINES' must be declared

IMP-00058: ORACLE error 6550 encountered
ORA-06550: line 1, column 33:
PLS-00302: component 'SET_NO_OUTLINES' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
IMP-00000: Import terminated unsuccessfully


This error was encountered when exporting from a 9i database using a 10g client, and then importing into a 9i databse using the 10g client. I had to export and import using the 9i client in the end.
If you are using Windows, type PATH at the command prompt and see what the values are set to. There will most likely be multiple Oracle paths in there, for example D:\Oracle\Ora92 and D:\Oracle\product\10.2.0\db_1. The one which appears first will take priority over the others.
You can modify which appears first on your command prompt session by copying out the path to a text file, re-arranging it so that either the 9i or 10g one appears first and then copy it back into your command prompt window, with a PATH=D:\Oracle\Ora92.....etc, etc.
You can also modify this parameter for the environment by going to START -> right click My Computer -> Advanced -> Environment Variables -> In the System Variables box there is a PATH variable. Change the order of that.
If you are still unsure, you can also specify the full path whenever you invoke SQLPlus orIMP/EXP, etc. For example, my PATH variable has has D:\Oracle\Ora92 at the beginning of it but I want to use the 10g Export command. I would type D:\Oracle\Product\10.2.0\db_1\BIN\EXP to invoke the export command.  

Saturday, 9 June 2012

Find IP Address @Linux Machine

[oracle@sumit-server ~]$ /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:21:91:79:90:F6
 inet addr:192.168.46.31 Bcast:192.168.4.255 Mask:255.255.255.0
  inet6 addr: fe85::261:91ff:fe79:90f6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  RX packets:870754 errors:0 dropped:0 overruns:0 frame:0
  TX packets:104870 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
  RX bytes:1839451948 (175.4 MiB) TX bytes:9954219 (9.4 MiB)
Interrupt:193 Base address:0xe000

Wednesday, 6 June 2012

ORA-07445: exception encountered: core dump [ACCESS_VIOLATION]

Alert log Entry :

Restarting dead background process MMON
MMON started with pid=15, OS id=5112
Tue Jun 05 20:59:37 2012
Errors in file d:\oracle\product\10.2.0\admin\saas\bdump\saas_mmon_5112.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_keltfill+86] [PC:0xBA78BA] [ADDR:0x0] [UNABLE_TO_READ] []

Solution: 

SQL>Alter system set "_threshold_alerts_enable" = 0 scope = spfile sid = '*'; 

Restart the database followed by Machine restart.





Friday, 1 June 2012

ORA-00600 :[QKACON:FJswrwo]

Error code: Internal error code ORA-00600 [QKACON:FJswrwo],[3],[],[],[],[],[] occurs with connect by is an internal oracle error.
If this error occurs be alert you have only approx 20 Minutes to respond or ur DB can crash.

Solutions:
1.Upgrade to 11.1.0.6 or higher as this internal bug has been  fixed by oracle in version  11.1.0.6.

2.Try the below workarounds:(As recommended by Oracle support)

a) SET  the hidden parameter "_optimizer_connect_by_cost_based" = false;
  • SQL>Alter session set  "_optimizer_connect_by_cost_based" = false;
or
b)Disable Hash Join:
  • Alter session set "_hash_join_enabled"=false;
  • Alter session set "_right_outer_hash_enable"=false;
  • Alter session set "_gby_hash_aggregation_enabled"=false;

My prob got resolved using the workaround :  "_optimizer_connect_by_cost_based" = false;

To check the values of hidden parameters you can use the below Query:

SELECT x.inst_id,x.indx+1,ksppinm,ksppity,ksppstvl,ksppstdf,
DECODE(BITAND(ksppiflg/256,1),1,'TRUE','FALSE'),
DECODE(BITAND(ksppiflg/65536,3),1,'IMMEDIATE',2,'DEFERRED',3,'IMMEDIATE','FALSE'),
DECODE(BITAND(ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE'),
DECODE(BITAND(ksppstvf,2),2,'TRUE','FALSE'),
ksppdesc
FROM x$ksppi x,
x$ksppcv y
WHERE (x.indx = y.indx)
/*and (translate(ksppinm,'_','#') not like '#%'
OR (TRANSLATE(ksppinm,'_','#') LIKE '#%'AND ksppstdf = 'TRUE'))*/
ORDER BY 3;

Below you can find the list of some useful oracle hidden params:


Parameter Name
Details
_B_TREE_BITMAP_PLANS
This parameter’s default value changed from FALSE in Oracle 8i to TRUE in Oracle 9i.

This can lead to an undesirable impact on performance thus this should be set to FALSE.
_INDEX_JOIN_ENABLED
This parameter’s default value changed from FALSE in Oracle 8i to TRUE in Oracle 9i.

This can lead to an undesirable impact on performance thus this should be set to FALSE.
_KGL_LARGE_HEAP_WARNING_THRESHOLD
This parameter was introduced in 10G Release 2.  This will eliminate the following error message:
Memory Notification: Library Cache Object loaded into SGA
Heap size XXXXK exceeds notification threshold

For example set it as follows:

ALTER SYSTEM SET "_KGL_LARGE_HEAP_WARNING_THRESHOLD" = 8388608 SCOPE = SPFILE;
QUERY_REWRITE_ENABLED
In order to make use of the Function Based Indexes this parameter must be set to TRUE.
OPTIMIZER_SECURE_VIEW_MERGING
This parameter was introduced in 10G Release 2.  Setting this parameter to FALSE is required otherwise it is possible for the optimizer to create different execution plans for identical statements on identical objects issued from different user schemas.
_OPTIMIZER_CONNECT_BY_COST_BASED
Setting this parameter to FALSE is required for a workaround to the Oracle error ORA-600 [qkacon:FJswrwo].