JRockit Virtualization Edition

Ab heute gibt es Oracle WebLogic Server on JRockit Virtualization Edition als Download. Vor ein paar Wochen gab es bereits ein Meldung bei heise.de zu neuen Java-Virtualisierungswerkzeugen von Oracle - Oracle präsentiert Java-Virtualisierungswerkzeuge. Die technische Basis für dieses Produkt wurde Ende 2006 von der Firma BEA als Liquid VM angekündigt (theserverside.com - JRockit's Liquid VM could be the first real Java OS). Hinter der JRockit Virtualization Edition steckt der Ansatz eine Java VM direkt auf virtualisierter Hardware, ohne Betriebssystem-Schicht, laufen zu lassen. Einen ähnlichen Ansatz stellt das Projekt JNode.org (Java New Operating System Design Effort) dar.

Oracle liefert die JRockit Virtualization Edition zusammen mit Weblogic als 370 MB grosses Zip-File. Darin sind folgende Dateien enthalten:

# unzip -t wlsvePackage.zip 
Archive:  wlsvePackage.zip
    testing: wlsve/                   OK
    testing: wlsve/system.img         OK
    testing: wlsve/vm.cfg             OK
    testing: wlsveimagetool.jar       OK
    testing: README.txt               OK
    testing: wlsve_medrec_domain_with_odb.pdf   OK
    testing: THIRDPARTYLICENSEREADME.txt   OK

Hauptbestandteil ist das Disk-Image system.img

$ qemu-img info wlsve/system.img 
image: wlsve/system.img
file format: raw
virtual size: 1.0G (1073741824 bytes)
disk size: 1.0G

Als Dateisystem wird in diesem Disk-Image ext2 verwendet, die Disk lässt sich daher unter Linux ohne Schwierigkeiten direkt mounten.

# mount -o loop wlsve/system.img /mnt
# cd /mnt
# ls -l
total 20
drwx------ 8 root root 4096 2010-04-14 02:48 application
drwx------ 3 root root 4096 2010-04-14 02:49 boot
drwx------ 8 root root 4096 2010-04-14 02:49 jrockitve
drwx------ 2 root root 4096 2010-04-14 02:48 lost+found
-rw------- 1 root root  361 2010-04-14 02:49 VERSION

Für den Betrieb einer Virtuellen-Maschine mit JRockit VE wird eigentlich Oracle VM benötigt. In einem ersten Test ließ sich das Disk-Image aber auch in einer normalen Xen-Umgebung booten. Hierzu wurde die Konfigurations-Datei vm.cfg mit folgendem Inhalt versehen:

name="wlsve01"
bootloader="/usr/bin/pygrub"
memory=1024
disk=['tap:aio:/var/nfs/system.img,sda1,w']
vif=['bridge=xenbr0']

Der Start der Xen-Domain erfolgt dann wie gewohnt mit den entsprechenden Xen-Befehlen.

# xm create -c vm.cfg

Oracle Enterprise Manager 11g - Teil 1

Gestern Abend hat Oracle die Version 11g für den Enterprise Manager veröffentlicht. Entsprechende Infos und Videos zu diesem Launch gibts bei Oracle unter: Introducing Oracle Enterprise Manager 11g Grid Control!. Für mich überraschend steht die Software (zumindest für Linux) auch gleich zum Download bereit (Oracle Enterprise Manager Downloads). Da lohnt sich natürlich gleich ein Blick was sich alles verändert hat!

Middleware und RDBMS sind nicht mehr im Installationsumfang enthalten

D.h. diese Komponenten müssen vorab bereits installiert werden! Dies war einer der Punkte der mich bei Grid Control immer gestört hatte die enthaltenen Versionen von Middleware und RDBMS waren meist etwas angestaubt. So hat man mehr Flexibiltät bei der Installation.

Kleiner wird das Installationsumfang dadurch allerdings nicht. Die drei Zip-Files sind zusammen 4 GB groß:

[root@w0007 linux64]# ls -l
total 4324640
-rwxr-xr-x 1 frank frank 1430649163 2010-04-23 14:34 GridControl_11.1.0.1.0_Linux_x86-64_1of3.zip
-rwxr-xr-x 1 frank frank 1589674193 2010-04-23 14:56 GridControl_11.1.0.1.0_Linux_x86-64_2of3.zip
-rwxr-xr-x 1 frank frank 1408054490 2010-04-23 14:36 GridControl_11.1.0.1.0_Linux_x86-64_3of3.zip
Der Installationsvorgang

Die Installation lief in meinem Fall problemlos ab, die einzige wirkliche Änderung gegenüber Version 10gR5 ist das eine Datenbank-Instanz und der Weblogic Applicationserver bereits vor der Installation des Enterprise Manager aufgesetzt werden müssen.

Komponenten-Stack / Verzeichnisse

An der Verzeichnisstruktur des Enterprise Manager hat sich in Version 11gR1 hingegen einiges getan, man erkennt deutlich wie nun unterschiedliche Produktlinien langsam zusammenkommen. Neu ist der Begriff des Middleware-Home. Unterhalb dieses Verzeichnisses gibt es dann eine Fülle weiterer Verzeichnissbäume und Oracle Homes:

[oracle@oragrid middleware]$ ls -l
total 152
drwxr-xr-x 45 oracle oinstall  4096 Apr 24 13:27 agent11g
-rw-r-----  1 oracle oinstall   218 Apr 24 12:43 domain-registry.xml
drwxr-x---  7 oracle oinstall  4096 Apr 23 12:45 jdk160_14_R27.6.5-32
drwxr-x---  7 oracle oinstall  4096 Apr 23 12:45 jrockit_160_14_R27.6.5-32
drwxr-x---  2 oracle oinstall  4096 Apr 23 12:47 logs
drwxr-x---  7 oracle oinstall 24576 Apr 23 12:58 modules
-rw-r-----  1 oracle oinstall   623 Apr 23 13:00 ocm.rsp
drwxr-x---  5 oracle oinstall  4096 Apr 23 12:47 oepe_11gR1PS1
drwxr-xr-x 55 oracle oinstall  4096 Apr 24 12:39 oms11g
drwxr-xr-x 28 oracle oinstall  4096 Apr 23 21:05 oracle_common
drwxr-xr-x 48 oracle oinstall  4096 Apr 23 21:11 Oracle_WT
drwxr-xr-x  4 oracle oinstall  4096 Apr 23 12:58 patch_oepe1032
drwxr-xr-x  5 oracle oinstall  4096 Apr 23 13:03 patch_wls1032
-rw-r-----  1 oracle oinstall 57384 Apr 23 12:47 registry.dat
-rw-r-----  1 oracle oinstall  2640 Apr 23 12:47 registry.xml
drwxr-x---  3 oracle oinstall  4096 Apr 24 12:43 user_projects
drwxr-x---  8 oracle oinstall  4096 Apr 23 12:40 utils
drwxr-x---  7 oracle oinstall  4096 Apr 23 12:47 wlserver_10.3

Der Plattenplatz-Bedarf hat mit dieser Version ebenfalls nochmals zugelegt, das Middleware Home belegt nach der Installation satte 8 GB, hier eine grobe Aufteilung:

[oracle@oragrid middleware]$ du -sh *
1.1G	agent11g
4.0K	domain-registry.xml
172M	jdk160_14_R27.6.5-32
187M	jrockit_160_14_R27.6.5-32
8.0K	logs
122M	modules
4.0K	ocm.rsp
254M	oepe_11gR1PS1
3.9G	oms11g
833M	oracle_common
1.2G	Oracle_WT
16K	patch_oepe1032
60K	patch_wls1032
64K	registry.dat
4.0K	registry.xml
12K	user_projects
35M	utils
518M	wlserver_10.3

In den nächsten Teilen folgt dann eine Übersicht zu neuen Features und der Bedienung des Enterprise Managers.

Using Mozilla Weave

Notebooks are usefull things, you can take them with you and your office is where ever you are. I am currently switching to a new notebook and that is sometimes a little bit painful. It takes days to get all software and settings to work as it was on the old one. You know what I mean?

Over the last years I started to use IMAP for mails and subversion for code and other snippets to put most of the things I need to a central server. But I have found no solution for bookmarks and stuff like that. Yea, I know, there are several online services where you can store bookmarks and share them with other people. For security reasons I want to store my bookmarks on my own servers.

Mozilla Weave Logo

For that purpose Mozilla Weave is exactly what I am looking for! It is a Mozilla Firefox Plugin and stores bookmarks, browsing history or saved passwords on an WebDAV Server. Mozilla also provides an public WebDAV service and currently they have reached their account limit and do not allow new registrations. But if you are going to use your own WebDAV server you can still download the XPI package from that location.

I configured Apache as a WebDAV server like that:

Alias /webdav/ "/var/www/webdav/" 
<directory /var/www/webdav>
  DAV on
  AuthType Basic
  AuthName "WebDAV Storage"
  AuthUserFile /etc/httpd/passwd/passwd.dav
  require user frank
  Options Indexes
</Directory>

After installing the weave plugin you have to change the settings of the WebDAV server to use:
Mozilla Weave Setup

Material für meinen Oracle Grid Control Vortrag

Wie bereits angekündigt, halte ich dieses Jahr einen Vortrag zu Oracle Grid Control auf der 20. Deutsche ORACLE-Anwenderkonferenz in Nürnberg. Meine Präsentation steht ab jetzt unter http://www.fm-berger.de/download/oragc-02.pdf zum Download bereit.

Hier noch einige Links zu diesem Thema:

Access MySQL Databases with Oracle HSODBC

Sometimes you need to access data stored in an different RDBMS like MySQL. Oracle provides an convenient way to access external data-sources via ODBC. To use Oracle HSODBC you can follow my step-by-step notes:

  • Install unixODBC and the MySQL ODBC Driver
    For Fedora Core 6 I installed the following RPMs:

    • unixODBC-2.2.11-7.1
    • mysql-connector-odbc-3.51.12-2.2
  • Configure /etc/odbc.ini
    [ODBC Data Sources]
    TimeSheetTest = MySQL ODBC PHP.TimeSheetTest DSN
    
    [TimeSheetTest]
    Driver       = /usr/lib/libmyodbc3.so
    Description  = MySQL ODBC 3.51 Driver DSN
    SERVER       = localhost
    PORT         = 3306
    USER         = root
    Password     = SECRET
    Database     = timesheet
    OPTION       = 3
    SOCKET       =
    
  • Test the ODBC Connection via isql
    [frank@w0004]$ isql TimeSheetTest
    Connected!
    sql-statement
    help [tablename]
    quit
    SQL> 
    
  • Oracle Configuration
    First ensure that the shell environment used to start the Oracle listener includes the following
    environment variables:

    export ODBCINI=/etc/odbc.ini
    export ODBCSYSINI=/etc
    

    To integrate that ODBC connection into Oracle you have to edit several configuration files:

    $ORACLE_HOME/hs/admin/initTimeSheetTest.ora

    HS_FDS_CONNECT_INFO = TimeSheetTest
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc3.so
    

    $ORACLE_HOME/network/admin/listener.ora

    ...
    SID_LIST_LISTENER =
    ...
        (SID_DESC =
          (PROGRAM = hsodbc)
          (ORACLE_HOME = /opt/oracle/ora10g)
          (SID_NAME = TimeSheetTest)
          (ENVS=LD_LIBRARY_PATH = /usr/lib:/opt/oracle/ora10g/lib)
        )
      )
    ...
    

    $ORACLE_HOME/network/admin/tnsnames.ora

    ...
    TIMESHEET = (DESCRIPTION = 
        (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))
        (CONNECT_DATA = (SID= TimeSheetTest))(HS=OK)
      )
    ...
    
  • Test the Configuration with tnsping
    $ tnsping timesheet
    
    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 05-SEP-2007 18:26:16
    
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SID= TimeSheetTest))(HS=OK))
    OK (10 msec)
    
  • Create an Oracle Link in your Oracle Database instance
    SQL> CREATE PUBLIC DATABASE LINK timesheet
      CONNECT TO "root" IDENTIFIED BY "SECRET" USING 'TIMESHEET';
    

Please note that MySQL is case-sensitive on tablenames, so you have to use:

SQL> select * from "timesheet_times"@timesheet;
...