Sunday, June 29, 2008

Installing Oracle 10g on Ubuntu Hardy Heron

I'm now working in a client site. One of the differences is that each development desktop bears a smug "Ubuntu - Linux for human beings" sticker. This is the first time I have really tangled with Linux. I'm not going to risk the wrath of Verity Stob by detailing my journey into the heart of the penguin. But I thought it would be worthwhile documenting my experiences with installing Oracle 10gR2 on Ubuntu 8.04 (AKA Hardy Heron).

Ubuntu is touted as a user-friendly flavour of Linux, and certainly the graphical desktop is welcoming to people used to Windows. However things get pretty gnarly pretty quickly as soon as you want to do anything off piste. And Oracle is not supported on Ubuntu ( the supported distros are Suse, RHEL, Asialux and Oracle's own Unbreakable Linux) things go very off piste indeed. In the absence of official documentation we're thrown on the resources of the internet. There is lots of information out there - the sort of people who love Linux are the sort of people who love the web - but it is often written with a presumption of familiarity in Linux. In amongst the shedloads of helpful advice there are opaque sentences such as this): "to install lesstif2 you will need to use 'Adept' to enable the universe repository or edit /etc/apt/source.list" (unfairly quoting Todd Trichler out of context). I know I should have devoted myself to studying the Linux architecture before I started but I really needed to install Oracle now.

The first guide Google turned up was Luca Mearelli's Installazione di Oracle 10g su Ubuntu Linux which as you might have guessed is written in Italian. I found this quite distracting as anything in that language sounds like opera.
Madame Butterfly. Act 2. Scene 1.Whilst she awaits the return of Lt Pinkerton Koko-chan amuses herself by installing Oracle on different Linux distros. She sings the aria Impostazione dei parametri del kernel.
It was the setting of kernel parameters which drew me up short. There was no explanation (and even if there had been, my Italian would not have been up to translating it). Should I be changing kernel values on the say-so of a random Google hit?

So I surfed a bit more and found Installing 11g on Ubuntu Hardy Heron by Pythian's Augusto Bott. This article is so good that it has been ripped off by plagiarising sites. Augusto's guide included the same changes to the same kernel parameters as Luca's guide but it included explanations (through a link to his earlier article about installing Oracle 11g on Ubuntu Feisty Fawn). Although he wrote his guide for 11g it works just as well for 10g. There were still a few things which caused me some puzzlement and I will discuss those below.

I wasted a lot of time trying to install 64-bit Oracle (because we have 64-bit desktops). I could download it and run the Installer but I couldn't get OUI to link the database packages. The problem is:


INFO: /usr/bin/ld: skipping incompatible
/u01/app/oracle/product/10.2.0/db_2/lib/libsql10.a
when searching for -lsql10


After a couple of hours fruitlessly downloading further packages I gave up and tried 32-bit, which worked first time without a hitch.

Annotations for Augusto Bott's guide


Step 3 applied because I was installing on the Ubuntu desktop. The gotcha is in the innocuous statement "You will have to restart your Xserver for this change to take effect." The Ubuntu desktop environment is X so the simplest way of doing this is to logout and login again. However I only discovered this fact after I issued the following command in a terminal window:
sudo /etc/init.d/gdm stop
Theoretically this should have just dumped me out to a text-mode command prompt. It didn't quite work that way so I had to resort to a hard reboot. Incidentally, another way to get out of the graphical environment is ALT+CTRL+F1 while ALT+CTRL+F7 gets you back again.

In Step 8 the wise man will take a backup of these files just in case. The suggested values seem to be common across all the install guides I read, so I trusted them :) Given that I was only installing locally I didn't bother setting the network parameters.

Step 9 is the actual install of the software. Oracle's Universal Installer is a Java applet, which is why we need to change the X Windows settings. If you have trouble with this step first make sure you have done Step 3 properly. However I still got the OUI-10025 message. More Googling threw up this piece of voodoo, which solved the problem:


clarkea@clarkea-desktop:~$ export DISPLAY=:0.0
clarkea@clarkea-desktop:~$ sudo su - oracle
Your account has expired; please contact your system administrator
su: User account has expired
(Ignored)
oracle@clarkea-desktop:~$ export DISPLAY=:0.0
oracle@clarkea-desktop:~$ xhost +
access control disabled, clients can connect from any host
oracle@clarkea-desktop:~$

If xhost or xclock works then you can run OUI.

The OUI wizard is slightly different in 10g. In particular it doesn't prompt for ORACLE_BASE and it defaults the paths to hang off your $HOME directory. You may want to change the location to /u01/app.

For me the actual install and linking process did not take nearly as long as Augusto suggests it will. Obviously our machines are a lot more powerful than his :)

Finally, if you apply the scripts Augusto suggests you will need to change the paths to point to 10.2.0 instead of 11.1.0.

To apply the 10.2.0.4 patch you just need to repeat the process.

Further References


Augusto's earlier article on installing on Ubuntu Feisty Fawn (which has some additional explanation of the parameter tweaking)

Oracle Release for 10gR2 on Linux note

Oracle Install Guide for RHEL4 and SLES9

Wednesday, June 25, 2008

Sun push the thread envelope

