Install 9208 on RHEL 4 x86_64

Install 9208 64bit On Linux X86_64

Scope and Application
The intended audience for this note is Oracle DBA's and customers wanting to install Oracle 9iR2 64-bit on Red Hat Enterprise Linux 4.0 x86-64 (AMD64/EM64T)

Software Download
Install 9204 successfully then Patch it to 9208

If you have a valid OTN account, you can download the base 9.2.0.4 software from the following URL:
http://www.oracle.com/technology/software/products/oracle9i/index.html

Requirements for Installing Oracle 9iR2 64-bit on RHEL 4 x86-64 (AMD64/EM64T)
1. Install the required OS components
This list is based upon a "default-RPMs" installation of RHEL AS/ES 4 update 1. When a newer "update" level is used, the RPM release numbers (such as 2.4-9.1.87) may be slightly higher (such as 2.4-9.1.93 or 2.4-9.2.37). This is fine so long as you are still using RHEL AS/ES 4 RPMs.
glibc-kernheaders-2.4-9.1.87.x86_64.rpm
glibc-headers-2.3.4-2.9.x86_64.rpm
glibc-devel-2.3.4-2.9.x86_64.rpm << both ARCH's are required. See below.
glibc-devel-2.3.4-2.9.i386.rpm << both ARCH's are required. See above.
compat-gcc-32-3.2.3-47.3.x86_64.rpm
compat-gcc-32-c++-3.2.3-47.3.x86_64.rpm
libstdc++-devel-3.4.3-22.1.x86_64.rpm
libaio-0.3.103-3.x86_64.rpm


Check RPMs.
rpm --query --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver postfix libaio libaio-devel xorg-x11-deprecated-libs-devel glibc-devel sort

Output I got

binutils-2.15.92.0.2-24 (x86_64)
compat-db-4.1.25-9 (i386)
compat-db-4.1.25-9 (x86_64)
control-center-2.8.0-12.rhel4.5 (x86_64)
gcc-3.4.6-9 (x86_64)
gcc-c++-3.4.6-9 (x86_64)
glibc-2.3.4-2.39 (i686)
glibc-2.3.4-2.39 (x86_64)
glibc-common-2.3.4-2.39 (x86_64)
glibc-devel-2.3.4-2.39 (i386)
glibc-devel-2.3.4-2.39 (x86_64)
gnome-libs-1.4.1.2.90-44.1 (x86_64)
libaio-0.3.105-2 (i386)
libaio-0.3.105-2 (x86_64)
libaio-devel-0.3.105-2 (x86_64)
libstdc++-3.4.6-9 (i386)
libstdc++-3.4.6-9 (x86_64)
libstdc++-devel-3.4.6-9 (i386)
make-3.80-6.EL4 (x86_64)
package postfix is not installed
pdksh-5.2.14-30.6 (x86_64)
sysstat-5.0.5-16.rhel4 (x86_64)
xorg-x11-deprecated-libs-devel-6.8.2-1.EL.33.0.2 (i386)
xorg-x11-deprecated-libs-devel-6.8.2-1.EL.33.0.2 (x86_64)
xscreensaver-4.18-5.rhel4.14 (x86_64)


Packages version required by Oracle x86-64
binutils (2.15.92.0.2-10.EL4)
compat-db 4.1.25-9
control-center (2.8.0-12)
gcc (3.4.3-9.EL4)
gcc-c++ (3.4.3-9.EL4)
glibc (2.3.4-2)
glibc 2.3.4-2
glibc-common (2.3.4-2)
gnome-libs 1.4.1.2.90-44.1
libstdc++ (3.4.3-9.EL4)
libstdc++-devel (3.4.3-9.EL4)
make 3.80.5
pdksh (5.2.14-30)
sysstat 5.0.5-1
xscreensaver (4.18-5.rhel4.2)

