Oracle

From YobiWiki
Jump to: navigation, search

Contents

Oracle9i on Debian Etch

Prepare installation

Get files from http://www.oracle.com/technology/software/products/oracle9i/htdocs/linuxsoft.html

gunzip ship_9204_linux_disk1.cpio.gz
gunzip ship_9204_linux_disk2.cpio.gz
gunzip ship_9204_linux_disk3.cpio.gz
cpio -idmv < ship_9204_linux_disk1.cpio
cpio -idmv < ship_9204_linux_disk2.cpio
cpio -idmv < ship_9204_linux_disk3.cpio

I burned a DVD with all three DiskN
Mount the DVD with exec rights:

mount /cdrom -o exec

I followed this doc (french) but there is also this one

mkdir /opt/oracle
addgroup oracle
adduser --ingroup oracle oracle
chown oracle:oracle /opt/oracle
chmod g+rwx /opt/oracle
mkdir /opt/oracle/OraHome
chown oracle:oracle /opt/oracle/OraHome/
chmod g+rwx /opt/oracle/OraHome/
apt-get install libc6 libc6-dev make binutils gcc libstdc++2.10-glibc2.2 libstdc++2.10-dev xlibs

I had hard time finding libstdc++2.9-glibc2.1, I got it finally from here

ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/sort /bin/sort
ln -s /usr/bin/basename /bin/basename
ls -l /usr/bin/gcc
ln -sf /usr/bin/gcc-2.95 /usr/bin/gcc
unset LANG
unset LC_ALL
unset LC_CTYPE
export LC_TYPE=en_US
export ORACLE_BASE=/opt/oracle
export ORACLE_SID=dbname
sysctl kernel.sem
sysctl -w kernel.sem="250"
sysctl kernel.shmall
sysctl kernel.shmmax
sysctl -w kernel.shmmax=512000000
sysctl kernel.shmmni
cat /proc/sys/fs/file-max 
ulimit -n
ulimit -n 65536
ulimit -u
ulimit -u 16386
ulimit -f

But I didn't export this one so Oracle installed its own (very old) JRE

#export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

Installation

When trying to launch the installer I got the error

Unable to load native library: /tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386/libjava.so:
   symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

as described here so I took the patch (it's part of this zip) and I ran rhel3_pre_install.sh
Finally I got the installer GUI :-)
I ran it as the new oracle user, this means the local user had to give access to the X11 (xhost local:) and I had to export in the env of the user oracle the following:

export DISPLAY=:0.0
  • Oracle Database / Enterprise edition / Only software /

When I wanted to launch ~/bin/dbca I got the error /opt/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
Exporting this variable solved the problem:

export LD_ASSUME_KERNEL=2.4.19

This can be added to the .bash_profile as well as

export DISPLAY=:0.0

Added some more variables:

export ORACLE_HOME=/opt/oracle/OraHome
export ORACLE_BASE=/opt/oracle
export ORACLE_SID=test
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

# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin

DB Creation Assistant

When trying dbca, the tool died with sth like

dbca: line 124: 26649 Segmentation fault  (or Killed)

I solved it by doing what they proposed here:

touch /etc/rac_on

Start DB

To start the DB I edited /etc/oratab:

test:/opt/oracle/OraHome:Y

And I had to copy the init file of my database "test":

cp /opt/oracle/admin/test/pfile/init.ora.192007235112 /opt/oracle/OraHome/dbs/inittest.ora

Now we can start it with

dbstart

Start listener

lsnrctl start

You can control the service is running and listening on port 1521:

netstat -ln |grep 1521 

Start Oracle Enterprise Manager Console

oemapp console
Launch Standalone
Connect manually to DB at 127.0.0.1:1521 SID:test
user SYS pwd sys service TEST_127.0.0.1 as SYSDBA
Personal tools
Namespaces

Variants
Actions
Navigation
Tools