Ce contenu n'est pas disponible dans la langue sélectionnée.
Red Hat Enterprise Linux Oracle Tuning Guide
Performance tips and guidelines for Oracle® 9i and 10g databases on Red Hat Enterprise Linux 5, 4, 3 and 2.1
Edition 1.6
Abstract
Part I. Tuning and Optimizing Red Hat Enterprise Linux for Oracle Database 9i and 10g
Chapter 1. Introduction
Chapter 2. Hardware Architectures and Linux Kernels
2.1. General
dmidecode
or cat /proc/cpuinfo
. Running uname -a
can be misleading since 32 bit Linux kernels can run on x86-64 platforms. But if uname -a
displays x86-64, then you are running a 64 bit Linux kernel on a x86_64 platform.
2.2. 32 bit Architecture and the hugemem Kernel
LowFree
in /proc/meminfo
becomes very low accompanied by a sudden spike in paging activity. To free up memory in the low memory zone, the kernel bounces buffers aggressively between low memory and high memory which becomes noticeable as paging (do not confuse it with paging to the swap partition). If the kernel is unable to free up enough memory in the low memory zone, then the kernel can hang the system.
vmstat
command or using the sar
command (option '-B
') which comes with the sysstat
RPM. Since Linux tries to utilize the whole low memory zone, a low LowFree in /proc/meminfo
does not necessarily mean that the system is out of low memory. However, when the system shows increased paging activity when LowFree
gets below 50MB, then the hugemem kernel should be installed. The stability you gain from using the hugemem kernel makes up for any performance impact resulting from the 4GB-4GB kernel/user memory split in this kernel (a classic 32 bit x86 system splits the available 4 GB address space into 3 GB virtual memory space for user processes and a 1 GB space for the kernel). To see some allocations in the low memory zone, refer to /proc/meminfo
and slabtop(1)
for more information. Note that Huge Pages would free up memory in the low memory zone since the system has less bookkeeping to do for that part of virtual memory, see Chapter 17, Using Very Large Memory (VLM).
kernel-enterprise
kernel should be used for systems with more than 4GB of RAM up to 16GB.
2.3. The 64 bit Architecture
Chapter 3. Kernel Upgrades
/lib/modules/<kernel-version>/kernel/drivers/addon
. For example, the EMC PowerPath drivers can be found in the following directory when running the 2.4.21-32.0.1.ELhugemem
kernel:
$ ls -al /lib/modules/2.4.21-32.0.1.ELhugemem/kernel/drivers/addon/emcpower total 732 drwxr-xr-x 2 root root 4096 Aug 20 13:50 . drwxr-xr-x 19 root root 4096 Aug 20 13:50 .. -rw-r--r-- 1 root root 14179 Aug 20 13:50 emcphr.o -rw-r--r-- 1 root root 2033 Aug 20 13:50 emcpioc.o -rw-r--r-- 1 root root 91909 Aug 20 13:50 emcpmpaa.o -rw-r--r-- 1 root root 131283 Aug 20 13:50 emcpmpap.o -rw-r--r-- 1 root root 113922 Aug 20 13:50 emcpmpc.o -rw-r--r-- 1 root root 75380 Aug 20 13:50 emcpmp.o -rw-r--r-- 1 root root 263243 Aug 20 13:50 emcp.o -rw-r--r-- 1 root root 8294 Aug 20 13:50 emcpsf.o $
$ rpm -qa | grep kernel
$ uname -r
# rpm -ivh kernel-hugemem-2.4.21-32.0.1.EL.i686.rpm
Note
-U
'. The previous kernel should always be available if the newer kernel does not boot or work properly.
/etc/grub.conf
file if you use GRUB and change the "default
" attribute if necessary. Here is an example:
default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Enterprise Linux AS (2.4.21-32.0.1.ELhugemem) root (hd0,0) kernel /vmlinuz-2.4.21-32.0.1.ELhugemem ro root=/dev/sda2 initrd /initrd-2.4.21-32.0.1.ELhugemem.img title Red Hat Enterprise Linux AS (2.4.21-32.0.1.ELsmp) root (hd0,0) kernel /vmlinuz-2.4.21-32.0.1.ELsmp ro root=/dev/sda2 initrd /initrd-2.4.21-32.0.1.ELsmp.img
default
" attribute is set to "0
" which means that the 2.4.21-32.0.1.ELhugemem kernel
will be booted. If the "default
" attribute would be set to "1
", then 2.4.21-32.0.1.ELsmp
would be booted. After you installed the newer kernel reboot the system. Once you are sure that you do not need the old kernel anymore, you can remove the old kernel by running:
# rpm -e <OldKernelVersion>
/etc/grub.conf
.
Chapter 4. Kernel Boot Parameters
4.1. General
/usr/share/doc/kernel-doc-2.6.9/Documentation/kernel-parameters.txt
. This file does not exist if the kernel-doc
RPM is not installed. And for a list of kernel parameters in Red Hat Enterprise Linux3 and Red Hat Enterprise Linux 2.1, see /usr/src/linux-2.4/Documentation/kernel-parameters.txt
which comes with the kernel-doc
RPM.
4.2. The I/O Scheduler
echo sched_name > /sys/block/<sdx>/queue/scheduler
.
elevator=deadline
must be passed to the kernel that is being used. Edit the /etc/grub.conf
file and add the following parameter to the kernel that is being used, in this example 2.4.21-32.0.1.ELhugemem
:
title Red Hat Enterprise Linux Server (2.6.18-8.el5) root (hd0,0) kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/sda2 elevator=deadline initrd /initrd-2.6.18-8.el5.img
2.6.18-8.el5
kernel to use the Deadline scheduler. Make sure to reboot the system to activate the new scheduler.
Chapter 5. Memory Usage and Page Cache
5.1. Checking the Memory Usage
grep MemTotal /proc/meminfo
/proc/meminfo
at http://www.redhat.com/advice/tips/meminfo.html.
free(1)
command to check the memory:
$ free total used free shared buffers cached Mem: 4040360 4012200 28160 0 176628 3571348 -/+ buffers/cache: 264224 3776136 Swap: 4200956 12184 4188772 $
free
" on the first line.
5.2. Tuning the Page Cache
pagecache
kernel parameter. The lower the percentage, the more the system favors reclaiming unmapped pagecache memory over mapped memory. High values (like the default value of 100
) are not recommended for databases.
pagecache
parameters can be changed in the proc file system without reboot:
# echo "40" > /proc/sys/vm/pagecache
sysctl(8)
to change it:
# sysctl -w vm.pagecache="40"
/etc/sysctl.conf
. This file is used during the boot process.
# echo "vm.pagecache=40" >> /etc/sysctl.conf
# echo 1024 > /proc/sys/vm/min_free_kbytes
/etc/sysctl.conf
:
# echo vm.min_free_kbytes=1024 >> /etc/sysctl.conf
Chapter 6. Swap Space
6.1. General
/proc/sys/vm/swappiness
kernel parameter. The default value of /proc/sys/vm/swappiness
is 60 which means that applications and programs that have not done a lot lately can be swapped out. Higher values will provide more I/O cache and lower values will wait longer to swap out idle applications. Swappiness
percentage may be tuned using:
# echo 10 > /proc/sys/vm/swappiness
# echo vm.swappiness=10 >> /etc/sysctl.conf
free(1)
command or you can check the /proc/meminfo
file. When the system uses swap space it will sometimes not decrease afterward. This saves I/O if memory is needed and pages do not have to be swapped out again when the pages are already in the swap space. However, if swap usage gets close to 80% - 100% (your threshold may be lower if you use a large swap space), then a closer look should be taken at the system, see also Section 6.2, “Checking Swap Space Size and Usage”. Depending on the size of your swap space, you may want to check swap activity with vmstat
or sar
if swap allocation is lower than 80%. But these numbers really depend on the size of the swap space. The vmstat
or sar
command output the number of pages swapped. This output field is an important metric. This number should be low or zero as constant page swapping should be avoided at all costs.
Note
RAM | Swap Space |
---|---|
1 GB - 2 GB | 1.5 times the size of RAM |
2 GB - 8 GB | Equal to the size of RAM |
Greater than 8GB | 0.75 times the size of RAM |
6.2. Checking Swap Space Size and Usage
grep SwapTotal /proc/meminfo
- Adding more RAM.
- Reducing the size of the SGA.
- Increasing the size of the swap space.
$ vmstat 3 100 procs memory swap io system cpu r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 972488 7148 20848 0 0 856 6 138 53 0 0 99 0 0 1 0 962204 9388 20848 0 0 747 0 4389 8859 23 24 11 41 0 1 0 959500 10728 20848 0 0 440 313 1496 2345 4 7 0 89 0 1 0 956912 12216 20848 0 0 496 0 2294 4224 10 13 0 77 1 1 0 951600 15228 20848 0 0 997 264 2241 3945 6 13 0 81 0 1 0 947860 17188 20848 0 0 647 280 2386 3985 9 9 1 80 0 1 0 944932 19304 20848 0 0 705 0 1501 2580 4 9 0 87
# ls -al /var/log/sa | grep "Oct 12" -rw-r--r-- 1 root root 2333308 Oct 12 23:55 sa12 -rw-r--r-- 1 root root 4354749 Oct 12 23:53 sar12 # sar -W -f /var/log/sa/sa12 Linux 2.4.21-32.0.1.ELhugemem (rac01prd) 10/12/2005 12:00:00 AM pswpin/s pswpout/s 12:05:00 AM 0.00 0.00 12:10:00 AM 0.00 0.00 12:15:00 AM 0.00 0.00 12:20:00 AM 0.00 0.00 12:25:00 AM 0.00 0.00 12:30:00 AM 0.00 0.00 ...
pswpin
and pswpout
show the total number of pages brought in and out per second, respectively.
Chapter 8. Setting Semaphores
ipcs -ls
8.1. The SEMMSL Parameter
Note
ora.init
parameter PROCESSES
is very large, then SEMMSL should be larger as well. Note what Metalink Note:187405.1 and Note:184821.1 have to say regarding SEMMSL: "The SEMMSL setting should be 10 plus the largest PROCESSES
parameter of any Oracle database on the system". Even though these notes talk about 9i databases this SEMMSL rule also applies to 10g databases. I have seen low SEMMSL settings to be an issue for 10g RAC databases where Oracle recommended to increase SEMMSL and to calculate it according to the rule mentioned in these notes. An example for setting semaphores for higher PROCESSES
settings can be found at Section 8.6, “An Example of Semaphore Settings”.
8.2. The SEMMNI Parameter
8.3. The SEMMNS Parameter
semget(2) man
page explains, values greater than SEMMSL * SEMMNI makes it irrelevant. The maximum number of semaphores that can be allocated on a Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI).
8.4. The SEMOPM Parameter
semop(2)
system call (semaphore call). The semop(2)
function provides the ability to do operations for multiple semaphores with one semop(2)
system call. Since a semaphore set can have the maximum number of SEMMSL semaphores per semaphore set, it is often recommended to set SEMOPM equal to SEMMSL.
8.5. Setting Semaphore Parameters
# cat /proc/sys/kernel/sem 250 32000 32 128
# ipcs -ls
# echo 250 32000 100 128 > /proc/sys/kernel/sem
sysctl -w kernel.sem="250 32000 100 128"
/etc/sysctl.conf
. This file is used during the boot process.
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
8.6. An Example of Semaphore Settings
ora.init
parameter PROCESSES
is very large, the semaphore settings need to be adjusted accordingly.
PROCESSES
parameter of any Oracle database on the system. So if you have one database instance running on a system where PROCESSES
is set to 5000, then SEMMSL should be set to 5010.
ora.init
parameter PROCESSES
is set to 5000, then the semaphore settings should be as follows:
sysctl -w kernel.sem="5010 641280 5010 128"
Chapter 9. Setting File Handles
cat /proc/sys/fs/file-max
$ cat /proc/sys/fs/file-nr 1154 133 8192
file-nr
file displays three parameters:
- the total allocated file handles.
- the number of currently used file handles (with the 2.4 kernel); or the number of currently unused file handles (with the 2.6 kernel).
- the maximum file handles that can be allocated (also found in /proc/sys/fs/file-max).
proc
file system without reboot:
# echo 65536 > /proc/sys/fs/file-max
sysctl(8)
to change it:
# sysctl -w fs.file-max=65536
/etc/sysctl.conf
. This file is used during the boot process.
echo "fs.file-max=65536" >> /etc/sysctl.conf
Chapter 10. Adjusting Network Settings
10.1. Changing Network Adapter Settings
ethtool
command which works now for most network interface cards. To check the adapter settings of eth0
run:
# ethtool eth0
# ethtool -s eth0 speed 1000 duplex full autoneg off
eth0
, set or add the ETHTOOL_OPT
environment variable in /etc/sysconfig/network-scripts/ifcfg-eth0
:
ETHTOOL_OPTS="speed 1000 duplex full autoneg off"
10.2. Changing Network Kernel Settings
SO_SNDBUF
socket option) and receive buffer size (SO_RCVBUF
socket option) to be set to 256 KB. The receive buffers are used by TCP and UDP to hold received data until it is read by the application. The receive buffer cannot overflow because the peer is not allowed to send data beyond the buffer size window. This means that datagrams will be discarded if they do not fit in the socket receive buffer. This could cause the sender to overwhelm the receiver.
# sysctl -w net.core.rmem_default=262144
# sysctl -w net.core.wmem_default=262144
# sysctl -w net.core.rmem_max=262144
# sysctl -w net.core.wmem_max=262144
/etc/sysctl.conf
file, which is used during the boot process:
net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
net.ipv4.tcp_keepalive_time net.ipv4.tcp_keepalive_intvl net.ipv4.tcp_retries2 net.ipv4.tcp_syn_retries
# sysctl -w net.ipv4.ip_local_port_range="1024 65000"
net.ipv4.ip_local_port_range=1024 65000
10.3. Flow Control for e1000 Network Interface Cards
/etc/modprobe.conf
file:
options e1000 FlowControl=1
/var/log/messages
.
Chapter 11. Setting Shell Limits for the Oracle User
ulimit -a
ulimit
for the Bash shell, see man bash and search for ulimit
.
Note
su
to oracle
. If you have this problem try to set UsePrivilegeSeparation
to "no" in /etc/ssh/sshd_config
and restart the SSH daemon by executing service sshd restart
. The privilege separation does not work properly with PAM on some Linux systems. Make sure to talk to the people in charge of security before disabling the SSH security feature "Privilege Separation".
11.1. Limiting Maximum Number of Open File Descriptors for the Oracle User
/proc/sys/fs/file-max
has been changed, see Chapter 9, Setting File Handles, there is still a per user limit of maximum open file descriptors:
$ su - oracle $ ulimit -n 1024 $
/etc/security/limits.conf
file as root and make the following changes or add the following lines, respectively:
oracle soft nofile 4096 oracle hard nofile 63536
ulimit -n 63536
Note
/proc/sys/fs/file-max
. If you do that and the user uses up all the file handles, then the entire system will run out of file handles. This may prevent users logging in as the system cannot open any PAM modules that are required for the login process. That is why the hard limit should be set to 63536 and not 65536.
pam_limits
is configured in the /etc/pam.d/system-auth
file, or in /etc/pam.d/sshd
for ssh
, /etc/pam.d/su
for su
, or /etc/pam.d/login
for local access and telnet
and disable telnet for all log in methods. Here are examples of the two session entries in the /etc/pam.d/system-auth
file:
session required /lib/security/$ISA/pam_limits.so session required /lib/security/$ISA/pam_unix.so
ulimit
options are different for other shells.
$ su - oracle $ ulimit -n 4096 $
$ su - oracle $ ulimit -n 4096 $ ulimit -n 63536 $ ulimit -n 63536 $
ulimit -n 63536
" ,for bashbash
, to the ~oracle/.bash_profile
file which is the user start up file for the bash
shell on Red Hat Enterprise Linux (to verify your shell execute echo $SHELL
). To do this you could simply copy and paste the following commands for oracle's bash
shell:
su - oracle cat >> ~oracle/.bash_profile << EOF ulimit -n 63536 EOF
/etc/security/limits.conf
:
oracle soft nofile 63536 oracle hard nofile 63536
11.2. Limiting Maximum Number of Processes Available for the Oracle User
$ su - oracle $ ulimit -u
Note
ulimit
options are different for other shells.
/etc/security/limits.conf
file:
oracle soft nproc 2047 oracle hard nproc 16384
ulimit -u 16384
",for bash
, to the ~oracle/.bash_profile
file which is the user start up file for the bash shell on Red Hat Enterprise Linux (to verify your shell execute echo $SHELL
). To do this you could simply copy and paste the following commands for oracle's bash
shell:
su - oracle cat >> ~oracle/.bash_profile << EOF ulimit -u 16384 EOF
/etc/security/limits.conf
:
oracle soft nproc 16384 oracle hard nproc 16384
Chapter 12. Enabling Asynchronous I/O and Direct I/O Support
Note
12.1. Relinking Oracle9i R2 to Enable Asynchronous I/O Support
Note
# shutdown Oracle SQL> shutdown su - oracle $ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk async_on $ make -f ins_rdbms.mk ioracle # The last step creates a new "oracle" executable "$ORACLE_HOME/bin/oracle". # It backs up the old oracle executable to $ORACLE_HOME/bin/oracleO, # it sets the correct privileges for the new Oracle executable "oracle", # and moves the new executable "oracle" into the $ORACLE_HOME/bin directory.
# shutdown Oracle SQL> shutdown su - oracle $ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk async_off $ make -f ins_rdbms.mk ioracle
12.2. Relinking Oracle 10g to Enable Asynchronous I/O Support
libaio
and libaio-devel
RPMs are installed on the system:
# rpm -q libaio libaio-devel libaio-0.3.96-5 libaio-devel-0.3.96-5
libaio
RPM, then you will get an error message similar to this one:
SQL> connect / as sysdba oracleorcl: error while loading shared libraries: libaio.so.1: cannot open \ shared object file: No such file or directory ERROR: ORA-12547: TNS:lost contact
libaio
RPMs provide a native Linux asynchronous I/O API. In other words this is a kernel accelerated asynchronous I/O for the POSIX asynchronous I/O facility.
Note
# shutdown Oracle SQL> shutdown su - oracle $ cd $ORACLE_HOME/rdbms/lib $ make PL_ORALIBS=-laio -f ins_rdbms.mk async_on
# shutdown Oracle SQL> shutdown su - oracle $ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk async_off
12.3. Enabling Asynchronous I/O in Oracle 9i and 10g
filesystemio_options
parameter needs to be set to "asynch
".
filesystemio_options=asynch
SQL> show parameter filesystemio_options; NAME TYPE VALUE ------------------------------------ ----------- ----------- filesystemio_options string none SQL>
filesystemio_options
can have the following values with Oracle 9i R2:
asynch
: This value enables asynchronous I/O on file system files.directio
: This value enables direct I/O on file system files.setall
: This value enables both asynchronous and direct I/O on file system files.none
: This value disables both asynchronous and direct I/O on file system files.
filesystemio_options
to "setall
".
Important
Important
setall
” parameter for ext2, ext3, GFS, NFS and OCFS file systems.
12.4. Tuning Asynchronous I/O for Oracle 9i and 10g
aio-max-size
to 1048576 since Oracle uses I/Os of up to 1MB. It controls the maximum I/O size for asynchronous I/Os.
Note
aio-max-size
tuning parameter is not applicable to the 2.6 kernel on Red Hat Enterprise Linux 4 or 5.
$ cat /proc/sys/fs/aio-max-size 131072
# echo 1048576 > /proc/sys/fs/aio-max-size
sysctl(8)
to change it:
# sysctl -w fs.aio-max-size=1048576
/etc/sysctl.conf
file. This file is used during the boot process:
$ echo "fs.aio-max-size=1048576" >> /etc/sysctl.conf
12.5. Verifying Asynchronous I/O Usage
$ORACLE_HOME/bin/oracle
was linked with asynchronous I/O, you can use the Linux commands ldd
and nm
.
$ORACLE_HOME/bin/oracle
was relinked with asynchronous I/O:
$ ldd $ORACLE_HOME/bin/oracle | grep libaio libaio.so.1 => /usr/lib/libaio.so.1 (0x0093d000) $ nm $ORACLE_HOME/bin/oracle | grep io_getevent w io_getevents@@LIBAIO_0.1 $
$ORACLE_HOME/bin/oracle
has NOT been relinked with asynchronous I/O:
$ ldd $ORACLE_HOME/bin/oracle | grep libaio $ nm $ORACLE_HOME/bin/oracle | grep io_getevent w io_getevents $
$ORACLE_HOME/bin/oracle
is relinked with asynchronous I/O it does not necessarily mean that Oracle is really using it. You also have to ensure that Oracle is configured to use asynchronous I/O calls, see Enabling Asynchronous I/O Support.
/proc/slabinfo
file assuming there are no other applications performing asynchronous I/O calls on the system. This file shows kernel slab cache information in real time.
$ egrep "kioctx|kiocb" /proc/slabinfo kioctx 0 0 128 0 0 1 : 1008 252 kiocb 0 0 128 0 0 1 : 1008 252 $
$ egrep "kioctx|kiocb" /proc/slabinfo kioctx 690 690 128 23 23 1 : 1008 252 kiocb 58446 65160 128 1971 2172 1 : 1008 252 $
$ slabtop Active / Total Objects (% used) : 293568 / 567030 (51.8%) Active / Total Slabs (% used) : 36283 / 36283 (100.0%) Active / Total Caches (% used) : 88 / 125 (70.4%) Active / Total Size (% used) : 81285.56K / 132176.36K (61.5%) Minimum / Average / Maximum Object : 0.01K / 0.23K / 128.00K OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME 178684 78396 43% 0.12K 5764 31 23056K size-128 127632 36292 28% 0.16K 5318 24 21272K dentry_cache 102815 74009 71% 0.69K 20563 5 82252K ext3_inode_cache 71775 32434 45% 0.05K 957 75 3828K buffer_head 19460 15050 77% 0.27K 1390 14 5560K radix_tree_node 13090 13015 99% 0.03K 110 119 440K avtab_node 12495 11956 95% 0.03K 105 119 420K size-32 ...
Chapter 13. Configuring I/O for Raw Partitions
13.1. General
/dev/raw
interface bypasses the kernel's block buffer cache entirely that is normally associated with block devices and goes right to the low level device itself. By bypassing the cache it accesses a physical device directly which allows applications such as Oracle databases to have more control over the I/O to the physical device. In fact, Oracle does it is own data caching and raw devices allow Oracle to ensure that data gets written to the disk immediately without OS caching.
Note
O_DIRECT
flag, thus bypasses the OS cache. Support for raw devices was reinstated in Red Hat Enterprise Linux 5.4 and later.
Warning
/dev/sdb
can change to /dev/sda
if the scan order of the controllers is not configured. To force the scan order of the controllers, aliases can be set in /etc/modprobe.conf
. For example:
alias scsi_hostadapter1 aic7xxx
alias scsi_hostadapter2 lpfc
13.2. Basics of Raw Devices
/dev/raw/raw1
to the /dev/sdz
SCSI disk or LUN you can execute the following command:
# raw /dev/raw/raw1 /dev/sdz
dd
command on /dev/raw/raw1
, it will write directly to /dev/sdz
bypassing the OS block buffer cache:
Warning
dev/sdz
# dd if=/dev/zero of=/dev/sdz count=1
/dev/raw/raw1
to /dev/sdz
, add an entry to the /etc/sysconfig/rawdevices
file:
/dev/raw/raw1 /dev/sdz
/etc/init.d/rawdevices
it will read the /etc/sysconfig/rawdevices
file and execute the raw
command for each entry:
/etc/init.d/rawdevices start
/etc/init.d/rawdevices
run each time the system boot, it can be activated by executing the following command:
chkconfig rawdevices on
Note
/dev/sdz
, the entry in /etc/sysconfig/rawdevices
would look like this:
/dev/raw/raw3 /dev/sdz2
/dev/sdz
, the entry in /etc/sysconfig/rawdevices
would look like this:
/dev/raw/raw100 /dev/sdz
13.3. Using Raw Devices for Oracle Databases
/dev/raw/rawN
format. However, devices in this location do not have the correct ownership or permissions for an Oracle database file by default. Additionally, because these device names are owned by the dev package, each time the package is updated (for example, as part of an operating system update), all devices are recreated with the default ownership and permissions at boot. It is therefore necessary to set ownership and permissions each time the dev package is updated.
Procedure 13.1. Configure a raw device
- Configure the desired device in the
/etc/sysconfig/rawdevices
file:/dev/raw/raw1 /dev/sdb1
- Start and enable the device by running:
# service rawdevices start # chkconfig rawdevices on
chmod
and chown
. However, because these devices will be created dynamically at boot time, permissions set in this manner will not persist after a reboot.
Procedure 13.2. Configure persistent ownership and permissions
- To set specific ownership and/or permissions for the raw devices, add entries to
/etc/udev/rules.d/60-raw.rules
in the following format:ACTION=="add", KERNEL=="raw*", OWNER="root", GROUP="disk", MODE="0660"
- Test that the permissions you applied work as intended with
udevtest
:# udevtest /block/sdb/sdb1 | grep raw main: run: '/bin/raw /dev/raw/raw1 /dev/.tmp-8-17'
To test the ownership of a specific device, such as/dev/raw/raw1
, use:# udevtest /class/raw/raw1 | grep mode udev_node_add: creating device node '/dev/raw/raw1', major = '162', minor = '1', mode = '0600', uid = '0', gid = '0'
- Run the following command to activate the udev rules:
# start_udev
13.4. Using Block Devices for Oracle 10g Release 2 in Red Hat Enterprise Linux 4 and 5
O_DIRECT
flag, which can be used for opening block devices to bypass the operating system's cache. Unfortunately, Oracle Clusterware R2 OUI has not been updated and still requires raw devices or a Cluster File System. There is also another bug, see bug number 5021707.
O_DIRECT flag
, thus bypassing the OS cache. For example, when you create disk groups for ASM and you want to use the SCSI block devices /dev/sdb
and /dev/sdc
, you can simply set the Disk Discovery Path to "/dev/sdb, /dev/sdc
" to create the ASM disk group. There is no need to create raw devices and to point the Disk Discovery Path to it.
$ ln -s /dev/emcpowera /u02/oradata/asmdisks/disk01 $ ln -s /dev/emcpowerb /u02/oradata/asmdisks/disk02 $ ln -s /dev/emcpowerc /u02/oradata/asmdisks/disk03 $ ln -s /dev/emcpowerd /u02/oradata/asmdisks/disk04
# chown oracle.dba /u02/oradata/asmdisks/*
oracle:dba
or oracle:oinstall
. Otherwise Oracle can not access the block devices and ASM disk discovery will not list them. You also need to ensure that the ownership of block devices is set after each reboot since Linux changes the ownership of block devices back to "brw-rw---- 1 root disk
" at boot time.
Chapter 14. Large Memory Optimization, Big Pages, and Huge Pages
Note
14.1. Big Pages in Red Hat Enterprise Linux 2.1 and Huge Pages in Red Hat Enterprise Linux 3
bigpages
, feature. In Red Hat Enterprise Linux 3 or 4 Red Hat replaced Big Pages with a feature called Huge Pages, hugetlb
, which behaves a little bit different. The Huge Pages feature in Red Hat Enterprise Linux 3 or 4 allows you to dynamically allocate large memory pages without a reboot. Allocating and changing Big Pages in Red Hat Enterprise Linux 2.1 always required a reboot. However, if memory gets too fragmented in Red Hat Enterprise Linux 3 or 4 allocation of physically contiguous memory pages can fail and a reboot may become necessary.
- increased performance through increased Translation Lookaside Buffer (TLB) hits.
- pages are locked in memory and are never swapped out which guarantees that shared memory such as SGA remains in RAM.
- contiguous pages are pre-allocated and cannot be used for anything else but for System V shared memory, for example SGA.
- less bookkeeping work for the kernel in that part of virtual memory due to larger page sizes.
14.2. Usage of Big Pages and Huge Pages in Oracle 9i and 10g
SHM_HUGETLB
flag when invoking the shmget()
system call. This ensures that shared memory segments are allocated out of the Huge Pages pool. This is done automatically in Oracle 10g and 9i R2 (9.2.0.6) but earlier Oracle 9i R2 versions require a patch, see Metalink Note:262004.1.
14.3. Sizing Big Pages and Huge Pages
ramfs
shared memory file system, see Section 14.8, “Huge Pages and Shared Memory File System in Red Hat Enterprise Linux 3”, but Big Pages can be used for the shm
file system in Red Hat Enterprise Linux 2.1.
14.5. Configuring Big Pages in Red Hat Enterprise Linux 2.1
Highmem
or high memory region in x86. Thus, Big Pages cannot be larger than Highmem
. The total amount of memory in the high region can be obtained by reading the memory statistic HighTotal
from the /proc/meminfo
file:
$ grep "HighTotal" /proc/meminfo HighTotal: 9043840 kB $
# echo "1" > /proc/sys/kernel/shm-use-bigpages
sysctl(8)
to change it:
# sysctl -w kernel.shm-use-bigpages=1
/etc/sysctl.conf
. This file is used during the boot process.
echo "kernel.shm-use-bigpages=1" >> /etc/sysctl.conf
kernel.shm-use-bigpages
to 2 enables the Big Pages feature for the shared memory file system (shmfs
). Setting kernel.shm-use-bigpages
to 0 disables the Big Pages feature. In Red Hat Enterprise Linux 2.1 the size of the Big Pages pool is configured by adding a parameter to the kernel boot command. For example, if you use GRUB and you want to set the Big Pages pool to 1000 MB, edit the /etc/grub.conf
file and add the "bigpages
" parameter as follows:
default=0 timeout=10 title Red Hat Linux Advanced Server (2.4.9-e.40enterprise) root (hd0,0) kernel /vmlinuz-2.4.9-e.40enterprise ro root=/dev/sda2 bigpages=1000MB initrd /initrd-2.4.9-e.40enterprise.img title Red Hat Linux Advanced Server (2.4.9-e.40smp) root (hd0,0) kernel /vmlinuz-2.4.9-e.40smp ro root=/dev/sda2 initrd /initrd-2.4.9-e.40smp.img
# shutdown -r now
BigPagesFree
in /proc/meminfo
.
grep BigPagesFree /proc/meminfo
HighTotal
in /proc/meminfo
is 0 KB, then BigPagesFree
will always be 0 KB as well since Big Pages can only be allocated and pinned above approximately 860MB of physical RAM.
14.6. Configuring Huge Pages in Red Hat Enterprise Linux 3
$ grep Hugepagesize /proc/meminfo Hugepagesize: 2048 kB $
hugetlb_pool
in the proc
file system. For example, to allocate a 1GB Huge Page pool, execute:
# echo 1024 > /proc/sys/vm/hugetlb_pool
sysctl(8)
to change it:
# sysctl -w vm.hugetlb_pool=1024
/etc/sysctl.conf
. This file is used during the boot process. The Huge Pages pool is usually guaranteed if requested at boot time:
# echo "vm.hugetlb_pool=1024" >> /etc/sysctl.conf
$ grep HugePages_Total /proc/meminfo HugePages_Total: 512 $
HugePages_Total
is lower than what was requested with hugetlb_pool
, then the system does either not have enough memory or there are not enough physically contiguous free pages. In the latter case the system needs to be rebooted which should give you a better chance of getting the memory.
$ grep HugePages_Free /proc/meminfo
$ grep MemFree /proc/meminfo
$ grep HugePages_Free /proc/meminfo
# echo 0 > /proc/sys/vm/hugetlb_pool
14.7. Configuring Huge Pages in Red Hat Enterprise Linux 4 or 5
$ grep Hugepagesize /proc/meminfo Hugepagesize: 2048 kB $
nr_hugepages
in the proc file system. For example, to allocate 512 Huge Pages, execute:
# echo 512 > /proc/sys/vm/nr_hugepages
sysctl(8)
to change it:
# sysctl -w vm.nr_hugepages=512
/etc/sysctl.conf
. This file is used during the boot process. The Huge Pages pool is usually guaranteed if requested at boot time:
# echo "vm.nr_hugepages=512" >> /etc/sysctl.conf
$ grep HugePages_Total /proc/meminfo HugePages_Total: 512 $
HugePages_Total
is lower than what was requested with nr_hugepages
, then the system does either not have enough memory or there are not enough physically contiguous free pages. In the latter case the system needs to be rebooted which should give you a better chance of getting the memory.
$ grep HugePages_Free /proc/meminfo
$ grep MemFree /proc/meminfo
Note
ulimit
parameter "memlock
" for the oracle user in /etc/security/limits.conf
if "max locked memory
" is not unlimited or too small, see ulimit -a or ulimit -l. An example can be seen below.
oracle soft memlock 1048576 oracle hard memlock 1048576
memlock
parameter specifies how much memory the oracle user can lock into its address space. Note that Huge Pages are locked in physical memory. The memlock setting is specified in KB and must match the memory size of the number of Huge Pages that Oracle should be able to allocate. So if the Oracle database should be able to use 512 Huge Pages, then memlock must be set to at least 512 * Hugepagesize
, which on this system would be 1048576 KB (512*1024*2). If memlock is too small, then no single Huge Page will be allocated when the Oracle database starts. For more information on setting shell limits, see Chapter 22, Setting Shell Limits for Your Oracle User.
ulimit -l
before starting the database.
$ grep HugePages_Free /proc/meminfo
# echo 0 > /proc/sys/vm/nr_hugepages
Chapter 15. Growing the Oracle SGA to 2.7 GB in x86 Red Hat Enterprise Linux 2.1 Without VLM
15.1. General
mapped_base
) for shared libraries and the SGA Attach Address for shared memory segments. Lowering the Mapped Base Address and the SGA Attach Address allows SGA sizes up to 2.7 GB. By default, the shared memory segment size can only be increased to roughly 1.7 GB in Red Hat Enterprise Linux 2.1.
15.2. Linux Memory Layout
- 0GB-1GB User space - Used for text, code and
brk
/sbrk
allocations.malloc
usesbrk
for small chunks. - 1GB-3GB User space - Used for shared libraries, shared memory, and the stack. Shared memory and
malloc
usemmap
.malloc
usesmmap
for large chunks. - 3GB-4GB Kernel Space - Used by and for the kernel itself
brk(2)
and mmap(2)
was changed by setting the kernel parameter TASK_UNMAPPED_BASE
and by recompiling the kernel. However, on all Red Hat Enterprise Linux systems this parameter can be changed dynamically as will be shown later. The mmap
allocated memory grow bottom up from 1GB and the stack grows top down from around 3GB. The split between userspace and kernelspace is set by the kernel parameter PAGE_OFFSET
which is usually 0xc0000000
(3GB).
0x40000000
(1 GB) and 0xc0000000
(3 GB) is available for mapping shared libraries and shared memory segments. The default mapped base for loading shared libraries is 0x40000000
(1 GB) and the SGA attach address for shared memory segments is above the shared libraries. In Oracle 9i on Red Hat Enterprise Linux 2.1 the default SGA attach address for shared memory is 0x50000000
(1.25 GB) where the SGA is mapped. This leaves 0.25 GB space for loading shared libraries between 0x40000000
(1 GB) and 0x50000000
(1.25 GB).
/proc/<pid>/maps
where pid stands for the process ID. Here is an example of a default address mapping of an Oracle 9i process in Red Hat Enterprise Linux 2.1:
08048000-0ab11000 r-xp 00000000 08:09 273078 /ora/product/9.2.0/bin/oracle 0ab11000-0ab99000 rw-p 02ac8000 08:09 273078 /ora/product/9.2.0/bin/oracle 0ab99000-0ad39000 rwxp 00000000 00:00 0 40000000-40016000 r-xp 00000000 08:01 16 /lib/ld-2.2.4.so 40016000-40017000 rw-p 00015000 08:01 16 /lib/ld-2.2.4.so 40017000-40018000 rw-p 00000000 00:00 0 40018000-40019000 r-xp 00000000 08:09 17935 /ora/product/9.2.0/lib/libodmd9.so 40019000-4001a000 rw-p 00000000 08:09 17935 /ora/product/9.2.0/lib/libodmd9.so 4001a000-4001c000 r-xp 00000000 08:09 16066 /ora/product/9.2.0/lib/libskgxp9.so ... 42606000-42607000 rw-p 00009000 08:01 50 /lib/libnss_files-2.2.4.so 50000000-50400000 rw-s 00000000 00:04 163842 /SYSV00000000 (deleted) 51000000-53000000 rw-s 00000000 00:04 196611 /SYSV00000000 (deleted) 53000000-55000000 rw-s 00000000 00:04 229380 /SYSV00000000 (deleted) ... bfffb000-c0000000 rwxp ffffc000 00:00 0
0x40000000
(1 GB) and System V shared memory, in this case SGA, starts at 0x50000000
(1.25 GB). Here is a summary of all the entries:
08048000-0ab11000 r-xp 00000000 08:09 273078 /ora/product/9.2.0/bin/oracle
0ab11000-0ab99000 rw-p 02ac8000 08:09 273078 /ora/product/9.2.0/bin/oracle
0ab99000-0ad39000 rwxp 00000000 00:00 0
40000000-40016000 r-xp 00000000 08:01 16 /lib/ld-2.2.4.so
50000000-50400000 rw-s 00000000 00:04 163842 /SYSV00000000 (deleted)
bfffb000-c0000000 rwxp ffffc000 00:00 0
15.3. Increasing Space for the SGA in Red Hat Enterprise Linux 2.1
mapped_base
) for shared libraries must be lowered from 0x40000000
(1 GB) to 0x10000000
(0.25 GB) and the SGA Attach Address for shared memory segments must be lowered from 0x50000000
(1.25 GB) to 0x15000000
(336 MB). Lowering the SGA attach address increases the available space for shared memory almost 1 GB. If shared memory starts at 0x15000000
(336 MB), then the space between 0x15000000
(336 MB) and 0xc0000000
(3GB) minus stack size becomes available for the SGA. Note the mapped base for shared libraries should not be above the SGA attach address, example, between 0x15000000
(336 MB) and 0xc0000000
(3GB).
Chapter 16. Growing the Oracle SGA to 2.7/3.42 GB in x86 Red Hat Enterprise Linux 3, 4 and 5 Without VLM
16.1. General
16.3. Oracle 10g SGA Sizes in Red Hat Enterprise Linux 3, 4 or 5
Red Hat Enterprise Kernel Type | 10g Database Version | Default Supported SGA without VLM | Max Supported SGA without VLM | Comments |
---|---|---|---|---|
smp kernel (x86) | 10g Release 1 | Up to 1.7 GB | Up to 2.7 GB | 10g R1 must be relinked to increase the SGA size to approx 2.7 GB |
hugemem kernel (x86) | 10g Release 1 | Up to 2.7 GB | Up to 3.42 GB | 10g R1 must be relinked to increase the SGA size to approx 3.42 GB |
smp kernel (x86) | 10g Release 2 | Up to ~2.2 GB (*) | Up to ~2.2 GB (*) | No relink of 10g R2 is necessary but the SGA Attach Address is a little bit higher than in R1 |
hugemem kernel (x86) | 10g Release 2 | Up to ~3.3 GB (*) | Up to ~3.3 GB (*) | No relink of 10g R2 is necessary but the SGA Attach Address is a little bit higher than in R1 |
Note
16.4. Lowering the SGA Attach Address in Oracle 10g
# ps -ef | grep "[o]ra_ckpt" oracle 3035 1 0 23:21 ? 00:00:00 ora_ckpt_orcl # cat /proc/3035/maps | grep SYSV 50000000-aa200000 rw-s 00000000 00:04 262144 /SYSV8b1d1510 (deleted) #
# ps -ef | grep "[o]ra_ckpt" oracle 4998 1 0 22:29 ? 00:00:00 ora_ckpt_orcl # cat /proc/4998/maps | grep SYSV 20000000-f4200000 rw-s 00000000 00:04 4390912 /SYSV950d1f70 (deleted) #
su - oracle cd $ORACLE_HOME/rdbms/lib [[ ! -f ksms.s_orig ]] && cp ksms.s ksms.s_orig genksms -s 0Xe000000 > ksms.s make -f ins_rdbms.mk ksms.o make -f ins_rdbms.mk ioracle
$ objdump -t $ORACLE_HOME/bin/oracle |grep sgabeg 0e000000 l *ABS* 00000000 sgabeg $
# ps -ef | grep "[o]ra_ckpt" oracle 4998 1 0 22:29 ? 00:00:00 ora_ckpt_orcl # cat /proc/4998/maps | grep SYSV 0e000000-c1200000 rw-s 00000000 00:04 0 /SYSV8b1d1510 (deleted) #
Note
Chapter 17. Using Very Large Memory (VLM)
17.1. General
init.ora
parameter VLM_WINDOW_SIZE
must be changed to reflect the size of the database buffer cache. However, it is not recommended to use VLM if db_block_buffers
is not greater than 512MB.
shmfs
/tmpfs
: This memory file system is pageable and swappable and cannot be backed by Huge Pages because Huge Pages are not swappable.ramfs
: This memory file systems is not pageable or swappable and not backed by Huge Pages, see also Huge Pages and Shared Memory File System in Red Hat Enterprise Linux 3 and 4.
shmfs
file system is available in Red Hat Enterprise Linux 3 but not in Red Hat Enterprise Linux 4 or 5:
$ cat /etc/redhat-release Red Hat Enterprise Linux AS release 3 (Taroon Update 6) $ egrep "shm|tmpfs|ramfs" /proc/filesystems nodev tmpfs nodev shm nodev ramfs $ $ cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 2) $ egrep "shm|tmpfs|ramfs" /proc/filesystems nodev tmpfs nodev ramfs $
mount: fs type shm not supported by kernel
mount
a tmpfs file system.
17.2. Configuring Very Large Memory (VLM)
ramfs
is not swappable). Furthermore, ramfs
is not backed by Huge Pages and therefore the Huge Pages pool should not be increased for database buffers, see Chapter 6, Swap Space. In fact, if there are too many Huge Pages allocated, then there may not be enough memory for ramfs.
# umount /dev/shm # mount -t ramfs ramfs /dev/shm # chown oracle:dba /dev/shm
/dev/shm
directory that corresponds to the extended buffer cache. Ensure to add the above lines to /etc/rc.local
. If ointall
is the primary group of the Oracle account, use chown oracle:oinstall /dev/shm
instead. For security reasons you do not want to give anyone write access to the shared memory file system. Having write access to the ramfs
file system allows you to allocate and pin a large chunk of memory in RAM. In fact, you can kill a machine by allocating too much memory in the ramfs
file system.
use_indirect_data_buffers
to true:
use_indirect_data_buffers=true
DB_CACHE_SIZE
and DB_xK_CACHE_SIZE
parameters to DB_BLOCK_BUFFERS
, and to remove SGA_TARGET
if set. Otherwise you will get errors like these:
ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
hugemem
kernels:
use_indirect_data_buffers=true db_block_size=8192 db_block_buffers=1048576 shared_pool_size=2831155200
shmmax
needs to be increased for shared_pool_size
to fit into the System V shared memory. In fact, it should be slightly larger than the SGA size. Since shared_pool_size
is less than 3 GB in this example, shmmax
does not need to be larger than 3GB. The 8 GB indirect buffer cache will be in the RAM disk and hence it does not have to be accounted for in shmmax
. On a 32 bit system the shmmax
kernel parameter cannot be larger than 4GB, see also Section 7.3, “Setting SHMALL Parameter”.
ulimit
parameter memlock
must be changed for oracle. Ensure to set memlock
in /etc/security/limits.conf
to 3145728:
oracle soft memlock 3145728 oracle hard memlock 3145728 Login as Oracle again and check max locked memory limit: $ ulimit -l 3145728
ssh
log in, then you may have to set the SSH parameter UsePrivilegeSeparation
, see Chapter 22, Setting Shell Limits for Your Oracle User.
memlock
is not set or too small, you will get error messages similar to this one:
ORA-27103: internal error Linux Error: 11: Resource temporarily unavailable
sqlplus
banner or show sga may not accurately reflect the actual SGA size in older Oracle versions.
$ ls -al /dev/shm total 120 drwxr-xr-x 1 oracle dba 0 Nov 20 16:29 . drwxr-xr-x 22 root root 118784 Nov 20 16:25 .. -rw-r----- 1 oracle dba 8589934592 Nov 20 16:30 ora_orcl_458754 $
ORA-27103: internal error Linux Error: 12: Cannot allocate memory
Part II. Installing the Oracle Database 10g on Red Hat Enterprise Linux
Introduction and Information on Supported Setups for Oracle 10g
Oracle Database Version | Red Hat Enterprise Linux Version | Architecture | Comments |
---|---|---|---|
Oracle 10g R2 (10.2.0.1.0) | 4 and 5 | x86-64 | See also Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86-64. |
Oracle 10g R2 (10.2.0.1.0) | 3, 4 and 5 | x86 | See also Oracle Database Release Notes 10g Release 2 (10.2) for Linux x86. |
Oracle 10g R1 (10.1.0.3) | 4 | x86-64 | See also Oracle Database Installation Guide 10g Release 1 (10.1.0.3) for Linux x86-64 |
Oracle 10g R1 (10.1.0.3) | 4 | x86 | See also Oracle Database Release Notes 10g Release 1 (10.1.0.3.0) for Linux x86. |
Oracle 10g R1 (10.1.0.3) | 3 | x86-64 | See also Oracle Database Installation Guide 10g Release 1 (10.1.0.3) for Linux x86-64. |
Oracle 10g R1 (10.1.0.3) | 3 | x86 | See also Oracle Database Installation Guide 10g Release 1 (10.1) for UNIX Systems. |
Oracle 10g R1 (10.1.0.2) | 2.1 | x86 | See also Oracle Database Installation Guide 10g Release 1 (10.1) for UNIX Systems. |
Chapter 18. Downloading and Unpacking Oracle 10g Installation Files
Note
ship.db.lnx32.cpio.gz
, 10201_database_linux_x86_64.cpio
or similar file.
cksum ship.db.lnx32.cpio.gz
gunzip ship.db.lnx32.cpio.gz
ship.db.lnx32.cpio
:
$ cpio -idmv < ship.db.lnx32.cpio Disk1/stage/Components/oracle.server/10.1.0.3.0/1 Disk1/stage/Components/oracle.server/10.1.0.3.0 Disk1/stage/Components/oracle.server Disk1/stage/Components/oracle.tg/10.1.0.3.0/1/DataFiles Disk1/stage/Components/oracle.tg/10.1.0.3.0/1 Disk1/stage/Components/oracle.tg/10.1.0.3.0 Disk1/stage/Components/oracle.tg Disk1/stage/Components/oracle.assistants.dbca/10.1.0.3.0/1/DataFiles/doc.3.1.jar Disk1/stage/Components/oracle.assistants.dbca/10.1.0.3.0/1/DataFiles/class.jar ...
Chapter 19. Pre-Installation Preparation and Verification
19.1. Verifying Memory and Swap Space
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
19.2. Verifying Temporary(/tmp
) Space
OUI
) requires up to 400 MB of free space in the /tmp
directory.
/tmp
, run:
$ df /tmp
/tmp
file system, you can temporarily create a tmp
directory in another file system. Here is how you can do this:
su - root mkdir /<AnotherFilesystem> /tmp chown root.root /<AnotherFilesystem> /tmp chmod 1777 /<AnotherFilesystem> /tmp export TEMP=/<AnotherFilesystem> export TMPDIR=/<AnotherFilesystem>
TEMP=/<AnotherFilesystem>
file is used by Oracle. The TMPDIR=/<AnotherFilesystem> file is used by Linux programs like the linker "ld
". Note as well <AnotherFilesystem> should be adjusted to fit your filesystem. When you are done with the Oracle installation, shut down Oracle and remove the temporary /tmp
directory:
su - root rmdir /<AnotherFilesystem>/tmp unset TEMP unset TMPDIR
19.3. Verifying Software Packages (RPMs)
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-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
Note
libaio-0.3.96
RPM or a newer version, otherwise the OUI prerequisite check will fail.
# uname -mi x86_64 x86_64
rpm -q --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 \ libaio
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-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
Note
libaio-0.3.96
RPM or a newer version, otherwise the OUI prerequisite check will fail.
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \ gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio
make-3.79.1 gcc-3.2.3-34 glibc-2.3.2-95.20 compat-db-4.0.14-5 compat-gcc-7.3-2.96.128 compat-gcc-c++-7.3-2.96.128 compat-libstdc++-7.3-2.96.128 compat-libstdc++-devel-7.3-2.96.128 openmotif21-2.1.30-8 setarch-1.3-1
Note
libaio-0.3.96
RPM or a newer version is required for the OUI to work successfully.
rpm -q make gcc glibc compat-db compat-gcc compat-gcc-c++ compat-libstdc++ \ compat-libstdc++-devel openmotif21 setarch libaio
make-3.79.1 gcc-3.2.3-34 glibc-2.3.2-95.20 glibc-devel-2.3.2-95.20 glibc-devel-2.3.2-95.20 (32 bit) compat-db-4.0.14-5 compat-gcc-7.3-2.96.128 compat-gcc-c++-7.3-2.96.128 compat-libstdc++-7.3-2.96.128 compat-libstdc++-devel-7.3-2.96.128 gnome-libs-1.4.1.2.90-34.1 (32 bit) openmotif21-2.1.30-8 setarch-1.3-1 libaio-0.3.96-3 libaio-devel-0.3.96-3
# uname -mi x86_64 x86_64
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \ make gcc glibc glibc-devel compat-db compat-gcc compat-gcc-c++ \ compat-libstdc++ compat-libstdc++-devel gnome-libs openmotif21 setarch \ libaio libaio-devel
make-3.79.1 gcc-3.2.3-34 glibc-2.3.2-95.20 compat-db-4.0.14-5 compat-gcc-7.3-2.96.128 compat-gcc-c++-7.3-2.96.128 compat-libstdc++-7.3-2.96.128 compat-libstdc++-devel-7.3-2.96.128 openmotif21-2.1.30-8 setarch-1.3-1
rpm -q make gcc glibc compat-db compat-gcc compat-gcc-c++ compat-libstdc++ \ compat-libstdc++-devel openmotif21 setarch
make-3.79.1 glibc-2.2.4-32 gcc-2.96-128 gcc-c++-2.96-128 libstdc++-2.96-128 openmotif-2.1.30-11
rpm -q make glibc gcc gcc-c++ libstdc++ openmotif
binutils-2.11.90.0.8-12
or a newer version installed. Make sure you have the binutils RPM installed on Red Hat Enterprise Linux 4 and 5 as well:
rpm -q binutils
Important
openmotif
package is missing (do not confuse it with the openmotif21
package). Red Hat changed the version naming schema from openmotif-2.2.2-16
in the original release to openmotif-2.2.3-5.RHEL3.2
in Red Hat Enterprise Linux 3 Update 5. This seems to confuse OUI in Red Hat Enterprise Linux3 U5 since it complaining that it can not find the right openmotif
version. You can ignore this. The openmotif-2.2.3-5.RHEL3.2 is just a newer version of openmotif-2.2.2-16
which should work fine and should not cause any problems. To check the RPM, run:
rpm -q openmotif
rpm -q redhat-release
setarch
utility is new in Red Hat Enterprise Linux 3 and 4. It is used to tell the kernel to report a different architecture than the current one. It is also used to emulate a 3GB virtual address space for applications that do not run properly with a larger virtual address space. To check the RPM, run:
rpm -q setarch
19.4. Verifying Kernel Parameters
su - root sysctl -a
proc
file system:
shmmax
, execute:
cat /proc/sys/kernel/shmmax shmmax = 2147483648
shmmni
, execute:
cat /proc/sys/kernel/shmmni shmmni = 4096
shmall
parameter, execute the command below. shmall
is used in 10g R1.
cat /proc/sys/kernel/shmall shmall = 2097152
ipcs -lm |grep "min seg size" shmmin = 1
shmseg
is hardcoded in the kernel, the default is much higher.
shmseg = 10
semmsl
, execute:
cat /proc/sys/kernel/sem | awk '{print $1}' semmsl = 250
semmns
, execute:
cat /proc/sys/kernel/sem | awk '{print $2}' semmns = 32000
semopm
, execute:
cat /proc/sys/kernel/sem | awk '{print $3}' semopm = 100
semmni
, execute:
cat /proc/sys/kernel/sem | awk '{print $4}' semmni = 128
file-max
, execute:
cat /proc/sys/fs/file-max file-max = 65536
ip_local_port_range
, execute:
cat /proc/sys/net/ipv4/ip_local_port_range ip_local_port_range = 1024 65000
Note
shmmax
, semopm
, and filemax
to meet the minimum requirement. On Red Hat Enterprise Linux 4 x86-64 you may have to increase shmmax
and semopm
.
ip_local_port_range
for outgoing messages to "1024 65000" which is needed for high usage systems. This kernel parameter defines the local port range for TCP and UDP traffic to choose from.
/etc/sysctl.conf
file which are read during the boot process:
kernel.shmmax=2147483648 kernel.sem=250 32000 100 128 fs.file-max=65536 net.ipv4.ip_local_port_range=1024 65000
/etc/sysctl.conf
file will cause the system to change these kernel parameters after each boot using the /etc/rc.d/rc.sysinit
script which is invoked by /etc/inittab
. But in order that these new added lines or settings in /etc/sysctl.conf
become effective immediately, execute the following command:
su - root sysctl -p
SO_SNDBUF
socket option) and receive buffer size (SO_RCVBUF
socket option) to be set to 256 KB. The receive buffers are used by TCP and UDP to hold the received data for the application until it is read. This buffer cannot overflow because the sending party is not allowed to send data beyond the buffer size window. This means that datagrams will be discarded if they do not fit in the receive buffer. This could cause the sender to overwhelm the receiver.
# sysctl -w net.core.rmem_default=262144
# sysctl -w net.core.wmem_default=262144
# sysctl -w net.core.rmem_max=262144
# sysctl -w net.core.wmem_max=262144
/etc/sysctl.conf
file, which is used during the boot process:
net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
Chapter 20. Installing Required Software Packages
- 10g R2 on Red Hat Enterprise Linux 4 and 5 (x86-64),
- 10g R2 on Red Hat Enterprise Linux 4 and 5 (x86),
- 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86-64),
- 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86),
- 10g R1 and R2 on Red Hat Enterprise Linux 3 (x86),
- 10g R1 on Red Hat Enterprise Linux 3 (x86-64), and
- 10g R1 on Red Hat Enterprise Linux 2.1 (x86).
20.1. 10g R2 on Red Hat Enterprise Linux 4 and 5 x86-64 version
# rpm -Uvh gcc-3.4.4-2.x86_64.rpm \ gcc-c++-3.4.4-2.x86_64.rpm \ libstdc++-devel-3.4.4-2.x86_64.rpm \ cpp-3.4.4-2.x86_64.rpm \ glibc-devel-2.3.4-2.13.x86_64.rpm \ glibc-headers-2.3.4-2.13.x86_64.rpm \ glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm #rpm -Uvh gnome-libs-1.4.1.2.90-44.1.x86_64.rpm \ compat-db-4.1.25-9.x86_64.rpm \ ORBit-0.5.17-14.x86_64.rpm \ gtk+-1.2.10-33.x86_64.rpm \ imlib-1.9.13-23.x86_64.rpm \ libpng10-1.0.16-1.x86_64.rpm \ gdk-pixbuf-0.22.0-16.el4.x86_64.rpm \ libungif-4.1.3-1.x86_64.rpm # rpm -Uvh sysstat-5.0.5-1.x86_64.rpm
rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm \ xorg-x11-libs-6.8.2-1.EL.13.20.i386.rpm \ xorg-x11-Mesa-libGL-6.8.2-1.EL.13.20.i386.rpm \ expat-1.95.7-4.i386.rpm \ fontconfig-2.2.3-7.i386.rpm \ freetype-2.1.9-1.i386.rpm \ zlib-1.2.1.2-1.2.i386.rpm rpm -Uvh libaio-0.3.103-3.x86_64.rpm rpm -Uvh compat-libstdc++-33-3.2.3-47.3.x86_64.rpm rpm -Uvh glibc-devel-2.3.4-2.13.i386.rpm libgcc-3.4.4-2.i386.rpm
binutils
RPM from https://rhn.redhat.com/ or from http://oss.oracle.com/. This command will install the newer version of binutils
, remember to change the version number if the one you downloaded is newer.
rpm -Uvh --force binutils-2.15.92.0.2-13.0.0.0.2.x86_64.rpm
/usr/bin/ld: /u01/app/oracle/oracle/product/10.2.0/db_1/lib//libirc.a(fast_memcpy.o): relocation R_X86_64_PC32 against `_memcpy_mem_ops_method' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status
control-center
and xscreensaver
RPMs as a requirements. But you should not have any problems when these RPMs are missing. But if you want to install them, you may have to install many additional RPMs in order to satisfy dependencies:
rpm -Uvh gcc-3.4.4-2.x86_64.rpm \ gcc-c++-3.4.4-2.x86_64.rpm \ libstdc++-devel-3.4.4-2.x86_64.rpm \ cpp-3.4.4-2.x86_64.rpm \ glibc-devel-2.3.4-2.13.x86_64.rpm \ glibc-headers-2.3.4-2.13.x86_64.rpm \ glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm rpm -Uvh control-center-2.8.0-12.rhel4.2.x86_64.rpm \ xscreensaver-4.18-5.rhel4.9.x86_64.rpm \ eel2-2.8.1-2.x86_64.rpm \ gail-1.8.0-2.x86_64.rpm \ gnome-desktop-2.8.0-5.x86_64.rpm \ gnome-icon-theme-2.8.0-1.el4.1.3.noarch.rpm \ libgail-gnome-1.1.0-1.x86_64.rpm \ libxklavier-1.02-3.x86_64.rpm \ metacity-2.8.6-2.8.x86_64.rpm \ nautilus-2.8.1-4.x86_64.rpm \ startup-notification-0.7-1.x86_64.rpm \ xloadimage-4.1-34.RHEL4.x86_64.rpm \ xorg-x11-Mesa-libGLU-6.8.2-1.EL.13.20.x86_64.rpm \ at-spi-1.6.0-3.x86_64.rpm \ desktop-backgrounds-basic-2.0-26.2.1E.noarch.rpm \ eog-2.8.1-2.x86_64.rpm \ gnome-panel-2.8.1-3.3E.x86_64.rpm \ gnome-vfs2-smb-2.8.2-8.2.x86_64.rpm \ hicolor-icon-theme-0.3-3.noarch.rpm \ libexif-0.5.12-5.1.x86_64.rpm \ librsvg2-2.8.1-1.x86_64.rpm \ nautilus-cd-burner-2.8.3-6.x86_64.rpm \ redhat-artwork-0.120.1-1.2E.x86_64.rpm \ scrollkeeper-0.3.14-3.x86_64.rpm \ cdrecord-2.01.1-5.x86_64.rpm \ docbook-dtds-1.0-25.noarch.rpm \ evolution-data-server-1.0.2-9.x86_64.rpm \ intltool-0.31.2-1.x86_64.rpm \ libcroco-0.6.0-4.x86_64.rpm \ libgnomeprint22-2.8.0-3.x86_64.rpm \ libgnomeprintui22-2.8.0-1.x86_64.rpm \ libgsf-1.10.1-1.x86_64.rpm \ libwnck-2.8.1-1.rhel4.1.x86_64.rpm \ mkisofs-2.01.1-5.x86_64.rpm \ samba-common-3.0.10-1.4E.2.x86_64.rpm \ ghostscript-7.07-33.x86_64.rpm \ ghostscript-fonts-5.50-13.noarch.rpm \ gnutls-1.0.20-3.2.1.x86_64.rpm \ libgnomecups-0.1.12-5.x86_64.rpm \ libsoup-2.2.1-2.x86_64.rpm \ openjade-1.3.2-14.x86_64.rpm \ perl-XML-Parser-2.34-5.x86_64.rpm \ sgml-common-0.6.3-17.noarch.rpm \ urw-fonts-2.2-6.1.noarch.rpm \ xml-common-0.6.3-17.noarch.rpm \ VFlib2-2.25.6-25.x86_64.rpm \ chkfontpath-1.10.0-2.x86_64.rpm \ perl-URI-1.30-4.noarch.rpm \ perl-libwww-perl-5.79-5.noarch.rpm \ xorg-x11-font-utils-6.8.2-1.EL.13.20.x86_64.rpm \ perl-HTML-Parser-3.35-6.x86_64.rpm \ xorg-x11-xfs-6.8.2-1.EL.13.20.x86_64.rpm \ perl-HTML-Tagset-3.03-30.noarch.rpm \ ttmkfdir-3.0.9-14.1.EL.x86_64.rpm
20.2. 10g R2 on Red Hat Enterprise Linux 4 and 5 (x86)
rpm -Uvh gcc-3.4.4-2.i386.rpm \ gcc-c++-3.4.4-2.i386.rpm \ libstdc++-devel-3.4.4-2.i386.rpm \ glibc-devel-2.3.4-2.13.i386.rpm \ glibc-headers-2.3.4-2.13.i386.rpm \ glibc-kernheaders-2.4-9.1.98.EL.i386.rpm rpm -Uvh gnome-libs-1.4.1.2.90-44.1.i386.rpm \ compat-db-4.1.25-9.i386.rpm \ ORBit-0.5.17-14.i386.rpm \ gtk+-1.2.10-33.i386.rpm \ imlib-1.9.13-23.i386.rpm \ libpng10-1.0.16-1.i386.rpm \ gdk-pixbuf-0.22.0-16.el4.i386.rpm \ libungif-4.1.3-1.i386.rpm \ alsa-lib-1.0.6-5.RHEL4.i386.rpm \ audiofile-0.2.6-1.i386.rpm \ esound-0.2.35-2.i386.rpm rpm -Uvh sysstat-5.0.5-1.i386.rpm rpm -Uvh libaio-0.3.103-3.i386.rpm rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm
control-center
and xscreensaver
RPMs as a requirements. But you should not have any problems when these RPMs are missing. If you want to install them, you may have to install many additional RPMs in order to satisfy dependencies.
20.3. 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86-64)
rpm -Uvh gcc-3.4.3-22.1.x86_64.rpm \ cpp-3.4.3-22.1.x86_64.rpm \ glibc-devel-2.3.4-2.9.x86_64.rpm \ glibc-headers-2.3.4-2.9.x86_64.rpm \ glibc-kernheaders-2.4-9.1.87.x86_64.rpm rpm -Uvh glibc-devel-2.3.4-2.9.i386.rpm rpm -Uvh openmotif-2.2.3-9.RHEL4.1.x86_64.rpm \ xorg-x11-deprecated-libs-6.8.2-1.EL.13.6.x86_64.rpm rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.6.i386.rpm \ xorg-x11-libs-6.8.2-1.EL.13.6.i386.rpm \ xorg-x11-Mesa-libGL-6.8.2-1.EL.13.6.i386.rpm \ expat-1.95.7-4.i386.rpm fontconfig-2.2.3-7.i386.rpm \ freetype-2.1.9-1.i386.rpm zlib-1.2.1.2-1.i386.rpm rpm -Uvh libgcc-3.4.3-22.1.i386.rpm
20.4. 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86)
rpm -Uvh gcc-3.4.3-9.EL4.i386.rpm \ glibc-devel-2.3.4-2.i386.rpm \ glibc-headers-2.3.4-2.i386.rpm \ glibc-kernheaders-2.4-9.1.87.i386.rpm rpm -Uvh openmotif-2.2.3-6.RHEL4.2.i386.rpm \ xorg-x11-deprecated-libs-6.8.1-23.EL.i386.rpm
Note
gcc
, binutils
, and openmotif
versions. You can ignore these failed checks and proceed.
Important
/etc/redhat-release
file, see below, or you apply the 4153257 patch for 10g R1 on Red Hat Enterprise Linux 4 and 5.
20.5. Oracle 10g R1 and R2 on Red Hat Enterprise Linux 3 (x86)
rpm -Uvh gcc-3.2.3-52.i386.rpm \ cpp-3.2.3-52.i386.rpm \ glibc-devel-2.3.2-95.33.i386.rpm \ glibc-headers-2.3.2-95.33.i386.rpm \ glibc-kernheaders-2.4-8.34.1.i386.rpm rpm -Uvh compat-db-4.0.14-5.1.i386.rpm \ compat-gcc-7.3-2.96.128.i386.rpm \ compat-gcc-c++-7.3-2.96.128.i386.rpm \ compat-libstdc++-7.3-2.96.128.i386.rpm \ compat-libstdc++-devel-7.3-2.96.128.i386.rpm \ tcl-8.3.5-92.2.i386.rpm rpm -Uvh libaio-0.3.96-5.i386.rpm rpm -Uvh openmotif21-2.1.30-9.RHEL3.6.i386.rpm rpm -Uvh openmotif-2.2.3-5.RHEL3.2.i386.rpm
20.6. Oracle 10g R1 on Red Hat Enterprise Linux 3 (x86_64)
rpm -Uvh gcc-3.2.3-52.x86_64.rpm \ cpp-3.2.3-52.x86_64.rpm \ glibc-devel-2.3.2-95.33.x86_64.rpm \ glibc-headers-2.3.2-95.33.x86_64.rpm \ glibc-kernheaders-2.4-8.34.1.x86_64.rpm rpm -Uvh glibc-devel-2.3.2-95.33.i386.rpm rpm -Uvh compat-db-4.0.14-5.1.x86_64.rpm \ compat-gcc-7.3-2.96.128.i386.rpm \ compat-gcc-c++-7.3-2.96.128.i386.rpm \ compat-libstdc++-7.3-2.96.128.i386.rpm \ compat-libstdc++-devel-7.3-2.96.128.i386.rpm \ tcl-8.3.5-92.2.x86_64.rpm \ libgcc-3.2.3-52.i386.rpm rpm -Uvh libaio-0.3.96-5.x86_64.rpm \ libaio-devel-0.3.96-5.x86_64.rpm
rpm -Uvh gnome-libs-1.4.1.2.90-34.2.x86_64.rpm \ ORBit-0.5.17-10.4.x86_64.rpm \ audiofile-0.2.3-7.1.x86_64.rpm \ esound-0.2.28-6.x86_64.rpm \ gtk+-1.2.10-31.x86_64.rpm \ imlib-1.9.13-13.4.x86_64.rpm \ gdk-pixbuf-0.22.0-12.el3.x86_64.rpm \ libpng10-1.0.13-15.x86_64.rpm \ libungif-4.1.0-15.x86_64.rpm
rpm -Uvh openmotif21-2.1.30-9.RHEL3.6.i386.rpm \ XFree86-libs-4.3.0-81.EL.i386.rpm \ XFree86-Mesa-libGL-4.3.0-81.EL.i386.rpm \ expat-1.95.5-6.i386.rpm \ fontconfig-2.2.1-13.i386.rpm \ freetype-2.1.4-4.0.i386.rpm \ zlib-1.1.4-8.1.i386.rpm
XFree86-libs
RPM, you will get an error message similar to this one:
/tmp/OraInstall2005-06-15_07-36-25AM/jre/1.4.2/lib/i386/libawt.so: \ libXp.so.6: cannot open shared object file: No such file or directory
20.7. Oracle 10g R1 on Red Hat Enterprise Linux 2.1 (x86)
rpm -Uvh glibc-2.2.4-32.11.i686.rpm \ glibc-common-2.2.4-32.11.i386.rpm rpm -Uvh gcc-2.96-108.1.i386.rpm \ binutils-2.11.90.0.8-12.i386.rpm \ cpp-2.96-108.1.i386.rpm \ glibc-devel-2.2.4-32.11.i386.rpm \ kernel-headers-2.4.9-e.3.i386.rpm rpm -Uvh openmotif-2.1.30-11.i386.rpm rpm -Uvh redhat-release-as-2.1AS-4.noarch.rpm
glibc
in order to pass Oracle's "Product-specific Prerequisite" checks. Oracle's recommended glibc
version is 2.2.4.31.7 or higher.
uname -r
.
20.8. Verifying and Updating the redhat-release File
rpm -q redhat-release
/etc/redhat-release
file. It is not recommend to execute "runInstaller -ignoreSysPrereqs
" since this will disable other checks you may need.
/etc/redhat-release
file to make Oracle 10g believe it is running on a supported release.
/etc/redhat-release
file, you can simply copy and paste the following commands:
su - root # cp /etc/redhat-release /etc/redhat-release.orig # cat > /etc/redhat-release << EOF Red Hat Enterprise Linux AS release 3 (Taroon) EOF
/etc/redhat-release
:
su - root # cp /etc/redhat-release.orig /etc/redhat-release
Chapter 21. Sizing Disk Space for Oracle 10g
$ du -m -s /u01 1963 /u01 $ du -m -s /u01/app/oracle/oradata 720 /u01/app/oracle/oradata
Note
/
" has enough disk space. You can check the free space of the root file system with the following command:
df -h /
Chapter 22. Setting Shell Limits for Your Oracle User
ulimit
for Bash
, see man bash
and search for ulimit
.
nofile = 65536
ulimit -n
.
nproc = 16384
ulimit -u
.
nofile
option denotes the maximum number of open file descriptors, and nproc
denotes the maximum number of processes available to a single user.
ulimit -a
oracle
user account:
- For more information on
nofile
and how to increase the limit, see Section 11.1, “Limiting Maximum Number of Open File Descriptors for the Oracle User”. - For information on
nproc
and how to increase the limit, see Section 11.2, “Limiting Maximum Number of Processes Available for the Oracle User”.
Chapter 23. Creating Oracle User Accounts
su - root groupadd dba # group of users to be granted SYSDBA system privilege groupadd oinstall # group owner of Oracle files useradd -c "Oracle software owner" -g oinstall -G dba oracle passwd oracle
oinstall
" group account, see when to use "OINSTALL" group during install of oracle.
Chapter 24. Creating Oracle Directories
$ORACLE_BASE
:
su - root mkdir -p /u01/app/oracle chown oracle.oinstall /u01/app/oracle
/u01
directory but in another directory, file system or disk such as /u02
:
su - root mkdir -p /u02/oradata/orcl chown oracle.oinstall /u02/oradata/orcl
orcl
" stands for the name of the database which will also be the name of the instance. This is typically the case for single instance databases.
24.1. Optimal Flexible Architecture (OFA) for 10g R1 (10.1.0.2)
/u01/app/oracle/product/10.1.0/db_1
/u01/app/oracle/product/10.1.0/db_2
oracle
but by the user "oraowner
", then the path of the Oracle home directory would be:
/u01/app/oraowner/product/10.1.0/db_1 /u01/app/oraowner/product/10.1.0/db_2
app
":
/u01/app/oracle/product/10.1.0/db_1
/u01
, /u02
, and so on, complies with the OFA guidelines. But others can be used, for example:
/disk_1/app/oracle/product/10.1.0/db_1
/u02/oradata/<db_name_1> /u02/oradata/<db_name_2> /u03/oradata/<db_name_1> /u03/oradata/<db_name_2>
/u01
should be used for the Oracle software only. /u02
, /u03
, /u04
and so on, should be used for the database files. The db_name
represents the DB_NAME
initialization parameter which is typically the same as the SID
name for single instance databases.
Chapter 25. Setting Oracle Environments
Bash
which is the default shell on Red Hat Enterprise Linux, to verify your shell run: echo $SHELL
):
su - oracle export ORACLE_BASE=/u01/app/oracle export ORACLE_SID=orcl
Note
ORACLE_BASE
is used, then Oracle recommends that you do not set the ORACLE_HOME
environment variable but that you choose the default path suggested by the OUI. You can set and use ORACLE_HOME
after you finished running OUI.
ORACLE_HOME
and TNS_ADMIN
should not be set. If you set these environment variables, you can unset them by running the following commands:
unset ORACLE_HOME unset TNS_ADMIN
oracle
, you can add these environment variables to the ~oracle/.bash_profile
file which is the user start up file for the Bash
on Red Hat Enterprise Linux. To do this you could simply copy and paste the following commands to make these settings permanent for your oracle
accounts Bash
shell:
su - oracle cat >> ~oracle/.bash_profile << EOF export ORACLE_BASE=/u01/app/oracle export ORACLE_SID=orcl EOF
Chapter 26. Installing Oracle Database 10g
26.1. Installing Oracle 10g on a Remote Linux Server
X
to your local desktop. The easiest way to do this is to use the "X11 forwarding" feature of ssh
. This means that you do not have to run xhost
and set the DISPLAY
environment variable. Here is an example how to make use of the X11 forwarding feature of ssh
. Simply run the following command from your local desktop:
$ ssh -X oracle@oracle_remote_server_name
ForwardX11
setting is not set to "no
" in /etc/ssh/ssh_config
on the remote server:
su - root # grep ForwardX11 /etc/ssh/ssh_config | grep -v "^#" ForwardX11 yes #
26.2. Installing Oracle 10gR2 Cluster Ready Services (CRS) with MPIO
BUG 5005148 - CANNOT USE BLOCK DEVICES IN VOTING DISK AND OCR DURING 10G RAC INSTALLATION
service iptables stop chkconfig iptables off
OCR
and VOTING
disks.
/usr/share/doc/device-mapper-multipath-0.4.5/Multipath-usage.txt
for more information on configuring multipath.
# multipath -l > multipath.log ocr1 (36006016054141500beac25dcc436dc11) [size=1 GB][features="0"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:1:0 sdc 8:32 [active] \_ 2:0:1:0 sdn 8:208 [active] ocr2 (36006016054141500a898dae7c436dc11) [size=2 GB][features="0"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:1:1 sdd 8:48 [active] \_ 2:0:1:1 sdo 8:224 [active] vote1 (3600601605414150040a48bf2c436dc11) [size=3 GB][features="0"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:1:2 sde 8:64 [active] \_ 2:0:1:2 sdp 8:240 [active] vote2 (36006016054141500c0fc0fffc436dc11) [size=4 GB][features="0"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:1:4 sdg 8:96 [active] \_ 2:0:1:4 sdr 65:16 [active] vote3 (36006016054141500340b8309c536dc11) [size=5 GB][features="0"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:1:5 sdh 8:112 [active] \_ 2:0:1:5 sds 65:32 [active]
rm -f /dev/raw/*
multipath -F #shuts off Multipath
/proc/partitons
. In this installation example, each device has a unique size so it is easier to map. Now link the block devices to the raw devices on all nodes by modifying /etc/sysconfig/rawdevices
. Run ll
on the device to get the major minor number for a block device, as seen below.
# ll /dev/sdc1 brw-rw---- 1 root disk 8, 33 Oct 1 12:46 /dev/sdc1 #ocr1 # ll /dev/sdd1 brw-rw---- 1 root disk 8, 49 Oct 1 12:47 /dev/sdd1 #ocr2 # ll /dev/sde1 brw-rw---- 1 root disk 8, 65 Oct 1 12:47 /dev/sde1 #vote1 # ll /dev/sdg1 brw-rw---- 1 root disk 8, 97 Oct 1 12:48 /dev/sdg1 #vote2 # ll /dev/sdh1 brw-rw---- 1 root disk 8, 113 Oct 1 12:49 /dev/sdh1 #vote3
/etc/sysconfig/rawdevices
using vi or your favorite editor and add the following block devices.
$ vi /etc/sysconfig/rawdevices /dev/raw/raw1 8 33 /dev/raw/raw2 8 49 /dev/raw/raw3 8 65 /dev/raw/raw4 8 97 /dev/raw/raw5 8 113
blockdev
so the partition table are read again and created:
# blockdev --rereadpt /dev/sdc # blockdev --rereadpt /dev/sdd # blockdev --rereadpt /dev/sde # blockdev --rereadpt /dev/sdg # blockdev --rereadpt /dev/sdh
$ ll /dev/sdh1 brw-rw---- 1 root disk 8, 113 Oct 1 13:14 /dev/sdh1
/etc/sysconfig/rawdevices
to other nodes then restart it. You will see the created raw devices in /dev/raw
.
# /etc/rc5.d/S56rawdevices start Assigning devices: /dev/raw/raw1 --> 8 33 /dev/raw/raw1: bound to major 8, minor 33 /dev/raw/raw2 --> 8 49 /dev/raw/raw2: bound to major 8, minor 49 /dev/raw/raw3 --> 8 65 /dev/raw/raw3: bound to major 8, minor 65 /dev/raw/raw4 --> 8 97 /dev/raw/raw4: bound to major 8, minor 97 /dev/raw/raw5 --> 8 113 /dev/raw/raw5: bound to major 8, minor 113 done
# ll /dev/raw total 0 crwxrwxrwx 1 oracle dba 162, 1 Oct 1 13:13 raw1 crwxrwxrwx 1 oracle dba 162, 2 Oct 1 13:13 raw2 crwxrwxrwx 1 oracle dba 162, 3 Oct 1 13:13 raw3 crwxrwxrwx 1 oracle dba 162, 4 Oct 1 13:13 raw4 crwxrwxrwx 1 oracle dba 162, 5 Oct 1 13:13 raw5
Note
VIPCA
portion of the Oracle CRS is complete, you need to comment out the raw devices you created and copy /etc/sysconfig/rawdevices
to the other nodes:
#/dev/raw/raw1 8 33 #/dev/raw/raw2 8 49 #/dev/raw/raw3 8 65 #/dev/raw/raw4 8 97 #/dev/raw/raw5 8 113
# ps -ef |grep ons oracle 20058 1 0 13:49 ? 00:00:00 /ora/crs/opmn/bin/ons -d oracle 20059 20058 0 13:49 ? 00:00:00 /ora/crs/opmn/bin/ons -d root 20812 28286 0 13:50 pts/2 00:00:00 grep ons
Note
# /ora/crs/bin/crsctl stop crs Stopping resources. Successfully stopped CRS resources Stopping CSSD. Shutting down CSS daemon. Shutdown request successfully issued.
$ rm -f /dev/raw/*
$ multipath
/etc/rc5.d/
(before CRS Starts but after MPIO starts) to bind raw devices using MPIO.
num="1" for i in `ls /dev/mpath/ocr?p? | sort` do raw /dev/raw/raw${num} $i let "num = $num + 1" done num="3" for i in `ls /dev/mpath/vote?p? | sort` do raw /dev/raw/raw${num} $i let "num = $num + 1" done
/etc/rc5.d/
, that you just created.
# /etc/rc5.d/S57local start /dev/raw/raw1: bound to major 253, minor 25 /dev/raw/raw2: bound to major 253, minor 21 /dev/raw/raw3: bound to major 253, minor 22 /dev/raw/raw4: bound to major 253, minor 23 /dev/raw/raw5: bound to major 253, minor 24
# ll /dev/raw total 0 crwxrwxrwx 1 oracle dba 162, 1 Oct 1 13:58 raw1 crwxrwxrwx 1 oracle dba 162, 2 Oct 1 13:58 raw2 crwxrwxrwx 1 oracle dba 162, 3 Oct 1 13:58 raw3 crwxrwxrwx 1 oracle dba 162, 4 Oct 1 13:58 raw4 crwxrwxrwx 1 oracle dba 162, 5 Oct 1 13:58 raw5
# /ora/crs/bin/crsctl start crs Attempting to start CRS stack The CRS stack will be started shortly
# crs_stat -t Name Type Target State Host ------------------------------------------------------------------------ ora....t08.gsd application ONLINE ONLINE et-virt08 ora....t08.ons application ONLINE ONLINE et-virt08 ora....t08.vip application ONLINE ONLINE et-virt08 ora....t09.gsd application ONLINE ONLINE et-virt09 ora....t09.ons application ONLINE ONLINE et-virt09 ora....t09.vip application ONLINE ONLINE et-virt09 ora....t10.gsd application ONLINE ONLINE et-virt10 ora....t10.ons application ONLINE ONLINE et-virt10 ora....t10.vip application ONLINE ONLINE et-virt10 ora....t11.gsd application ONLINE ONLINE et-virt11 ora....t11.ons application ONLINE ONLINE et-virt11 ora....t11.vip application ONLINE ONLINE et-virt11 #
26.3. Starting Oracle Universal Installer
ship.db.lnx32.cpio
, or change to the directory that contains the image directory Disk1.
runInstaller
, make sure the Oracle environment variables are set, see Setting Oracle Environments. You can verify the settings by running the set command:
su - oracle oracle$ set
$ su - root # mount /mnt/cdrom
$ su - root # mount /media/cdrom
runInstaller
from the mounted CD, run the command corresponding to your version as the oracle
user.
oracle$ /mnt/cdrom/runInstaller
oracle$ /media/cdrom/runInstaller
26.4. Using Oracle Universal Installer (OUI)
- Basic Installation: Check for the default - Oracle Home Location: Use default: /u01/app/oracle/product/10.1.0/db_1 - Installation Type: Enterprise Edition - UNIX DBA Group: Use default: dba - Create Starter Databases: Check it which is the default - Global Database Name: orcl - Database password: Type in the password for SYS, SYSTEM, SYSMAN, and DBSNMP accounts - Advanced Installation: Not checked it this example Click Next
- Full path of the inventory directory: Use the default: /u01/app/oracle/oraInventory - Specify Operating System group name: Use default: oinstall
orainstRoot.sh
script:
su - root # /u01/app/oracle/oraInventory/orainstRoot.sh Creating the Oracle inventory pointer file (/etc/oraInst.loc) Changing groupname of /u01/app/oracle/oraInventory to oinstall. #
Verify that all checks have been passed.
Note
- Global Database Name: for example use "orcl". - SID: for example use "orcl".
Select "File System" in this example. - File System - Specify Database file location: /u01/app/oracle/oradata/ If you want to comply with OFA, you might want to select another mount point than '/u01', for example /u02/oradata.
root.sh
script, execute the script in another terminal as root:
su - root # /u01/app/oracle/product/10.1.0/db_1/root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.1.0/db_1 Enter the full path name of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Adding entry to /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created. Finished running generic part of root.sh script. Now product-specific root actions will be performed. /var/opt/oracle does not exist. Creating it now. /etc/oracle does not exist. Creating it now. Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Oracle Cluster Registry for cluster has been initialized Adding to inittab Checking the status of Oracle init process... Expecting the CRS daemons to be up within 600 seconds. CSS is active on these nodes. mars CSS is active on all nodes. Oracle CSS service is installed and running under init(1M) #
26.5. Updating after the Oracle Universal Installer
ORACLE_HOME
, PATH
, and LD_LIBRARY_PATH
are set for the oracle
account.
Note
ORACLE_HOME
might be different on your system! Also note that LD_LIBRARY_PATH
is needed for some Oracle binaries such as sysresv
.
~oracle/.bash_profile
file:
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib
~oracle/.bash_profile
file:
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib
~oracle/.bash_profile
:
$ . ~oracle/.bash_profile
~oracle/.profile
and source in the file for the current shell by executing ". ~oracle/.bash_profile
".
Note
/
" on the ORACLE_HOME
environment variable. Otherwise you will get the error "ORACLE not available
" when you try to connect to sys, see Chapter 29, Oracle 10g and Linux Installation Errors and Troubleshooting.
Chapter 27. Oracle Post Installation Tasks
Important
27.1. Startup and Shutdown of the Oracle 10g Database
oracle$ sqlplus /nolog SQL> connect / as sysdba SQL> startup
oracle$ sqlplus /nolog SQL> connect / as sysdba SQL> shutdown
SYS
. In the above example you will be connected to the schema owned by SYS
with the privilege SYSDBA
. SYSDBA
gives you the following privileges:
- sysoper privileges WITH ADMIN OPTION.
- create database.
- recover database until.
27.2. Shutdown of other Oracle 10g Background Processes
ps -ef
- iSQL*PlusTo stop iSQL*Plus, run:
su - oracle isqlplusctl stop
- Database Management ProcessesDuring the installation of Oracle 10g, OUI offered two Database Management Options:If you selected "Database Control for Database Management", then the Oracle Enterprise Manager Database Control (Database Control) can be shutdown with the following command which stops both the agent and the Oracle Containers for Java (OC4J) management service:
su - oracle emctl stop dbconsole
If you selected "Grid Control for Database Management" which is used for full "Grid Control" installations, then the Oracle Management Agent (standalone agent) for the Oracle Enterprise Manager Grid Control (Grid Control) can be stopped with the following command:su - oracle emctl stop agent
- Oracle Net ListenerTo stop the listener, run:
su - oracle lsnrctl stop
- Cluster Synchronization Services (CSS)To shutdown Oracle Cluster Synchronization Services (CSS) daemon, run:
su - root /etc/rc.d/init.d/init.cssd stop
Chapter 28. Tips and Hints for Oracle 10g on Red Hat Enterprise Linux
su - root export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 . $ORACLE_HOME/bin/localconfig delete
rm -rf /u01/app/oracle/* rm -f /etc/oraInst.loc /etc/oratab rm -rf /etc/oracle rm -f /etc/inittab.cssd rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
ORACLE_HOME
from ~oracle/.bash_profile
.
Chapter 29. Oracle 10g and Linux Installation Errors and Troubleshooting
Note
$ORACLE_BASE/oraInventory/logs
. The Database Creation log file can be found in $ORACLE_BASE/admin/$ORACLE_SID/create
.
You may receive the following error while running the Oracle Universal Installer:
Starting Oracle Universal Installer... Checking installer requirements... Checking operating system version: must be redhat-2.1, UnitedLinux-1.0 or redhat-3 Failed <<<< Exiting Oracle Universal Installer, log for this session can be found at ...
Note
Refer to Section 19.3, “Verifying Software Packages (RPMs)” for information on this problem and how to solve it.
Solution: Increase the shmmax
kernel parameter.
Increase the semopm
kernel parameter.
Increase the file-max
kernel parameter.
First check if ORACLE_SID
is set correctly. If the ORACLE_SID
is set correctly, then you probably have a trailing slash "/" on the ORACLE_HOME
environment variable. Remove it and try again to connect to sys
. For example, change ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1/
to ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1
.
During the Oracle 10g installation you probably provided a password for the Oracle database accounts that started with a number. Ignore this error message and change the password when you are done with the Oracle 10g installation.
sysresv -i
outputs sysresv: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directoryMake sure LD_LIBRARY_PATH is set to $ORACLE_HOME/lib by executing:
oracle$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
To rectify this problem, try to log in to the remote Oracle server again by using the "X11 forward" feature of ssh. Execute the following command, after changing oracle_remote_server_name to your server, from your local desktop:
$ ssh -X oracle@oracle_remote_server_name
ForwardX11
setting is not set to "no
" in /etc/ssh/ssh_config
on your remote server:
su - root # grep ForwardX11 /etc/ssh/ssh_config | grep -v "^#" ForwardX11 yes #
Note
DisallowTCP
entry in /etc/X11/gdm/gdm.conf
for the GNOME Display Manager to read: DisallowTCP=false
.
init
command:
su - root init 3 init 5
telnet
you will have to set the DISPLAY
variable manually.
rman
) hangs
You are probably running the wrong rman
binary which belongs to the XFree86-devel
RPM:
$ which rman /usr/X11R6/bin/rman
During the Oracle 10g installation you probably provided a password for the Oracle database accounts that started with a digit number. Ignore this error message and change the password when you are done with the Oracle 10g installation.
./runInstaller
CrashesThe Oracle installer ./run Installer crashes with the
Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2005-06-15_07-36-25AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred.. java.lang.UnsatisfiedLinkError: /tmp/OraInstall2005-06-15_07-36-25AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
/usr/X11R6/lib64/libXp.so.6
installed on your system, this error messages is complaining that it can not find the libXp.so.6
shared library for i386:
/tmp/OraInstall2005-06-15_07-36-25AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
# rpm -ivh XFree86-libs-4.3.0-81.EL.i386.rpm \ XFree86-Mesa-libGL-4.3.0-81.EL.i386.rpm \ expat-1.95.5-6.i386.rpm \ fontconfig-2.2.1-13.i386.rpm \ freetype-2.1.4-4.0.i386.rpm \ zlib-1.1.4-8.1.i386.rpm
xorg-x11-deprecated-libs
package (xorg-x11-deprecated-libs-6.8.2-1.EL.13.6.i386.rpm
). The installation depends on the following packages, to install these packages execute the follow commands:
# rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.6.i386.rpm \ xorg-x11-libs-6.8.2-1.EL.13.6.i386.rpm \ xorg-x11-Mesa-libGL-6.8.2-1.EL.13.6.i386.rpm \ expat-1.95.7-4.i386.rpm \ fontconfig-2.2.3-7.i386.rpm \ freetype-2.1.9-1.i386.rpm \ zlib-1.2.1.2-1.i386.rpm
xorg-x11-deprecated-libs
package (xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm
). In order to satisfy dependencies for this i386 package, you may have to install a few other i386 RPMs as well:
rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm \ xorg-x11-libs-6.8.2-1.EL.13.20.i386.rpm \ xorg-x11-Mesa-libGL-6.8.2-1.EL.13.20.i386.rpm \ expat-1.95.7-4.i386.rpm \ fontconfig-2.2.3-7.i386.rpm \ freetype-2.1.9-1.i386.rpm \ zlib-1.2.1.2-1.2.i386.rpm
rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm
.runInstaller
again.
You may get this error message or a similar one when installing 64 bit 10g on Red Hat Enterprise Linux4 x86-64.
make -f /u01/app/oracle/OraHome_1/sysman/lib/ins_sysman.mk relink_sharedobj SHAREDOBJ=libnmemso make[1]: Entering directory `/u01/app/oracle/OraHome_1/sysman/lib' gcc -o /u01/app/oracle/OraHome_1/sysman/lib/libnmemso.so -m32 ... ... /usr/bin/ld: crti.o: No such file: No such file or directory collect2: ld returned 1 exit status make[1]: *** [/u01/app/oracle/OraHome_1/sysman/lib/libnmemso.so] Error 1
# rpm -Uvh glibc-devel-2.3.4-2.9.i386.rpm
# rpm -Uvh glibc-devel-2.3.4-2.13.i386.rpm
Make sure the libaio
RPM is installed.
# rpm -Uvh libaio-0.3.96-5.i386.rpm
# rpm -Uvh libaio-0.3.103-3.x86_64.rpm
libaio
may be different.
The error text in full:
Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2005-11-13_01-07-04AM.log' for details.
INFO: gcc: INFO: /usr/lib64/libstdc++.so.5: No such file or directory INFO: INFO: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2 INFO: make: *** [liborasdkbase] Error 1
# rpm -Uvh compat-libstdc++-33-3.2.3-47.3.x86_64.rpm
Note
compat-libstdc++-33
RPM installed on your systems but you need the "x86-64" RPM to fix this problem. To verify which compat-libstdc++-33
RPM you have installed on your system, run:
# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' compat-libstdc++-33
The full error message:
Error in invoking target 'all_no_orcl ihsodbc' of makefile '/u01/app/oracle/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2005-07-24_09-25-22AM.log' for details.The log file shows the following error:
INFO: Creating /u01/app/oracle/oracle/product/10.2.0/db_1/lib/liborasdkbase.so.10.2 INFO: gcc: INFO: /usr/lib/libstdc++.so.5: No such file or directory INFO: INFO: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2
compat-libstdc++
RPM is missing.
# rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm
compat-libstdc++
RPM. Here are the two compat-libstdc++
RPMs that come with Red Hat Enterprise Linux 4 Update 2:
compat-libstdc++-296-2.96-132.7.2.i386.rpm compat-libstdc++-33-3.2.3-47.3.i386.rpm
The full error is listed below.
Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2005-11-13_01-25-49AM.log' for details.
INFO: /usr/bin/ld: /u01/app/oracle/oracle/product/10.2.0/db_1/lib/libirc.a(fast_memcpy.o): relocation R_X86_64_PC32 against `_memcpy_mem_ops_method' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status INFO: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2
binutils
RPM from https://rhn.redhat.com/ or from http://oss.oracle.com/projects/compat-oracle/files/RedHat/. After you have downloaded the RPM install it:
# rpm -Uvh --force binutils-2.15.92.0.2-13.0.0.0.2.x86_64.rpm
There can be many reasons for this error. This can happen during the ASM instance start up when the libaio
RPM is not installed on the system.
lsnrctl
as the oracle
user.
$ lsnrctl start ... Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))) TNS-12547: TNS:lost contact TNS-12560: TNS:protocol adapter error TNS-00517: Lost contact Linux Error: 104: Connection reset by peeras Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centauri)(PORT=1521))) TNS-12547: TNS:lost contact TNS-12560: TNS:protocol adapter error TNS-00517: Lost contact Linux Error: 104: Connection reset by peer
loopback
entry in /etc/hosts
is not missing when you start the listener:
127.0.0.1 localhost.localdomain localhost
lsnrctl
as the user oracle
again.
Part III. Installing the Oracle9i 32 bit Database on Red Hat Enterprise Linux
Introduction and Information on Supported Setups for Oracle 9i
Oracle Database Version | Red Hat Enterprise Linux Version | Architecture |
---|---|---|
Oracle9i R2 (9.2.0.6.0) | 4 | x86 (32 bit) |
Oracle9i R2 (9.2.0.4.0) | 3 | x86 (32 bit) |
Oracle9i R2 (9.2.0.1.0) | 2.1 | x86 (32 bit) |
Chapter 30. Preparing Red Hat Enterprise Linux for an Oracle Database Installation
30.1. Unpacking and Downloading the Oracle9i Installation Files
zcat lnx_920_disk1.cpio.gz | cpio -idmv zcat lnx_920_disk2.cpio.gz | cpio -idmv zcat lnx_920_disk3.cpio.gz | cpio -idmv
gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz Linux9i_Disk3.cpio.gz cpio -idmv < lnx_920_disk1.cpio cpio -idmv < lnx_920_disk2.cpio cpio -idmv < lnx_920_disk3.cpio
ls
looks like this it worked correctly:
$ ls Disk1 Disk2 Disk3
30.2. Setting Swap Space
grep MemTotal /proc/meminfo
cat /proc/swaps
30.4. Examining Temporary(/tmp) Space
$ df /tmp
/tmp
directory, you can temporarily create a tmp
directory in another file system. Here are the steps for doing it:
su - root mkdir /<AnotherFilesystem>/tmp chown root.root /<AnotherFilesystem>/tmp chmod 1777 /<AnotherFilesystem>/tmp export TEMP=/<AnotherFilesystem> export TMPDIR=/<AnotherFilesystem>
TEMP=/<AnotherFilesystem>
file is used by Oracle. The TMPDIR=/<AnotherFilesystem> file is used by Linux programs like the linker "ld
".
su - root rmdir /<AnotherFilesystem>/tmp unset TEMP unset TMPDIR
30.5. Sizing Oracle Disk Space
Chapter 31. Verifying Required Packages(RPMs)
Error in invoking target ntcontab.o of makefile /u01/app/oracle/product/9.2.0/network/lib/ins_net_client.mk
Note
31.1. Required Packages for Red Hat Advanced Server 2.1
rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils
rpm -ivh cpp-2.96-108.1.i386.rpm \ glibc-devel-2.2.4-26.i386.rpm \ kernel-headers-2.4.9-e.3.i386.rpm \ gcc-2.96-108.1.i386.rpm \ binutils-2.11.90.0.8-12.i386.rpm
31.2. Required Packages for Red Hat Enterprise Linux 3
rpm -q make \ binutils \ gcc \ cpp \ glibc-devel \ glibc-headers \ glibc-kernheaders \ compat-db \ compat-gcc \ compat-gcc-c++ \ compat-libstdc++ \ compat-libstdc++-devel \ gnome-libs \ openmotif21 \ setarch
31.3. Required Packages for Red Hat Enterprise Linux 4
rpm -q make \ compat-db \ compat-gcc-32 \ compat-gcc-32-c++ \ compat-oracle-rhel4 \ compat-libcwait \ compat-libgcc-296 \ compat-libstdc++-296 \ compat-libstdc++-33 \ gcc \ gcc-c++ \ gnome-libs \ gnome-libs-devel \ libaio-devel \ libaio \ make \ openmotif21 \ xorg-x11-deprecated-libs-devel \ xorg-x11-deprecated-libs
compat-gcc-32
requires binutils
, gcc
and several other packages. You may have to install the following RPMs to satisfy Oracle's dependencies:
rpm -Uvh compat-db-4.1.25-9.i386.rpm \ compat-gcc-32-3.2.3-47.3.i386.rpm \ glibc-devel-2.3.4-2.i386.rpm \ glibc-headers-2.3.4-2.i386.rpm \ glibc-kernheaders-2.4-9.1.87.i386.rpm \ cpp-3.4.3-9.EL4.i386.rpm \ compat-gcc-32-c++-3.2.3-47.3.i386.rpm \ compat-libstdc++-33-3.2.3-47.3.i386.rpm \ gcc-3.4.3-9.EL4.i386.rpm \ cpp-3.4.3-9.EL4.i386.rpm \ gcc-c++-3.4.3-9.EL4.i386.rpm \ libstdc++-devel-3.4.3-9.EL4.i386.rpm \ openmotif21-2.1.30-11.RHEL4.2.i386.rpm \ xorg-x11-deprecated-libs-6.8.1-23.EL.i386.rpm \ compat-libgcc-296-2.96-132.7.2.i386.rpm \ compat-libstdc++-296-2.96-132.7.2.i386.rpm \ libaio-0.3.102-1.i386.rpm \ libaio-devel-0.3.102-1.i386.rpm
xorg-x11-deprecated-libs-devel
and xorg-x11-devel
, are required for the Oracle patch 4198954, the following RPMs may need to be installed:
rpm -Uvh xorg-x11-deprecated-libs-devel-6.8.1-23.EL.i386.rpm \ xorg-x11-devel-6.8.1-23.EL.i386.rpm \ fontconfig-devel-2.2.3-7.i386.rpm \ pkgconfig-0.15.0-3.i386.rpm \ freetype-devel-2.1.9-1.i386.rpm \ zlib-devel-1.2.1.2-1.i386.rpm
gnome-libs
and gnome-libs-devel
, may require following RPMs to be installed:
rpm -Uvh gnome-libs-1.4.1.2.90-44.1.i386.rpm \ gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm \ ORBit-0.5.17-14.i386.rpm \ ORBit-devel-0.5.17-14.i386.rpm \ alsa-lib-1.0.6-4.i386.rpm \ audiofile-0.2.6-1.i386.rpm \ esound-0.2.35-2.i386.rpm \ esound-devel-0.2.35-2.i386.rpm \ gtk+-1.2.10-33.i386.rpm \ gtk+-devel-1.2.10-33.i386.rpm \ imlib-1.9.13-23.i386.rpm \ imlib-devel-1.9.13-23.i386.rpm \ libpng10-1.0.16-1.i386.rpm \ alsa-lib-devel-1.0.6-4.i386.rpm \ audiofile-devel-0.2.6-1.i386.rpm \ gdk-pixbuf-0.22.0-15.1.i386.rpm \ glib-devel-1.2.10-15.i386.rpm \ indent-2.2.9-6.i386.rpm \ libjpeg-devel-6b-33.i386.rpm \ libtiff-devel-3.6.1-7.i386.rpm \ libungif-4.1.3-1.i386.rpm \ libungif-devel-4.1.3-1.i386.rpm
Note
up2date gnome-libs gnome-libs-devel
up2date
command for any packages. It takes care of dependencies by installing all required packages automatically.
compat-oracle-rhel4
and compat-libcwait
packages you have to download the patch 4198954 from http://metalink.oracle.com. Make sure to select the Linux x86 platform. To unzip the downloaded p4198954_21_LINUX.zip
file, run:
$ unzip p4198954_21_LINUX.zip Archive: p4198954_21_LINUX.zip creating: 4198954/ inflating: 4198954/compat-oracle-rhel4-1.0-5.i386.rpm inflating: 4198954/compat-libcwait-2.0-2.i386.rpm inflating: 4198954/README.txt
Note
compat-oracle-rhel4
and compat-libcwait
packages require the xorg-x11-deprecated-libs
and xorg-x11-deprecated-libs-devel
packages, see above. To install the two RPMs from the 4198954 patch, run:
# rpm -Uvh 4198954/compat-oracle-rhel4-1.0-5.i386.rpm 4198954/compat-libcwait-2.0-2.i386.rpm
Chapter 32. Setting Up a Working Environment for Oracle
32.1. Creating Oracle User Accounts
su - root groupadd dba
groupadd oinstall useradd -c "Oracle software owner" -g oinstall -G dba oracle passwd oracle
oinstall
" group account, see When to use OINSTALL group during install of oracle.
32.2. Creating Oracle Directories
/u01
, is large enough, see Section 30.5, “Sizing Oracle Disk Space” for more information.
su - root #mkdir -p /u01/app/oracle/product/9.2.0 #chown -R oracle.oinstall /u01 #mkdir /var/opt/oracle #chown oracle.dba /var/opt/oracle #chmod 755 /var/opt/oracle
32.3. Setting Oracle Environment Variables
export LD_ASSUME_KERNEL=2.4.1 # for Red Hat Enterprise Linux 3 export LD_ASSUME_KERNEL=2.4.19 # for Red Hat Enterprise Linux 4
export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_SID=test export ORACLE_TERM=xterm
TNS_ADMIN= Set
if sqlnet.ora
, tnsnames.ora
and other variables are not present in $ORACLE_HOME/network/admin
.
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
export PATH=$PATH:$ORACLE_HOME/bin
~oracle/.bash_profile
file if you use bash. This will ensure that the environment variables are set permanently when you log in as "oracle
", or when you switch to the user "oracle
" by executing "su - oracle
".
Chapter 33. Starting runInstaller
Important
cd
) to /mnt/cdrom
to execute ./runInstaller
! If you do so, the installation will fail because you will not be able to change the CDs.
oracleserver
". First, make sure that you also allow runInstaller
on "oracleserver
" to display X information on your Linux desktop machine. In the example, the computer name where you are running an X Windows desktop like KDE or GNOME is called "yourdesktop
". Programs running on remote machines cannot display information to your screen unless you give them the authority to do so.
runInstaller
, execute xterm
(or another terminal client of your choice) to see if your X setup is really working. If you are about to install Oracle on your desktop PC and not on a remote node, then you can skip step 1 and 3.
oracleserver
" to display X information to your desktop PC "yourdesktop
":
yourdesktop:user$ xhost +oracleserver
oracleserver
" as the root
user. This window will be used to mount
and unmounting the Oracle CDs.
oracleserver:$ su - root oracleserver:root# mount /mnt/cdrom
oracleserver
" where you will run runInstaller
, execute the following commands:
oracleserver:$ su - oracle oracleserver:oracle$ export DISPLAY=yourdesktop:0.0
runInstaller
as "oracle
" as shown in the next chapters. It is important that you do not change directory (cd
) to /mnt/cdrom
.
oracleserver:oracle$ /mnt/cdrom/runInstaller
Chapter 34. Installing Oracle9i R2 (9.2.0.1.0) on Red Hat Advanced Server 2.1
Chapter 35. Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 3
35.1. Installing Oracle9i R2 (9.2.0.1.0) on Red Hat Enterprise Linux 3
Note
su - root
or sudo
if you have permissions.
# rpm -ivh \ compat-db-4.0.14-5.i386.rpm \ compat-gcc-7.3-2.96.122.i386.rpm \ compat-gcc-c++-7.3-2.96.122.i386.rpm \ compat-libstdc++-7.3-2.96.122.i386.rpm \ compat-libstdc++-devel-7.3-2.96.122.i386.rpm \ openmotif21-2.1.30-8.i386.rpm \ setarch-1.3-1.i386.rpm \ tcl-8.3.5-92.i386.rpm
gcc
so that the older gcc
will be used during the Oracle installation (see Oracle Note:252217.1 for more information):
su - root # mv /usr/bin/gcc /usr/bin/gcc323 # ln -s /usr/bin/gcc296 /usr/bin/gcc # mv /usr/bin/g++ /usr/bin/g++323 # ln -s /usr/bin/g++296 /usr/bin/g++
Note
runInstaller
from the Oracle9i R2 (9.2.0) CD, you will get the following error message:
Error occurred during initialization of VM 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
__libc_wait
symbol issue, download the p3006854_9204 patch p3006854_9204_LINUX.zip
from http://metalink.oracle.com. See bug 3006854 for more information. To apply the patch, run:
# unzip p3006854_9204_LINUX.zip Archive: p3006854_9204_LINUX.zip creating: 3006854/ inflating: 3006854/rhel3_pre_install.sh inflating: 3006854/README.txt # cd 3006854 # sh rhel3_pre_install.sh Applying patch... Patch successfully applied #
Important
rhel3_pre_install.sh
:
rhel3_pre_install.sh: line 36: gcc: command not found
gcc
correctly. This will mean you cannot start any binaries any more, for example:
# ls ls: error while loading shared libraries: /etc/libcwait.so: cannot open shared object
file: No such file or directory
# rm /etc/ld.so.preload rm: error while loading shared libraries: /etc/libcwait.so: cannot open shared object
echo
. echo is a built-in shell command and not a binary so it will still work.
# echo "" > /etc/ld.so.preload rm /etc/ld.so.preload
runInstaller
can be started from the CD:
su - oracle $ echo $LD_ASSUME_KERNEL # it is important that this variable is set! 2.4.1 $ /mnt/cdrom/runInstaller
/tmp/orainstRoot.sh
, run it before you click
Custom
since we only want to install the software for now
No
since we first have to patch Oracle before a database can be created.
runInstaller
.
makefile /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk
."
/u01/app/oracle/product/9.2.0/install/make.log
file reads:
/u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcln.o)(.text+0xa4e): In function `Nls_FormatCmd': : undefined reference to `__ctype_b' /u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcln.o)(.text+0x159d): In function `Nls_ScanCmd': : undefined reference to `__ctype_b' /u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcln.o)(.text+0x1603): more undefined references to `__ctype_b' follow collect2: ld returned 1 exit status make: *** [dbsnmp] Error 1
/u01/app/oracle/oraInventory/ContentsXML/comps.xml
does not exist yet. We will show you how to apply patch 3119415 later.
makefile /u01/app/oracle/product/9.2.0/ctx/lib/ins_ctx.mk
. "
/usr/bin/ld: ctxhx: hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [ctxhx] Error 1
35.2. Patching Oracle9i to 9.2.0.4.0 on Red Hat Enterprise Linux 3
p3095277_9204_LINUX.zip
file to /tmp
and run the following command:
su - oracle $ cp p3095277_9204_LINUX.zip /tmp $ cd /tmp $ unzip p3095277_9204_LINUX.zip Archive: p3095277_9204_LINUX.zip inflating: 9204_lnx32_release.cpio inflating: README.html inflating: patchnote.css $ $ cpio -idmv < 9204_lnx32_release.cpio Disk1/stage/locks Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/bin.1.1.jar Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/lib.1.1.jar ...
runInstaller
, execute:
su - oracle $ echo $LD_ASSUME_KERNEL # it is important that this variable is set! 2.4.1 $ cd /tmp/Disk1/ $ ./runInstaller
runInstaller
su - oracle $ echo $LD_ASSUME_KERNEL # it is important that this variable is set! 2.4.1 $ cd $ORACLE_HOME/bin $ ./runInstaller
runInstaller
makefile /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk
".
/u01/app/oracle/product/9.2.0/install/make.log
file reads:
/u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcl.o)(.text+0x1cc): In function `get_ora_stmt_handle': : undefined reference to `__ctype_b' /u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcl.o)(.text+0x124e): In function `OraProcess_Oid': : undefined reference to `__ctype_b' /u01/app/oracle/product/9.2.0/network/lib/libnmi.a(snmitcl.o)(.text+0x176c): more undefined references to `__ctype_b' follow collect2: ld returned 1 exit status make: *** [dbsnmp] Error 1
p3119415_9204_LINUX.zip
from http://metalink.oracle.com. See bug 3119415 for more information. Also, download the opatch Release 2.2.0 utility from http://metalink.oracle.com. See bug 2617419 at http://metalink.oracle.com for more information.
opatch
, run:
su - oracle $ cp p2617419_210_GENERIC.zip /tmp $ cd /tmp $ unzip p2617419_210_GENERIC.zip
PATH
environment variable below. Otherwise the patch can not be applied because the fuser
binary is used by opatch
. To apply the 3119415 patch, run:
su - oracle $ unzip p3119415_9204_LINUX.zip $ cd 3119415 $ export PATH=$PATH:/tmp/OPatch $ export PATH=$PATH:/sbin # the patch needs "fuser" which is located in /sbin $ which opatch /tmp/OPatch/opatch $ opatch apply
$ su - oracle $ dbca
35.3. Patching Oracle Intelligent Agent on Red Hat Enterprise Linux 3
agentctl start
" (Oracle 9.2.0.4), dbsnmp
will crash:
$ su - oracle $ agentctl start DBSNMP for Linux: Version 9.2.0.4.0 - Production on 07-JAN-2004 19:11:14 Copyright (c) 2003 Oracle Corporation. All rights reserved. Starting Oracle Intelligent Agent.../u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1855 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1868 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1880 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1892 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
p3238244_9204_LINUX.zip
from http://metalink.oracle.com, search for 3238244 to see the bug and patch information.
opatch
script appears in your $PATH
. To verify if opatch
is in your $PATH
, run the following commands:
$ su - oracle $ which opatch /tmp/OPatch/opatch $
fuser
" which should be located in /sbin
, if it is not you will need to install it. To apply now the patch, run:
$ su - oracle $ unzip p3238244_9204_LINUX.zip $ cd 3238244 $ export PATH=$PATH:/sbin $ opatch apply
dbsnmp
. This is the binary that crashed when running agentctl start
. To find which makefile
handles the linking of dbsnmp
, you can run:
$ su - oracle $ find $ORACLE_HOME -name "*.mk" | xargs grep -l dbsnmp /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk /u01/app/oracle/product/9.2.0/network/lib/env_oemagent.mk $
dbsnmp
and all associated executable files which are maintained by the ins_oemagent.mk makefile
, run:
$ su - oracle $ cd $ORACLE_HOME/network/lib $ make -f ins_oemagent.mk install
$ su - oracle $ agentctl start
Note
/usr/bin/gcc and /usr/bin/g++
if you do not need them any more. You may also want to undo the changes in /etc/ld.so.preload
file.
Chapter 36. Installing Oracle9i R2 (9.2.0.6.0) on Red Hat Enterprise Linux 4
36.1. Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 4
$ su - oracle $ echo $LD_ASSUME_KERNEL 2.4.19 $
runInstaller
:
$ su - oracle $ echo $LD_ASSUME_KERNEL 2.4.19 $ /media/cdrom/runInstaller
/tmp/orainstRoot.sh
enter the following into the command line
/tmp/orainstRoot.sh
OSDBA Group = dba, OSOPER Group = dba
36.2. Patching Oracle9i R2 to 9.2.0.6.0 on Red Hat Enterprise Linux 4
su - oracle $ cp p3948480_9206_LINUX.zip /tmp $ cd /tmp $ unzip p3948480_9206_LINUX.zip Archive: p3948480_9206_LINUX.zip creating: Disk1/ creating: Disk1/stage/ creating: Disk1/stage/Patches/ ...
runInstaller
that came with the patch 3948480 we just downloaded above.
su - oracle $ cp p4188455_10103_LINUX.zip /tmp $ cd /tmp $ unzip p4188455_10103_LINUX.zip Archive: p4188455_10103_LINUX.zip inflating: oraparam.ini inflating: README.txt $
/tmp/oraparam.ini
file will now be used for launching the runInstaller
that came with the patch 3948480.
runInstaller
application, run:
su - oracle $ echo $LD_ASSUME_KERNEL 2.4.19 $ /tmp/Disk1/install/runInstaller - paramFile /tmp/oraparam.ini
/tmp/Disk1/stage/products.xml
)
ps -ef | grep ora
su - oracle $ echo $LD_ASSUME_KERNEL # it is important that this variable is set! 2.4.19 $ /tmp/Disk1/install/runInstaller -paramFile /tmp/oraparam.ini
/tmp/Disk1/stage/products.xml
)
root.sh
, run it before you click
opatch
utility for release 10.1.0.2 (patch 2617419) from http://metalink.oracle.com.
opatch
, run:
su - oracle $ cp p2617419_10102_GENERIC.zip /tmp $ cd /tmp $ unzip p2617419_10102_GENERIC.zip $ cp -a /tmp/OPatch/ $ORACLE_HOME
su - oracle $ unzip p4190568_9206_LINUX.zip $ cd 4193454 $ export PATH=$PATH:$ORACLE_HOME/OPatch $ opatch apply
$ su - oracle $ dbca
dbca
dies on the system with the following error:
/u01/app/oracle/product/9.2.0/bin/dbca: line 124: 26649 Segmentation fault $JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
su - root touch /etc/rac_on
dbca
to work.
Chapter 37. Starting and Shutting down the Oracle9i Database
ORACLE_HOME
binaries.
37.1. sqlplus
Note
svrmgrl
is no longer supported, however, you can now do everything with sqlplus so nothing is lost.
oracle$ sqlplus /nolog SQL> connect / as sysdba SQL> startup
SYSDBA
. SYSDBA gives you the following privileges:
sysoper
privileges WITH ADMIN OPTION- create databases
- recover one or more databases to a point
37.2. Using the Oracle binaries dbstart
and dbstop
Note
dbstart
and dbstop
commands are in the $ORACLE_HOME/bin/dbstart
and $ORACLE_HOME/bin/dbshut
directories respectively.
$ORACLE_HOME/bin/dbstart
to start up the database, and $ORACLE_HOME/bin/dbshut
to shut down the database. To get $ORACLE_HOME/bin/dbstart
and $ORACLE_HOME/bin/dbshut
working, you need to change the third field for your Oracle SID
in /etc/oratab
from "N
" to "Y
".
test:/u01/app/oracle/product/9.2.0:N
test:/u01/app/oracle/product/9.2.0:Y
test
”) from /u01/app/oracle/admin/test/pfile
to $ORACLE_HOME/dbs
to get dbstart
and dbshut
working. In the Below command remember to change test
to something appropriate.
cp /u01/app/oracle/admin/test/pfile/inittest.ora.642002224936 \ $ORACLE_HOME/dbs/inittest.ora
$ORACLE_HOME/dbs
.
Chapter 38. Oracle Installation Errors
Always check first the error logs for 9.2.0 in /tmp/OraInstall*
, where "*" will be the date of the install, for example /tmp/OraInstall2002-07-04_09-50-19PM
. When you problems with make
, see also the $ORACLE_HOME/install/make.log
file.
make
ProblemsFirst ensure that gcc is installed on your system by executing:
$ which gcc /usr/bin/gcc
/usr/bin/gcc
:
$ rpm -qf /usr/bin/gcc gcc-2.96-98
You may see the following errors in $ORACLE_HOME/install/make.log
:
/lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE' /lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE' /lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE' /lib/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE' /lib/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'
/usr/bin/make -f ins_ctx.mk install ORACLE_HOME=/u01/app/oracle/product/9.2.0
$ORACLE_HOME/ctx/lib/env_ctx.mk
, add "$(LDLIBFLAG)dl
" to the "INSO_LINK =
" line. The updated line should with the added "$(LDLIBFLAG)dl
" flag, should look like this:
INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)
$ORACLE_HOME/ctx/lib/env_ctx.mk
again, go to "INSO_LINK =
", remove the above entry you made and add "`cat $(LIBHOME)/sysliblist`
" to the line and save it. This is what the updated line, with the added "`cat $(LIBHOME)/sysliblist`
" string, look like:
INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m `cat $(LIBHOME)/sysliblist` $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)
This error, "ORA-27123: unable to attach to shared memory segment", message may came up when the Oracle Database Configuration Assistant was running. Execute the following command to temporarily increase the maximum shared memory size:
su - root # cat /proc/sys/kernel/shmmax 33554432 # echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax # cat /proc/sys/kernel/shmmax 1073741824 #
/etc/sysctl.conf
file:
kernel.shmmax=1073741824
You may see this error, ORA-03113: end-of-file on communication channel, when you run the "Database Configuration Assistant" and "sqlplus
". It can be caused by shmmax
parameter being too small. Make sure to increase shmmax
permanently. Read Chapter 7, Setting Shared Memory for information on how to increase the shmmax
parameter.
If you see the error, Error in invoking target install of make file /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk, on Red Hat Enterprise Linux 3, follow the guide lines at Chapter 35, Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 3.
agentctl start
"
The error below may have occurred when "agentctl start
" is executed.
$ agentctl start DBSNMP for Linux: Version 9.2.0.4.0 - Production on 07-JAN-2004 19:11:14 Copyright (c) 2003 Oracle Corporation. All rights reserved. Starting Oracle Intelligent Agent.../u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1855 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1868 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1880 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1 /u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1892
dbca
If you receive the error:
$ dbca SIGSEGV 11* segmentation violation stackbase=0x453da000, stackpointer=0x453d9d5c Full thread dump: "AWT-EventQueue-0" (TID:0x411d1e20, sys_thread_t:0x453d9e0c, state:R) prio=5 *current thread* java.lang.Object.wait(Object.java) java.awt.EventQueue.getNextEvent(EventQueue.java:126) ...
/u01/app/oracle/product/9.2.0/bin/dbca: line 124: 26649 Segmentation fault $JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
$ su - root touch /etc/rac_on
dbca
.
$ORACLE_HOME/bin/dbca
and to put the following lines under comment except the line not preceded by a hash:
# if [ -f /etc/rac_on ]; then # Run DBCA $JRE_DIR/bin/jre -native -DORACLE_HOME=$OH ... # else # Run DBCA # $JRE_DIR/bin/jre -DORACLE_HOME=$OH ... # fi
gcc
errors in Red Hat Enterprise Linux 3When installing or running Oracle on Red Hat Enterprise Linux 3 you may encounter this gcc error.
gcc -o /u01/app/oracle/product/9.2.0/rdbms/lib/oracle \ -L/u01/app/oracle/product/9.2.0/rdbms/lib/ ... ... /usr/bin/ld: /u01/app/oracle/product/9.2.0/rdbms/lib/oracle: hidden symbol `__fixunssfdi' in /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libgcc.a(_fixunssfdi.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [/u01/app/oracle/product/9.2.0/rdbms/lib/oracle] Error 1 /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/9.2.0
# mv /usr/bin/gcc /usr/bin/gcc323 # mv /usr/bin/g++ /usr/bin/g++323 # ln -s /usr/bin/gcc296 /usr/bin/gcc # ln -s /usr/bin/g++296 /usr/bin/g++
# mv /usr/bin/gcc323 /usr/bin/gcc # mv /usr/bin/g++323 /usr/bin/g++
You are probably trying to run a 64 bit Oracle version on a 32 bit Linux system. Make sure you downloaded the right Oracle version for your Linux system.
$ cd /mnt/cdrom $ file install/linux/runInstaller install/linux/runInstaller: ELF 32 bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped
$ file /sbin/init /sbin/init: ELF 32 bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
The Oracle installer runInstaller hangs at:
Installing Java Runtime Environment... Link pending... Copying README...
LD_ASSUME_KERNEL
to 2.4.1
.
runInstaller
:
oracle$ export LD_ASSUME_KERNEL=2.4.1
You are probably running the wrong rman
binary from the XFree86-devel RPM:
$ which rman /usr/X11R6/bin/rman
You may see this error when you start the database with dbstart.
/u01/app/oracle/admin/test/pfile
to $ORACLE_HOME/dbs
to get dbstart
and dbshut
working:
cp /u01/app/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora
This may happen if the CD was not burned correctly. The solution is to check the image checksums and then burn the cd again or download the image again.
If you get the error ORA-01034: ORACLE not available, ORA-27101: shared memory realm does not exist, Linux Error: 2: No such file or directory or ORA-01034: ORACLE not available then check if ORACLE_SID is set correctly.
ORACLE_SID
is set correctly, then you probably have a trailing slash "/" on the ORACLE_HOME
environment variable. Remove it by changing ORACLE_HOME=/u01/app/oracle/product/9.2.0/
to ORACLE_HOME=/u01/app/oracle/product/9.2.0
and try again to connect to sys
. Remember the ORACLE_HOME
parameter may be slightly different on your machine.
You are probably running runInstaller
on a 586 machine, or your AMD CPU is falsely recognized as 586 (the case for a AMD K6-III-400). You can check your machine (hardware) type by executing "uname -m". If you are not running on a 586 or on a AMD machine, try to link jre
to java and see if this solves your problem.
ln -s /tmp/OraInstall/jre/bin/i686 /tmp/OraInstall/jre/bin/i586 ln -s /tmp/OraInstall/jre/lib/i686 /tmp/OraInstall/jre/lib/i586 chmod u-w /tmp/OraInstall/jre/bin/i686/tmp/OraInstall/jre/lib/i686
runInstaller
.
You probably forgot to install the compat-libstdc++
RPM, the package for "Standard C++ libraries for Red Hat Linux 6.2 backwards compatibility". To rectify this problem, install the compat-libstdc++
RPM. Read Chapter 31, Verifying Required Packages(RPMs) for more information.
You may experience this problem when running the Database Configuration Assistant dbca on Red Hat Enterprise Linux 3 but forgot to set the LD_ASSUME_KERNEL environment variable.
oracle
user on Red Hat Enterprise Linux 3 and restart dbca
:
oracle$ export LD_ASSUME_KERNEL=2.4.1
lsnrctl status
or lsnrctl start
Errors
When lsnrctl status
or lsnrctl start
are executed you may get the following output:
$ lsnrctl status (or lsnrctl start) LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 14-OCT-2004 14:33:10 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 2: No such file or directory Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused
/var/tmp/.oracle
directory does not exist. If that is the case, run the following commands:
su - root # mkdir /var/tmp/.oracle # chown oracle:dba /var/tmp/.oracle
lsnrctl start
as oracle
again.
First ensure you followed the instructions in Chapter 33, Starting runInstaller very closely.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'alpha:0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58) at java.awt.Window.(Window.java:188) at java.awt.Frame.(Frame.java:315) at java.awt.Frame.(Frame.java:262) at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:593)
Note
DisallowTCP
entry in /etc/X11/gdm/gdm.conf
for the GNOME Display Manager to read:
DisallowTCP=false
# init 3
# init 5
For other errors, issues and problems your best bet is to search the Oracle on Linux Discussion Forum.
Chapter 39. Reference List
Appendix A. Revision History
Revision History | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Revision 1.5-11 | Mon Jun 30 2014 | |||||||||
| ||||||||||
Revision 1.5-9 | Wed Apr 16 2014 | |||||||||
| ||||||||||
Revision 1.5-5 | Thursday July 18 2013 | |||||||||
| ||||||||||
Revision 1.4-1 | September 1 2008 | |||||||||
| ||||||||||
Revision 1.1-1 | November 1 2007 | |||||||||
| ||||||||||
Revision 1.01-1 | July 2 2007 | |||||||||
| ||||||||||
Revision 1.00-1 | July 2 2007 | |||||||||
|
Legal Notice
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701