2. Configure the Unix environment
The first critical environment item is related to the gcc v3.2 and g++ v3.2 RPMs that were installed above. Run these commands:
mv /usr/bin/gcc /usr/bin/gcc.orig
mv /usr/bin/g++ /usr/bin/g++.orig
ln -s /usr/bin/x86_64-redhat-linux-gcc32 /usr/bin/gcc
ln -s /usr/bin/x86_64-redhat-linux-g++32 /usr/bin/g++

Check RH version:
rpm -qa redhat-release redhat-release-4ES-4.1

Next, the following environment settings are required for the Unix user performing the installation (eg. oracle):
% umask 0022
% echo $LD_ASSUME_KERNEL 2.4.19


Next, as root, modify your kernel settings in /etc/sysctl.conf as follows:
fs.file-max = 327679
kernel.shmmax = 4294967296
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000

The Unix user performing the installation (eg. oracle) should not have the Oracle install related variables set by default. For example setting ORACLE_HOME, PATH, LD_LIBRARY_PATH to include Oracle binaries in .profile, .bash_profile, .login file and /etc/profile.d should be completely avoided

3. Configure the Unix user process and file limits
Assuming that the "oracle" Unix user will perform the installation, do the following:
- Add the following settings to /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

- Add or edit the following line in the /etc/pam.d/login file, if it does not already exist: session required pam_limits.so

- Add the following lines to /etc/profile:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Start the Install
Software Download
It is about 1.5Gb and is of 3 Zipfiles

1. Download to the local drive and then upload to the destination
It is in format

2. Gunzip

3. Then cpio –idmv < filename.cpio for all the 3 files
It will create three directories called Disk1 Disk2 and Disk3
Important Oracle Variables to be set in .bash_profile
umask 022
TMPDIR=/tmp

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi



export EDITOR=vi
PS1="[`hostnamecut -d"." -f1`:$LOGNAME]"'$PWD> '
export PS1

ORACLE_BASE=/opt/oracle; export ORACLE_BASE
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
LD_ASSUME_KERNEL=2.4.19; export LD_ASSUME_KERNEL


Once set, run .bash_profile once
export DISPLAY=:0

Start xWindows client
Go to the install directory and check xclock
Then change the directory to the install directory
cd [lb4oraca1dq:oracle]/opt/oracle/backup/stage/9204/Disk1>
./runInstaller
……………
………………
……………………

Upgrade
Once 9204 is done, apply the 9208 patch.
Unzip the file from 9208 folder.
unzip p4547809_92080_Linux-x86-64.zip
cd to Disk1,
./runInstaller.

Shipping ASM archivelogs

Sometimes it is required to ship the archivelogs from one server to another. It becomes difficult when archivelogs are sitting on ASM file system. ASM files can not be directly accessed. RMAN can come to the rescue in this.

I had an issue of missing archives on STANDBY server (Log GAP) and somehow those archives got backedup to tape and mrp could not access it. Now I had to restore it and then get it shipped to STANDBY server. Since the GAP was too big, I decided to restore it and manually ship it rather than MRP to handle it. This is the process I followed. I am sure there may be many ways. But this one worked for me.


  • I identified log GAP using query

SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG"
FROM V$LOG_HISTORY
GROUP BY THREAD#

/

  • Then copy/restore the ASM logs to the cooked file system.

