Tag Archives: catt

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

Manually initializing Oracle OCFS2 stack

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 /]# 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. Execute the OS layer command /etc/init.d/o2cb enable

[root@mylinux /]# /etc/init.d/o2cb enable
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 /]#

3. Execute the OS layer command /etc/init.d/o2cb start

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

4. Attempt to mount your ocfs2 storage device.

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

5. This completes restarting OCFS2 binaries.

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

Oracle UTL_RECOMP package and the RECOMP_SERIAL subprogram

During the normal administration and operation of an Oracle database system, programming units within the database can become invalid for various reasons. To resolve this issue, the Oracle RDBMS provides the package UTL_RECOMP to recompile objects which are currently in an invalid status. The UTL_RECOMP package provides the administrator with 3 subprogram units: PARALLEL_SLAVE, RECOMP_PARALLEL, and RECOMP_SERIAL. This article covers the user of package and subprogram unit UTL_RECOMP.RECOMP_SERIAL and was written against an Oracle 10.2.0.4 RDBMS on RHEL.

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

2. Connect to SQLPLUS as the sysdba user.

mylinux:> sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 3 10:24:46 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. The RECOMP_SERIAL subprogram unit recompiles all objects or objects within a schema in an ordered fashion. This means that any objects which are depended on by other objects are compiled first.

4. To compile all objects within the current database execute the command: execute utl_recomp.recomp_serial();

SQL> execute utl_recomp.recomp_serial();

PL/SQL procedure successfully completed.

SQL>

5. To compile only the objects in a single schema, specify the schema name: execute utl_recomp.recomp_serial(‘SCOTT’);

SQL> execute utl_recomp.recomp_serial('SCOTT');

PL/SQL procedure successfully completed.

SQL>

This completes the recompilation of objects using the package UTL_RECOMP with subprogram unit RECOMP_SERIAL.

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

UNIX CRON – Shell script errors with [10]: sqlplus: not found

In normal administration of an Oracle RDBMS on UNIX or LINUX operating systems, the DBA will be required to develop shell and SQL scripts to maintain his/her RDBMS. In fact, to be considered a mid to senior DBA you will need to be well versed in scripting at the OS layer. In this article we will review a common error which occurs in a shell script called by CRON due to a lack of properly set variables.

1. In a normal scenario, the DBA has developed a shell script which calls and executes a SQL script to perform a certain maintenance task. In testing, the DBA executes the script as the oracle software owner and the script performs perfectly. However, when placed in the OS CRON for execution, the following error occurs.

[10]: sqlplus: not found

2. The error occurs because the environmental variables are not being read. Thus, the OS does not know where to find the executable: sqlplus.

3. The solution is to update your shell script and hard code the directory structure for the command sqlplus. An example would be if sqlplus is located in the following path /u01/opt/app/oracle/bin then perform the following:

Replace:

sqlplus

With:

/u01/opt/app/oracle/bin/sqlplus

This completes resolving the error message [10]: sqlplus: not found in a shell script called through CRON.

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