According to The Register the next iteration of Sun's Niagara chip will have 16-cores and 16 threads per core . Apart from the mind-boggling number of threads which will become available in an eight socket 1U rack, the licensing implications are a bit of a facer for Oracle. Soon a server with a single chip in it could incur a sixteen CPU license. At least at the moment if customers don't want to pay Oracle's multi-core fees they have the option to tear out some chips. But that's not an option with Niagara 3. Can Oracle seriously maintain a policy of selling licenses in bundles of sixteen?

Monday, June 09, 2008

UKOUG DE SIG 10-JUL-2008: the Agenda agenda

A while back I was discussing the difficulty of assembling a SIG agenda with a fellow chair. He had recently taken over his SIG and had been expecting to find a long list of volunteer speakers. He was disappointed by the reality, which is - alas - scraping around to get presenters. I was relieved it's not just the Development SIG with this problem. There's just over four weeks to go before the next SIG and I still have only three confirmed speakers, although I am confident of getting at least one more.

There are a number of different sources for speakers. The obvious one is Oracle itself. Every SIG has an Oracle buddy (strictly speaking they're called Ambassadors but the "buddy" tag stuck). Our buddy is the redoubtable Grant Ronald, who is a Group Product Manager in Oracle's Tools Division, which makes him the go-to man for Forms and JDeveloper. For the upcoming SIG Grant will be presenting on Oracle ADF 11g: New Declarative Development Features for Fusion . This will be an opportunity to see whether JDeveloper is yet approaching the productivity which Forms has offered us for more than fifteen years. Grant will also be giving us a brief overview of the new features in Forms 11g.

Oracle Consulting also provide us with speakers. It's a good place to get information on the newer Oracle products and technology. I'm still waiting for David Richards, the SIG's Consulting contact, to get back to me, but he usually comes up with the goods.

We do get offered sessions from vendors. I think it is an important function of the SIG to bring relevant products to the notice of our audience. But we have had feedback that people don't like sales-oriented presentations, particularly at SIGs because the single stream means there's no choice. This is why I am especially grateful to Peter Sechser from PITSS for offering a wholly technical presentation on turning an older Forms application into a SOA application which isn't a sales pitch for their PITSS.CON product.

Another, largely theoretical, source is people - actual users - who have volunteered to present. Unfortunately we get almost no such offers. I'm not quite sure why this is, but I suspect it is related to the reason why we get lower attendance compared to the DBA SIGs. Apart from anything else, the smaller audience represents a smaller pool of potential speakers. Then again, perhaps developers are just shyer than DBAs.

My final option is to phone a friend - or at least e-mail people whose blogs I like. In previous years I have buttonholed Rob Baillie and Tim Hall. This year's victim is Adrian Billington, who will be presenting on pipelined functions in PL/SQL. Adrian is a knowledgeable practitioner of PL/SQL so I'm hoping to learn lots from this one. I also approached another Oracle ACE for a presentation: I've still got my fingers crossed but I fear this one's going to fall through.

Putting the agenda together is a tough task, I try to balance the topics between the firm favourites (i.e. Forms) and the new (Java, ApEx). I like to include at least one unfamiliar topic in the mix (PHP, .Net, Rules Engines). But most of all I think it is my duty to ensure that we have presentations from different sources: I could easily have five sessions from Oracle employees but it is meant to be a User Group, not a branch of Oracle marketing.

So, if you're an Oracle developer based in the UK please come to the SIG. It's in Blythe Valley Park (near Solihull) on July 10th 2008. It's open to all comers (it's just more expensive to get in if your organisation doesn't have a UKOUG membership). But also, please consider presenting at the SIG. I admit it's not as glamorous as the annual conference but it is still a worthwhile and rewarding experience. If you are interested please contact Julius Kisielius at the UKOUG office.

Hanging around

I've just come back from holiday in Kos. One of the modern challenges of going away is figuring out how to hang up a pair of trousers in the hotel wardrobe. This apparently simple task has become more complicated because of the replacement of old-fashioned hook hangers with two-part security hangers. The hook hangers could be easily removed from the rail in order to facilitate the hanging of clothes. With the new hangers we have to disengage the frame from the closed loop. In this hotel the connection was a ball-and-socket arrangement which required a technique like that required by those buzzing wire steady-hand games at school fairs. The equivalent of the dreaded buzz is your trousers slipping off the frame and falling in a heap on the wardrobe floor. It is particularly difficult in a crammed wardrobe (my wife is a firm believer in "way too many" being better than "too few" when it comes to packing holiday clothes).

As a hotel guest, my user requirements for a clothes hanger are:
  1. hanging my trousers;
  2. simple to use.
However, guests are not the only stakeholders. The hotel owners also have a set of requirements:
  1. allow guests to hang their trousers;
  2. discourage guests from taking hangers home.
Clearly the first requirements on both stakeholders' lists are in alignment. But whilst the hook hanger satisfies the guest's second requirement it doesn't satisfy the owner's second requirement. Whereas the closed loop hanger meets the owner's second requirement but fails to meet the guest's. In situations like this, when two requirements clash it is usual for the customer's requirement - the bill payer - to trump the user's requirement.

And that's why almost universally hotels now have security hangers in their wardrobes. At least in this situation the user's top requirement - hanging my trousers - has been implemented in a convenient fashion. The hotel could just have provided a wardrobe rail and told us to bring our own clothes hangers (i.e. as a self-service application).