RMAN> run {
allocate channel c2 device type 'sbt_tape';
set archivelog destination to '/u01/app/oracle/admin/infra/arch';
restore archivelog from sequence 8852 until sequence 8856 thread 2;
release channel c2;
}
2> 3> 4> 5> 6>
allocated channel: c2
channel c2: sid=2228 instance=infra1 devtype=SBT_TAPE
channel c2: Data Protection for Oracle: version 5.3.3.0
executing command: SET ARCHIVELOG DESTINATION
Starting restore at 22-JAN-09
archive log thread 2 sequence 8856 is already on disk as file /u01/app/oracle/admin/infra/arch/infra_2_8856_641059495.arc
channel c2: starting archive log restore to user-specified destination
archive log destination=/u01/app/oracle/admin/infra/arch
channel c2: restoring archive log
archive log thread=2 sequence=8852
channel c2: restoring archive log
archive log thread=2 sequence=8853
channel c2: restoring archive log
archive log thread=2 sequence=8854
channel c2: restoring archive log
archive log thread=2 sequence=8855
channel c2: reading from backup piece qek5f68i_1_1
channel c2: restored backup piece 1
piece handle=qek5f68i_1_1 tag=TAG20090122T161057
channel c2: restore complete, elapsed time: 00:00:55
Finished restore at 22-JAN-09
released channel: c2
RMAN> exit


  • Once the logs are restored, scp or sftp it to the standby destination. This will again be a cooked file system

scp infra_2_*.arc :/tmp
infra_2_8853_641059495.arc 100% 131MB 11.0MB/s 00:12
infra_2_8854_641059495.arc 100% 267MB 12.2MB/s 00:22
infra_2_8855_641059495.arc 100% 60MB 8.5MB/s 00:07
infra_2_8856_641059495.arc 100% 542KB 541.5KB/s 00:00

  • Now if standby database log recovery destination is ASM file system or different than the scp destination, manually recover the database. Or at the recovery prompt manually feed the file name with a full path.

SQL> alter database recover managed standby database cancel;

SQL> recover from '/tmp' standby database;

  • Start the managed recovery

SQL> alter database recover managed standby database disconnect from session;

  • Verify the log shipping and log apply and That's it

Modify service error - CRS-0211 PRKP-1029

When I tried to modify a service to add available instances and preferred instances, I did couple of times and it errors out with

PRKP-1029 : Failed to register the service ges_taf.
CRS-0211: Resource 'ora.ges.ges_taf.cs' has already been registered.

I removed the service using srvctl and it got removed successfully.

[oracle]> srvctl remove service -d ges -s ges_taf
ges_taf PREF: AVAIL: ges1 ges2 ges3
Remove service ges_taf from the database ges? (y/[n]) y

Then I tried to add it again, it failed with a similar error

[oracle]> srvctl add service -d ges -s ges_taf -r ges1,ges2,ges3 -P BASIC
PRKP-1029 : Failed to register the service ges_taf.
CRS-0211: Resource 'ora.ges.ges_taf.cs' has already been registered.

After some research found that the only way to get rid of this error is to unregister the resource using crs_unregister. Oracle does not recommend it. But in the past I had to wait long time to get an answer from Oracle on this. So this time I did following

First check if the service is registered with OCR and not running

[oracle]> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora...._taf.cs application OFFLINE OFFLINE
ora....es1.srv application OFFLINE OFFLINE
ora....es2.srv application OFFLINE OFFLINE
ora....es3.srv application OFFLINE OFFLINE

[oracle]> srvctl config service -d ges

logged in as root

cd $CRS_HOME

Make sure first unregister the srv and then cs, else it will give errors while unregistering

[oracle]>crs_stat -p > /tmp/1
[root]> grep srv /tmp/1
NAME=ora.ges.ges_taf.ges1.srv
NAME=ora.ges.ges_taf.ges2.srv
NAME=ora.ges.ges_taf.ges3.srv
[root]> ./crs_unregister ora.ges.ges_taf.ges1.srv
[root]> ./crs_unregister ora.ges.ges_taf.ges2.srv
[root]> ./crs_unregister ora.ges.ges_taf.ges3.srv
[root]> grep ".cs" /tmp/1
NAME=ora.ges.ges_taf.cs
[root]> ./crs_unregister ora.ges.ges_taf.cs

Check this time if its not with CRS anymore

[oracle]> crs_stat -t
[oracle]> srvctl add service -d ges -s ges_taf -r ges1,ges2,ges3 -P BASIC
[oracle]> srvctl config service -d ges
ges_taf PREF: ges1 ges2 ges3 AVAIL: