Sergio's Blog

Subscribe to Sergio's Blog feed
Updated: 13 hours 20 min ago

Oracle's Linux Contributions

Fri, 2009-01-09 06:40

This recently posted page summarizes some of the contributions Oracle's Linux developers make to Linux and the community in general, including:

  • OCFS2
  • Libstdc++
  • NFS on IPv6
  • RDS
  • T10-DIF Data Integrity
  • Etc.

I speak with prospects, customers, and partners on a regular basis and when I tell them that we have people at Oracle who's sole job it is to work on open source software, they are often very surprised. I'm glad this was posted.

Categories: DBA Blogs

Free Oracle Enterprise Linux Downloads Now Also in DVD Format

Mon, 2008-11-17 03:32

In a previous post, I mentioned that DVDs of Oracle Enterprise Linux are only availably for purchase via the Unbreakable Linux Store. I was incorrect. As of Oracle Enterprise Linux 4, Update 7, we now offer DVDs as a free download.


Categories: DBA Blogs

Quick and Dirty Inline Charts and RATIO_TO_REPORT

Fri, 2008-10-24 02:54

Another post from the archives...

HTML Expressions is a feature in the Application Express reporting engine that lets you apply an HTML mask to a column value in a report. In the HTML Expression, you refer to the column value using #COLUMN_NAME#. Recently, I saw this used to create neat inline bar charts like the one below:


To create this example, I used the following query based on the Issue Tracker data model:

select pname, 
       ratio_to_report (cnt_issues) over () * 100 issues_chart,
       round (ratio_to_report (cnt_issues) over () * 100, 1) issues_ratio
  from (
select p.person_name pname, count(*) cnt_issues 
  from ht_issues i, ht_people p
 where i.assigned_to = p.person_id
 group by p.person_name

I then edited the column attritbues for the ISSUES_CHART column and placed the following HTML in the the HTML Expression field:

<div style="width:100px;height:14px;background:#dddddd;
border-top:1px solid #aaaaaa;border-left:1px solid #aaaaaa;
border-bottom:1px solid #ffffff;border-right:1px solid #ffffff;">
<img src="/i/1px_trans.gif" width="#ISSUES_CHART#" height="14" border="0" style="background:#3f863f;"></div>

In this HTML with CSS style declarations, the width:100px in the beginning controls the maximum length in pixels of each bar in the chart and background:#dddddd makes the background grey. The width="#ISSUES_CHART#" controls the actual length of the green part of the bar by using the value of issues_chart from the result set.

Categories: DBA Blogs

Installing oracle-validated from an Oracle Enterprise Linux DVD using yum

Wed, 2008-10-22 08:10

In an earlier post, I mentioned that the Enterprise Linux 5 Update 2 installation media have the oracle-validated RPM on it. The same is true for the Enterprise Linux 4 Update 7 media.

If you don't have access to ULN, and you want to install oracle-validated including its dependencies, here's a quick way to set up yum to use an Oracle Enterprise Linux DVD that doesn't require copying all RPMs from the DVD. I performed the following steps using Oracle Enterprise Linux 5, Update 2 x86-64, as root:

  1. # mkdir /media/disk
  2. Insert EL5.2 DVD (or attach to your Oracle VM guest)
  3. # mount /dev/cdrom /media/disk
  4. Edit /etc/yum.conf, adding the following section:
    [EL5.2 DVD]
    name = Enterprise Linux 5.2 DVD
  5. # yum install oracle-validated

Note that offers only free CD downloads of Oracle Enterprise Linux. The Unbreakable Linux Store. has DVDs for a nominal (shipping only) fee. DVDs are available as a free download starting with Oracle Enterprise Linux 4, Update 7. All other releases and updates can be for a nominal (shipping only) fee.


Tue, 2008-09-30 10:10
Categories: DBA Blogs

Search Through Region Source in Application Express

Tue, 2008-09-30 09:46

As I was working to migrate an application and its theme over to Application Express 3.1.2 from 2.1.2 I needed to move some images around and update the references accordingly. I remembered that the Application Builder has a feature to search through region source, which came in handy.

Here's where you can find it:

I could have used this type of feature to search through templates as well. If anyone from the APEX team is reading this...

Categories: DBA Blogs

oracle-validated RPM also available on Oracle Enterprise Linux 5 Update 2 media

Thu, 2008-09-11 00:23

In the comments on my previous post on the Oracle validated RPM, Frank points out that this RPM is also available on the Oracle Enterprise Linux 5 installation media, starting with Update 2. You can download" Oracle Enterprise Linux from edelivery.

I learned something new today!

Categories: DBA Blogs

Where to Download Oracle VM Templates

Mon, 2008-09-08 03:28

Wim recently blogged about Oracle VM Templates, announced a few weeks ago. If you're interested in them, you can download them from


Categories: DBA Blogs


Fri, 2008-08-29 05:51

Here's another post from the old blog, harvested from

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 (TNS V1-V3)
        26 python module                                    some big query

Categories: DBA Blogs

oracle-validated RPMs now available outside of ULN

Thu, 2008-08-28 09:10

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

Categories: DBA Blogs