This Blog is discontinued, its only read-only

Sunday, May 25, 2008

Identify your JDBC Connection in v$session

A major problem for DBA's is the fact that in the v$session view it's really hard to identify which session comes from which J2EE Application.
A select over the v$session view just shows the connected users and from which machine the connect is established, but we can't see from which J2EE Application the sessions are coming :-(

With Oracle AS 10.1.3.x we have the possibility to add a property in the data-source.xml, that is displayed in the column "PROGRAM" of the v$session view.

Following changes have to be done at the data-source.xml configuration file:
  1. Check if the factory class oracle.jdbc.driver.OracleDriver is used
  2. Add the line inside the connection-factory
  3. After the changes, restart your OC4J Instance



<data-sources xsi="http://www.w3.org/2001/XMLSchema-instance" nonamespaceschemalocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd" version="10">

<managed-data-source name="conn_pool_hr_app">

<managed-data-source name="conn_pool_hr_app_reporting">

<connection-pool name="conn_pool_hr_app" limit="3"
connections="3">

<connection-factory class="oracle.jdbc.driver.OracleDriver" user="scott" password="tiger" url="jdbc:oracle:thin:@//localhost:1521/PROD"> <property name="v$session.program" value="conn_pool_hr_app">
</property>
</connection-factory>
</connection-pool>

<connection-pool name="conn_pool_hr_app_reporting" limit="3" connections="3">
<connection-factory class="oracle.jdbc.driver.OracleDriver" user="scott" password="tiger" url="jdbc:oracle:thin:@//localhost:1521/PROD">
<property name="v$session.program" value="conn_pool_hr_app_reporting"></property>
</connection-factory>
</connection-pool>
</data-sources>


If we now select over our v$session view, we can see which session comes from which J2EE Application :-)

Saturday, May 24, 2008

SUN's JRE 1.6 Certification for Oracle Forms

Since a short time SUN's JRE 1.6.0_04 is now certified for usage of Oracle Forms 10g Release 2.
The only pre-requirement is that the Patchset 3 (10.1.2.3.0) for the Oracle Application Server (Oracle AS) must be applied.

The installation of the Patchset 3 for the Oracle AS normally don't cause any problems. My first tests with the JRE 1.6.0 shows, that the initial startup time (loading of the Applet) is faster :-) Additional informations about my tests will be posted later.

Original Statement from Oracle Technology Network:
"We have finished the certification of Sun's JRE 1.6.0_04 for use with patch set 3 of the Application Server that was released two weeks ago. No issue were encountered and no additional patches are needed to run the Forms client with 1.6 of the JRE. The certification was done with Firefox 2.0 and MS Internet Explorer 7."

Good old Days

Original posted 18th Apr 2008:

Normally, you will find here something about Oracle Application Server, but today I discover the "Good old Days" again with Oracle 4.1 on MS-DOS Smile

The startup was really simple, just type the command ORACLE

and after this startup your instance with the IOR utility

Look at the SGA Size: 16K Stick out tongue nothing with MB or GB.

Instead of SQLPlus, we got the UFI (User Friendly Interface):

Even on Oracle 4.1 user scott was existing.

And an excellent help was available

I love this old stuff . . .

Friday, May 23, 2008

OpenWorld 2007 Presentation about Oracle AS 11g

Original posted 21st Nov 2007:

Today I found a cool presentation about the future of Oracle AS 11g from John Lang (Group Manager, Fusion Middleware Product Management).

There will be a complete break of technology, structure, concept and administration of the Oracle AS. Some highlights are:

  • Separation of binaries and configuration files
  • Several command line interface (CLI) will be merged into one CLI called asctl
  • J2EE 1.5 Standard
  • One Software installation ($ORACLE_HOME) can contain multiple Oracle AS Instances, this means if you need another Oracle AS Instance on a server where is already an Oracle AS installed, you just have to execute a command through the new CLI asctl Big Smile
  • Unified Management through JMX MBean
    • New web based Administration GUI - FMWControl = Fusion Middleware Control
    • CLI asctl (Scripting language Jython based)
    • JMX Client
  • DMS metrics are fine graded published in the new FMWControl

But unfortunately a release date for the Oracle AS is not published in the presentation Sad, so please be patient.

The full presentation can be found under http://www28.cplan.com/cc176/catalog.jsp and search for Session ID S292004.

WebUtil and Oracle AS 10.1.2 PatchSet 2 Problem

Original posted 13th Oct 2007:

During the last weeks I faced with two customers some problems concerning WebUtil and Oracle AS 10.1.2.2.0, e.g. a Reports Call over WebUtil was not working or the WebUtil function file_open_dialog was not working a.s.o. Under Oracle AS 10.1.2.0.2 everything was working fine.

The problem came out of the PatchSet 2 (Patch-No. 4960210) which didn't apply the frmwebutil.jar to the Oracle AS you wanted to patch. To solve this problem just follow these steps:

  1. unzip the PatchSet 2 to any directory which you prefer
  2. go to the directory /Disk1/stage/Patches/oracle.developer.forms.builder/10.1.2.2.0/1/DataFiles/ in your unzipped PatchSet 2
  3. Place the jar utility of the Oracle AS into your $PATH with following command: export PATH=$ORACLE_HOME/jdk/bin:$PATH
  4. Extract the needed frmwebutil.jar from the Java archive webutil.2.2.jar with following command: jar xf webutil.2.2.jar frmwebutil.jar0
    Attention: the filename to extract is frmwebutil.jar0 (=Zero)
  5. Make a backup copy of the actual frmwebutil.jar in your $ORACLE_HOME with following comand: mv $ORACLE_HOME/forms/java/frmwebutil.jar $ORACLE_HOME/forms/java/frmwebutil.jar.save
  6. Copy the extracted frmwebutil.jar0 to your $ORACLE_HOME with following command: cp frmwebutil.jar0 $ORACLE_HOME/forms/java/frmwebutil.jar
After these steps just restart your Oracle AS or at least restart the OC4J Instance OC4J_BI_Forms and test your Forms Application with your WebUtil functions.

Network Traffic in Oracle Forms

Original posted 4th Oct 2007:

Regularly I get the questions from my customers "What is the network traffic in my Forms applications?". A simple way to display the number of transmitted bytes and number of round trips is to add the parameter networkStats=true in your Named Configuration inside your formsweb.cfg configuration file. Additionally you have to modify the corresponding base*.htm or webutil*.htm as follows:

<PARAM NAME="networkStats" VALUE="%networkStats%">

Inside the Tag <EMBED...> add following:

networkStats="%networkStats%"
After the modifications startup your Forms application and in the status bar of your application you'll find on the button right side a counter n:m. Where n = number of transmitted bytes and m = number of round trips.

Installing WebCache Standalone 10.2.0.2 on Redhat 64bit

Original posted 14th Sept 2007:

Sometime ago I run in some problems during the installation of Oracle WebCache Standalone 10.2.0.2 on an Redhat 4 x86_64 system. All prerequirements were made, the Oracle Universal Installer didn't complain anything, but during the link process following error message came up:

  • error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory

After some investigations my ex-colleague from Trivadis (Engelbert Wystrach) and me came to following solution:

  • create as root user following two files in the directory /usr/bin
  • gcc296
    #!/bin/sh
    exec /usr/bin/gcc32 -m32 -static-libgcc -B /usr/lib/gcc-lib/i386-redhat-linux/2.96/ $*
  • g++296
    #!/bin/sh
    exec /usr/bin/g++32 -m32 -static-libgcc -B /usr/lib/gcc-lib/i386-redhat-linux/2.96/ $*
  • execute as root following commands:
    cd /usr/bin
    mv gcc gcc.save
    mv g++ g++.save
    ln -s /usr/bin/gcc296 /usr/bin/gcc
    ln -s /usr/bin/g++296 /usr/bin/g++
After you made this changes, start the Oracle Universal Installer once again and install the Oracle WebCache Standalone. This error occurs only on Redhat 64bit systems :-(

Reports 10.1.2. and SuSE Enterprise Linux 10

Original posted 11th Sept 2007:

Officially the Oracle AS 10.1.2 is not yet certified with SLES 10 and therefor Reports 10.1.2. is not certified. Nevertheless the Oracle AS 10.1.2 is installable on SLES 10, but if you try to run a Report you are receiving an error.

The corresponding logfile $ORACLE_HOME/opmn/logs/OC4J~OC4J_BI_Forms~default_island~1 shows following error stack:

  • java.lang.UnsatisfiedLinkError:
    /u00/app/oracle/product/as-fr-10.1.2/lib/librwu.so:
    /usr/X11R6/lib/libXm.so.2: undefined symbol: _Xsetlocale

To resolve this problem perform following steps:

  1. su - root
  2. cd /usr/X11R6/lib
  3. mv -f libXm.so.2 libXm.so.2.backup
  4. ln -s libXm.so.3 libXm.so.2

After that stop and restart the OC4J Instance OC4J_BI_Forms as oracle user:

  1. opmnctl stopproc process-type=OC4J_BI_Forms
  2. opmnctl startproc process-type=OC4J_BI_Forms
Now you can run Oracle Reports under SLES 10, but please note, that at the moment Oracle AS 10.1.2 is not yet certified with SLES 10!

Did you forget the password of the ias_admin user?

Original posted 10th Sept 2007:

Your colleague installed an Oracle AS Environment, went on holiday and didn't tell you the password of the ias_admin user to access the administrative WebInterface Application Server Control (ASC) or you installed your Oracle AS long time ago and forgot the password of the ias_admin user? If you have an Oracle AS environment which is NOT connected to an Oracle AS Identity Management (IDM), here is a small trick to reset the password of the ias_admin user.

Just go to the directory $ORACLE_HOME/sysman/j2ee/conf. In this directory you'll find the configuration file jazn-data.xml. Inside this configuration file you'll find the definition of the ias_admin user including his encrypted password:

  • snippet from jazn-data.xml
    <users>
    ...
    <user>
    <name>ias_admin</name>
    <credentials>{903}YdvTMA...</credentials>
    </user></users>
Inside the tag <credentials> you see the encrypted password of the ias_admin. To reset the password, just change the value inside the tag <credentials> as follows:

  • snippet from jazn-data.xml

    <users>
    ...
    <user>
    <name>ias_admin</name>
    <credentials>!mynewpassword1</credentials>
    </user></users>

The new password you have to provide in clear text has to start with a "!". Be aware that the new password must match the password rules: minimum 6 signs and one sign must be a number. After your changes, stop the ASC and restart it with following commands:
  • emctl stop iasconsole
  • emctl start iasconsole

Now you can login with your new password and inside the jazn-data.xml the provided password in clear text is automatically changed into an encrypted password.

Please note, this trick is only working with Oracle AS Instances, which are NOT connected to an Oracle Identity Management!

Oracle Internet Directory Light for tnsnames Resolution

Original posted 9th Sept 2007:

Since a few days the Oracle Authentication Service for Linux (http://www.oracle.com/technology/products/oid/oracleauthenticationservices.html) is available. Mainly this technology preview is addressed to handle User Authentication of Linux Desktops.
I had a closer look on this product and what I saw is, that the Oracle Authentication Service for Linux is an Oracle Internet Directory (OID) just as an RPM-File (Size 70 MB :-) ). The installation is really simple, download the OID Light and the Oracle XE Database for Linux, and run as root user "rpm -Uhv oracle-oid-10.1.4.2.0-1.0.i386.rpm oracle-xe-univ-10.2.0.1-1.0.i386.rpm".
After this you have to configure the Oracle XE Database and the Oracle Internet Directory, execution as root user of the script "/etc/init.d/oracle-oid configure" and answer the following questions:
  1. Password of sys user of your XE Database
  2. Password of the OID administrator (cn=orcladmin)
  3. Ports (Non-SSL and SSL) for the OID
  4. Naming Context of your OID (e.g. dc=trivadis,dc=com)
  5. If you want to use SSL Authentification for your OID

And now the interesting part. Many people are planning to migrate their local tnsnames.ora to be stored in an Oracle Internet Directory. Up to now all them had to use the Oracle Application Server 10.1.4.0.1 Identity Management (nearly 1.3 GB :-( ) and an Oracle Database Enterprise Edition. For small companies this is really an overhead! Now you can use this lightweight environment of the Oracle XE Database and the OID Light for Linux.
Following steps need to be performed to load your tnsnames.ora into the OID Light and to configure your clients against it.
  1. In your Oracle Client configure the sqlnet.ora
    NAMES.DIRECTORY_PATH = (LDAP)
    NAMES.DEFAULT_DOMAIN = trivadis.com # adjust to your domain
  2. In your Oracle Client configure the ldap.ora
    DIRECTORY_SERVERS = (oassrv01.trivadis.com:389:636) # adjust to your servername and LDAP ports
    DEFAULT_ADMIN_CONTEXT = "dc=trivadis,dc=com" # adjust to your Naming Context
    DIRECTORY_SERVER_TYPE = OID
After this configuration steps start your netmgr and connect to your OID:


Over the menu option "Command / Directory / Export Net Service Names..." you can import your actual tnsnames.ora into OID Light.


For testing whether your Oracle Client is really using your OID or not, just make a small test with tnsping. You should see then "Used LDAP adapter to resolve the alias".
The Oracle Internet Directory Light is really a cool alternative to the huge Oracle Application Server 10g Identity Management, but as usual there are some small limitations in the OID Light (e.g. no MultiMaster Replication, no OPMN, no Cluster Options). But for a small environment or just for testing it is really cool stuff :-)

Note: I saw that many people are access this blog post, unfortunally this post was done in May 2008 and the "OID Light" solution has been removed from the Oracle Technology Network website :-(
The new solution is the standard Oracle Internet Directory 11g, more details can be found here: http://www.oracle.com/technetwork/middleware/id-mgmt/overview/oracleauthenticationservices-100184.html
Maybe its a good idea, if anybody who is interested in getting back this cool OID Light solution, that you do a Forum Post in the Oracle Technology Network Forum http://forums.oracle.com/forums/forum.jspa?forumID=398&start=0

Additional Note 1st April 2011, Not an Aprils fools joke :-) : As you can see in comments down, I receive a notice by Olaf Stullich (Oracle Product Manager for OID)

The OID 10g (10.1.4.3) RPM can be found on channel (el4_i386_oracle) in the Oracle ULN. When you register your machine on ULN you can install the OID RPM via "up2date oracle-oid".

Thursday, May 22, 2008

Welcome to my new Blog

As I move my Blog from http://blogs.trivadis.com/blogs/dirknachbar to here, I'll fillup my old entries in the next days.

So please be patient :-)