« May 2008 | Main | September 2008 »

August 2008 Archives

August 27, 2008

Revisiting the oracle-validated RPM

I'm still not over the fact that all my blog post from the previous incarnation of this blog are gone. It makes me upset just writing about it. Luckily, I was able to use the Wayback Machine to recover some of the content. Today I'd like to revisit an old blog post about the oracle-validated RPM.

Last week I was in Japan meeting with customers and partners when the topic of installing Oracle Database on Oracle Enterprise Linux came up. I was asked how we can make it easier to resolve the prerequisites for installing Oracle Database on Linux. This customer was not aware of the oracle-validated RPM, so I figured it's worth covering this useful tool again.

When you install the oracle-validated RPM using up2date and ULN, it will automatically install all packages required by the Oracle database installer.

[root@localhost ~]# up2date --install oracle-validated

Fetching Obsoletes list for channel: el4_i386_addons...

Fetching Obsoletes list for channel: el4_i386_oracle...

Fetching Obsoletes list for channel: el4_i386_latest...

Fetching rpm headers...
########################################

Name                                    Version        Rel
----------------------------------------------------------
oracle-validated                        1.0.0          3.el4             i386


Testing package set / solving RPM inter-dependencies...
########################################
oracle-validated-1.0.0-3.el ########################## Done.
elfutils-libelf-devel-0.97. ########################## Done.
gcc-3.4.6-3.1.0.1.i386.rpm: ########################## Done.
gcc-c++-3.4.6-3.1.0.1.i386. ########################## Done.                   
glibc-devel-2.3.4-2.25.i386 ########################## Done.
glibc-headers-2.3.4-2.25.i3 ########################## Done.                   
glibc-kernheaders-2.4-9.1.9 ########################## Done.
libstdc++-devel-3.4.6-3.1.0 ########################## Done.
sysstat-5.0.5-11.rhel4.i386 ########################## Done.
Preparing              ########################################### [100%]

Installing...
   1:libstdc++-devel        ########################################### [100%]
   2:glibc-kernheaders      ########################################### [100%]
   3:glibc-headers          ########################################### [100%]
   4:glibc-devel            ########################################### [100%]
   5:gcc                    ########################################### [100%]
   6:gcc-c++                ########################################### [100%]
   7:sysstat                ########################################### [100%]
   8:elfutils-libelf-devel  ########################################### [100%]
   9:oracle-validated       ########################################### [100%]
insmod /lib/modules/2.6.9-42.EL/kernel/drivers/net/e1000/e1000.ko
insmod /lib/modules/2.6.9-42.EL/kernel/drivers/char/hangcheck-timer.ko hangcheck_reboot=1
The following packages were added to your selection to satisfy dependencies:

Name                                    Version        Release
--------------------------------------------------------------
elfutils-libelf-devel                   0.97.1         3
gcc                                     3.4.6          3.1.0.1
gcc-c++                                 3.4.6          3.1.0.1
glibc-devel                             2.3.4          2.25
glibc-headers                           2.3.4          2.25
glibc-kernheaders                       2.4            9.1.98.EL
libstdc++-devel                         3.4.6          3.1.0.1
sysstat                                 5.0.5          11.rhel4

[root@localhost ~]# 

Named after, and derived from Validated Configurations, oracle-validated also creates an oracle OS user and an oinstall and dba group. Kernel parameters are also set properly, ensuring that the Oracle Universal Installer will proceed without complaints. Very nice!

Note that you must first subscribe to the Oracle software channel on ULN before you can install oracle-validated.

August 28, 2008

oracle-validated RPMs now available outside of ULN

For those of you who'd like to use the oracle-validated RPM, but don't have access to ULN, here they are:

August 29, 2008

cx_Oracle and DBMS_APPLICATION_INFO

Here's another post from the old blog, harvested from archive.org

The other day I was playing with some Python and cx_Oracle, a Python module for connecting to Oracle databases. While cx_Oracle seems to work great, I found the documentation light on examples. Because I follow Tom Kyte's advice closely, I was trying to instrument my code with some calls to DBMS_APPLICATION_INFO. As it turns out, the cx_Oracle connection object has write only attributes to set module, action, and clientinfo.

Here's a quick example of that in action (warning: newbie Python ahead)

-bash-3.00$ python
Python 2.3.4 (#1, Feb  2 2005, 11:44:49) 
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> con=cx_Oracle.connect ("hr/hr")
>>> cur=con.cursor()
>>> con.module="python module"
>>> con.action="some big query"

>>> cur.execute ("select 1 from dual")
[<cx_Oracle.NUMBER with value None>]
>>> con.action=""
>>> con.module=""
>>> con.close()

Before closing the connection with con.close(), this is what was observed in the database:

SQL> select sid, module, action from v$session where module is not null 
  2  /
       SID MODULE                                           ACTION
---------- ------------------------------------------------ --------------------------------
        22 sqlplus@captain.us.oracle.com (TNS V1-V3)
        26 python module                                    some big query

About August 2008

This page contains all entries posted to Sergio's Blog in August 2008. They are listed from oldest to newest.

May 2008 is the previous archive.

September 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle