Showing posts with label Oracle Linux. Show all posts
Showing posts with label Oracle Linux. Show all posts

Friday, January 20, 2012

Oracle 10g R2 runInstaller issues on RedHat 5

For my new project I was trying to install Oracle 10g R2 on my RedHat 5 Linux host. I already had an Oracle 11g R2 installed on that Linux host, so I was hoping that the installation should be rather straight forward but wasn't so.

I downloaded the 10g R2 binaries from the Oracle web page, and after gunzipping and cpioing proceeding to execute the runInstaller.

Here is the first issue that I hit:

-bash-3.2$ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Failed <<<<

Exiting Oracle Universal Installer, log for this session can be found at /u01/app/oraInventory/logs/installActions2012-01-19_04-28-30PM.log

Looks like at the time Oracle 10g R2 was released, RedHat was still at version 4, so when the installer looks at the certified OS'es it fails.

/home/oracle/database/10g/database/install/oraparam.ini file is where the Certified Versions of Linux are listed. As you see redhat-5 is missing.

[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2

The fix is pretty straight forward. We just have add redhat-5 to that list.

A good way to go about with that is to copy the oraparam.ini file to /tmp and then add redhat-5 to the list as shown below.

[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2,redhat-5

This resolves the first issue and we move a bit further along, but not for long. I now see a new error message.

-bash-3.2$ ./runInstaller -paramFile /tmp/oraparam.ini
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLin
ux-1.0, asianux-1, asianux-2 or redhat-5
                                      Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-01-19_05-10-37PM. Please wait ...-bash-3.2$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2012-01-19_05-10-37PM/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/OraInstall2012-01-19_05-10-37PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or d


I looked for the libXp rpm, and noticed that I already had them.


-bash-3.2$ rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libXp
libXpm-devel-3.5.5-3 (x86_64)
libXpm-3.5.5-3 (i386)
libXpm-3.5.5-3 (x86_64)

The fix for this is to install libXp-1.0.0-8.1.el5.i386.rpm

I downloaded the rpm from http://rpm.pbone.net/index.php3/stat/4/idpl/8077225/com/libXp-1.0.0-8.1.el5.i386.rpm.html


[root@isvx7 rpm]# ls
libXp-1.0.0-8.1.el5.i386.rpm
[root@isvx7 rpm]# rpm -i libXp-1.0.0-8.1.el5.i386.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
[root@isvx7 rpm]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libXp
libXpm-devel-3.5.5-3 (x86_64)
libXp-1.0.0-8.1.el5 (i386)
libXpm-3.5.5-3 (i386)
libXpm-3.5.5-3 (x86_64)
[root@isvx7 rpm]#

Things were good after that, and the installer GUI came up fine.

If you have access to Metalink, or whatever they call it these days, checkout the below documents.
[ID 456634.1]
[ID 443617.1]

Friday, January 13, 2012

Enabling Asynchronous I/O and direct I/O in Oracle 11g R2 running on Red Hat Linux

I found a really good paper by Red Hat titled "Oracle 10g Server on Red Hat Enterprise Linux 5 Deployment Recommendations"

I have an Oracle 11g R2 (11.2.0.1.0) database running on Red Hat Linux version 2.6.18-274.7.1.el5, and wanted to try out if the recommendation still worked. So all the stuff you see below is right out of the above Red Hat document.The conclusion is, the recommendations by Red Hat still stand good for 11g R2.

To enable async I/O in Oracle, the disk_asynch_io parameter needs to be set to true in the init.ora file:
disk_asynch_io=true

The parameter disk_asynch_io is set to true by default in Oracle 11g:

SQL> show parameter disk_asynch_io;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
disk_asynch_io                       boolean     TRUE
SQL>

In my case the data files are on a file system(ext3) which supports asynchronous I/O.

To do async I/O on file systems, the filesystemio_options parameter needs to be set to "asynch" in addition to
disk_asynch_io=true:

filesystemio_options=asynch

This parameter is platform-specific. By default, this parameter is set to none for Linux and thus needs to be changed:

SQL> show parameter filesystemio_options;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options                 string      none
SQL>

The filesystemio_options variable can have the following values:
asynch: Enables asynchronous I/O on file system files
directio: Enables direct I/O on file system files
setall: Enables both asynchronous and direct I/O on file system files
none: Disables both asynchronous and direct I/O on file system files

If you also wish to enable Direct I/O Support, set filesystemio_options to "setall".

As per the documentation "For Red Hat Enterprise Linux 5, it is strongly recommended to use “setall” for ext2, ext3, GFS, NFS and OCFS2 file systems."

Below is what I did to enable asynchronous I/O and direct I/O for my Oracle 11g R2 database.


SQL> alter system set filesystemio_options=setall scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup;
ORACLE instance started.

Total System Global Area 2.6991E+10 bytes
Fixed Size                  2213976 bytes
Variable Size            1.7448E+10 bytes
Database Buffers         9395240960 bytes
Redo Buffers              145174528 bytes
Database mounted.
Database opened.
SQL> show parameter filesystemio_options;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options                 string      SETALL
SQL>

Tuesday, January 10, 2012

Oracle files deleted by SQL> drop database;

I knew when we dropped an Oracle database that it deleted the control files, data files, and the redo log files for that particular instance of the database. I was curious to what other files it deleted when we dropped an instance of the database

So on my Linux box I created a database called "testdel". The database "testdel" created it's files control files, data files, and the redo log files under /oracle/testdel

I used "strace" to see what files were unlinked during the "drop database" command by redirecting the strace output to the output_testdel.txt file as shown below.



-bash-3.2$ export ORACLE_SID=testdel
-bash-3.2$ strace -f -e unlink sqlplus / as sysdba 2> output_testdel.txt

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 10 01:31:59 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


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

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup restrict mount;
ORACLE instance started.

Total System Global Area 2.6991E+10 bytes
Fixed Size                  2213976 bytes
Variable Size            1.7448E+10 bytes
Database Buffers         9395240960 bytes
Redo Buffers              145174528 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>

Here are a list of file that get unlinked or deleted:

Automatic Memory Management(AMM) memory segments are memory mapped files in /dev/shm.

/u01/app/oracle/product/11.2.0/dbhome_1/dbs/lkinsttestdel

The files nder the /oracle/testdel directory

[pid 23376] unlink("/oracle/testdel/system01.dbf") = 0
[pid 23376] unlink("/oracle/testdel/sysaux01.dbf") = 0
[pid 23376] unlink("/oracle/testdel/undotbs01.dbf") = 0
[pid 23376] unlink("/oracle/testdel/users01.dbf") = 0
[pid 23376] unlink("/oracle/testdel/redo01.log") = 0
[pid 23376] unlink("/oracle/testdel/redo02.log") = 0
[pid 23376] unlink("/oracle/testdel/redo03.log") = 0
[pid 23376] unlink("/oracle/testdel/temp01.dbf") = 0

Here are some other files they that get deleted
/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiletestdel.ora

/u01/app/oracle/diag/rdbms/testdel/testdel/alert/log.xml

Also, all metadata, lck, and trace files under the following directory
/u01/app/oracle/diag/rdbms/testdel/testdel/metadata

/u01/app/oracle/diag/rdbms/testdel/testdel/lck

/u01/app/oracle/diag/rdbms/testdel/testdel/trace/

And finally the control files under /oracle/testdel
[pid 23376] unlink("/oracle/testdel/control01.ctl") = 0
[pid 23376] unlink("/oracle/testdel/control02.ctl") = 0