Tag Archives: Oracle

Oracle Installation – Add swap space in UNIX or Linux environment

The typical Oracle installation will require more swap space on a system, due to prerequisite checks performed by the installer, than is typical available. The following procedure shows how to create additional swap in Unix or Linux.

1. Create a file on /u01 of 12gb with the dd command. NOTE: Repeat on each RAC node.

dd if=/dev/zero of=/u01/tempswap bs=1k count=12000000

Example:

[root@mylinux1 ~]# dd if=/dev/zero of=/u01/tempswap bs=1k count=12000000
12000000+0 records in
12000000+0 records out
12384000000 bytes (12 GB) copied, 64.2111 seconds, 255 MB/s
[root@mylinux1 ~]#

2. Then format your new file with the mke2fs command. NOTE: Repeat on each RAC node.

/sbin/mke2fs /u01/tempswap

Example:

[root@mylinux1 ~]# /sbin/mke2fs /u01/tempswap
mke2fs 1.39 (29-May-2006)
/u01/tempswap is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2003424 inodes, 4000000 blocks
200000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4097835008
123 block groups
32768 blocks per group, 32768 fragments per group
12288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 123840, 229376, 294912, 819200, 884736, 1205632, 2654208

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@mylinux1 ~]#

3. Make the additional swap space with the mkswap command. NOTE: Repeat on each RAC node.

/sbin/mkswap /u01/tempswap

Example:

[root@mylinux1 ~]# /sbin/mkswap /u01/tempswap
Setting up swapspace version 1, size = 12383995 kB
[root@mylinux1 ~]#

4. Make the swap space available to the OS with the command swapon. NOTE: This will have to be executed after every reboot. Repeat on each RAC node.

/sbin/swapon /u01/tempswap

Example:

[root@mylinux1 ~]# /sbin/swapon /u01/tempswap
[root@mylinux1 ~]#

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Oracle Installation files extraction with PAX

For a Unix or Linux installation, Oracle places its installation files in cpio (archiving format) to contain multiple directory structures in a single file. This article describes the use of the pax utility to extract Oracle installation files.

1. Download your oracle installation files from www.oracle.com

2. Logon to your Oracle database server and place the installation files in the appropriate location.

3. Extract the cpio.gz installation files with the pax utility and options -rvzf

pax -rvzf (name_of_cpio_file.cpio.gz)

4. If the cpio archive file is not compressed, use the pax utility and options –rvf.

pax -rvf (name_of_cpio_file.cpio)

5. This completes unpacking of Oracle installation files with the utility pax.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Oracle Installation files extraction with cpio

For a Unix or Linux installation, Oracle places its installation files in cpio (archiving format) to contain multiple directory structures in a single file. This article describes the use of the cpio utility to extract Oracle installation files.

1. Download your oracle installation files from www.oracle.com

2. Logon to your Oracle database server and place the installation files in the appropriate location.

3. Extract the cpio.gz installation software with the following command.

gunzip (name_of_cpio_file .cpio.gz)

4. Unpack the archive file using the cpio utility with options –idmv

cpio -idmv < (name_of_cpio_file.cpio)

NOTE: replace the string (name_of_cpio_file .cpio) with your actual cpio file name, but do not remove the first < - greater than sign, that is the input of your file name into the utility. 5. This completes unpacking of Oracle installation files with the utility cpio. Larry J. Catt, OCP 9i, 10g oracle@allcompute.com www.allcompute.com

Unable to mount OCFS2 drives

Oracle provides the file system OCFS2 to support Oracle RAC file storage. This file system provides for a locking mechanism which allows files to be accessed by multiple Oracle instances while avoiding corruption. The OSFS2 file system binaries must be started before any OCFS2 formatted mount points can be accessed. This article shows the error generated when the OCFS2 stack has not been started and how to resolve the problem.

General OS error:

[root@mylinux init.d]# mount /dev/mapper/MPATH10 /u02
mount.ocfs2: Unable to access cluster service while trying initialize cluster

Resolution:

1. Logon to your server as root.
2. Change directory to /etc/init.d

[root@mylinux /]# cd /etc/init.d
[root@mylinux init.d]# pwd
/etc/init.d
[root@mylinux init.d]#

3. Execute the OS layer command ./ocfs2 load.

[root@mylinux init.d]# ./o2cb load
Loading filesystem “configfs”: OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading filesystem “ocfs2_dlmfs”: OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
[root@mylinux init.d]#

4. Execute the OS layer command ./ocfs2 online

[root@mylinux init.d]# ./o2cb online
Starting O2CB cluster ocfs2: OK
[root@mylinux init.d]#

5. Attempt to mount your ocfs2 storage device.

[root@mylinux init.d]# mount /dev/mapper/MPATH10 /u02
[root@mylinux init.d]#

6. This completes restarting OCFS2 binaries.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Disabling SELinux before Oracle installation

SELinux (Security-Enhanced Linux) provides for additional OS layer security with a default installation. However, this added security can cause issues for installation of multiple software packages of which Oracle is one. This article shows how to disable SELinux before Oracle installation.

1. Logon to your server as root.
2. Open the file /etc/selinux/config with vi.

[root@mylinux /]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
~

3. Disable SELinux by changing the option SELINUX to disabled.

SELINUX=disabled

4. Reboot your Linux server for the changes to take affect.

5. This completes disabling of SELinux before Oracle installation.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Determining SELinux mode before Oracle installation

SELinux (Security-Enhanced Linux) provides for additional OS layer security with a default installation. However, this added security can cause issues for installation of multiple software packages of which Oracle is one. This article shows how to determine the mode of SELinux before installing Oracle.

1. Logon to your server as root.
2. Execute the command getenforce or sesstatus to determine the current OS mode of SELinux.

[root@mylinux /]# /usr/sbin/getenforce
Permissive
[root@mylinux /]# /usr/sbin/sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 21
Policy from config file: targeted
[root@mylinux /]#

3. This completes determination of SELinux mode before Oracle installation.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Oracle error OUI-10058

The OUI (Oracle Universal Installer) relies on an Oracle inventory to recognize the Oracle software which already exists on the system. Multiple files are read during the OUI startup, the first of which is /etc/oraInst.loc. The oraInst.loc file points to the location of the Oracle inventor directory, which could be anywhere. In order to get an inventory of the current system, OUI must have access to this file. The error OUI-10058 is an indication that OUI does not have access to this file. This article covers the typical error and resolution to this problem

Typical error:

OUI-10058 The OUI Inventory on this system does not exist or is not writable.
1. The /opt/oracle/oraInventory/orainstall…..
or
2. You are not a member of the specified installer group.


Solution: If you executed all previous root.sh script as instructed, the most like cause is permission.

1. Logon to the system as root.
2. Change directory to /etc
3. Check the file permissions with the command ll

[root@mylinux /]# ll *ora*

4. If the file permission is not set to 644, change the permissions with the command chmod

[root@mylinux /]# chmod 644 /etc/oraInst.loc.

5. This completes the resolution of OUI-10058, due to file permissions of /etc/oraInst.loc.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Oracle Error ORA-25153

Oracle Error ORA-25153 is a regular occurrence during the modification of location or recreation of an Oracle database. It indicates that the administrator neglected to add datafiles to a temporary tablespace. This article provides a solution the error ORA-25153, if it occurs.

Typical Error message:

Errors in file /u01/app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_j001_25535.trc:
ORA-25153: Temporary Tablespace is Empty
Sun Sep 19 01:31:00 2010
Thread 1 advanced to log sequence 9 (LGWR switch)
Current log# 3 seq# 9 mem# 0: /u05/oradata/orcl/group_3.dbf

Solution:

1. Logon to your Oracle database server as the Oracle software owner.

2. Logon to SQLPLUS with SYSDBA privileges.

mylinux:> sqlplus ‘/ as sysdba’

SQL*Plus: Release 10.2.0.4.0 – Production on Sun Sep 19 08:08:39 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

3. Add a temp file to your default temporary tablespaces with the following syntax: alter tablespace add tempfile < 'directory and file name'> size ;

example:


SQL> alter tablespace temp add tempfile ‘/u05/oradata/orcl/temp01.dbf’ size 2048m;

Tablespace altered.

SQL>

4. This completes the resolving of Oracle error ORA-25153.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Disabling Oracle RDBMS RAC features

The determination of Oracle binary support for Real Application Clustering is made during installation on all supported platforms. Thus an installation made for a RAC database install will result in errors for single database instances. However, you can modify the binaries to support single instance database features after installation. This article details the steps to modify your Oracle binaries to support Oracle single instance database.

1. Logon to your Oracle database server as the Oracle software owner.

2. Change directory to your ORACLE_HOME/rdbms/lib.

cd $ORACLE_HOME/rdbms/lib

3. Use make to recreate your Oracle binaries with the option rac_off

make -f ins_rdbms.mk rac_off

4. Change directory to your ORACLE_HOME/bin.

5. Execute the utility relink with option all, to recreate all binary files.

relink all

6. This completes altering your Oracle RDBMS binaries to support Oracle RAC features.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Enabling Oracle RDBMS RAC features

The determination of Oracle binary support for Real Application Clustering is made during installation on all supported platforms. Thus, an installation made for a single instance database will not support creation of RAC by default. However, you can modify the binaries to support these features after installation. This article details the steps to modify your Oracle binaries to support Oracle RAC.

1. Logon to your Oracle database server as the Oracle software owner.

2. Change directory to your ORACLE_HOME/rdbms/lib.

cd $ORACLE_HOME/rdbms/lib

3. Use make to recreate your Oracle binaries with the option rac_on

make -f ins_rdbms.mk rac_on

4. Change directory to your ORACLE_HOME/bin.

5. Execute the utility relink with option all, to recreate all binary files.

relink all

6. This completes altering your Oracle RDBMS binaries to support Oracle RAC features.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com