Author Archive

Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex

By Augusto Bott November 18th, 2008 at 11:03 am
Posted in Oracle
Tags:

Hello, there! With another Ubuntu release, it has come the time to update our series of posts on how to install Oracle 11g on Ubuntu. If you’ve been following, we’ve been publishing updated howtos since Ubuntu 7.04:

In fact, in this article I refer several times to previous posts regarding some configuration aspects and why I chose particular values. Also, note that this series of posts is a work in progress and we were able to improve this series with your help. So please do post comment below as your collaboration is very much appreciated.

In this post, we’ll see the steps needed to install Oracle 11gR1 on an Ubuntu 8.10 Intrepid Ibex box all the way to creating your very first database. I’ve been working very hard to ensure that at every new post, the results you get when executing this procedure are as deterministic as possible, leading to a successful setup.

Please keep in mind that this is not a supported architecture, so pay special attention to the order in which I do things. Don’t rush and try to merge steps, as it took me a lot of attempts to make this setup work properly. There are some reboots and also there’s a specific order you need to do things, so please follow the instructions step-by-step and verify the the results of every single command.

Preparation

Let’s get down to it, shall we? The first thing to do is to get some files. We need an ISO image of Ubuntu (a CD/DVD will do) and one of Oracle 11gR1. Get Ubuntu 8.10 Server here; and Oracle 11gR1 here. (It’s free, but you have to register on the Oracle website to download it.)

It’s a good idea to check the md5sum of each image after downloading from the Internet.

(more…)

MySQL: my.ini Gotcha on Windows

By Augusto Bott October 14th, 2008 at 11:15 am
Posted in MySQL
Tags:

The other day we began to encounter weird and random errors on small and innocent queries that shouldn’t give any errors at all. It all lead to one of our most basic health checks failing for no apparent reason.

The first clue that popped into our minds was related to case-sensitivity, since the failing check was looking for the column names of the only table in the schema with UPPER CASE name. This symptom was especially weird since all of this was happening on MySQL setups running on Windows, and so we’re not sure if this was being caused by some internal code library, MySQL, or Windows itself.

Since that was the only clue we then had, it seemed obvious that we should start fiddling with the lower_case_table_names system variable. After a couple of restarts, this approach was leading us nowhere, so we finally gave up on it.

Then, we had the brilliant idea of actually executing that statement by hand on the command line to see what happened:

C:\pythian>mysql -uXXXX -p XXXX -e "desc TABLE_NAME"
Enter password: *****
ERROR 1 (HY000) at line 1: Can't create/write to file 'C:\MySQL      mp\#sql_634_0.MYI' (Errcode: 22)

C:\pythian>perror 22
OS error code  22:  Invalid argument

C:\pythian>

None of us remembered seeing this one before, so we stared at the monitor for a few moments, not realizing the meaning of this message. I guess our focus on the case-sensitivity was driving us away a from the real cause. So . . .  time to check the my.ini file. (more…)

MySQL: Replacing URL Escape Sequences

By Augusto Bott September 26th, 2008 at 3:22 pm
Posted in MySQL
Tags:

So you want to store URLs in MySQL, and the URLs have those annoying %20%27%7C%26%5E%2B%2D%25 symbols? And you want to be able to show your users some kind of human-readable information. You might want to consider using this trick. Take this list of commonly escaped characters as an example:

%20 - space
%27 - '
%7C - |
%26 - &
%5E - ^
%2B - +
%2D - -
%25 - %

So, how about we do some search’n'replace on that?

mysql> SET @url:='%20%27%7C%26%5E%2B%2D%25';
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @url as original,
    ->        REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
    ->        REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
    ->        @test,'%20',' '),
    ->        '%27','\''),
    ->        '%7C','|'),  -- REPLACE() is case sensitive
    ->        '%7c','|'),  -- so we have
    ->        '%26','&'),
    ->        '%5E','^'),
    ->        '%5e','^'),  -- to repeat
    ->        '%2D','-'),
    ->        '%2d','-'),  -- ourselves
    ->        '%2B','+'),
    ->        '%2b','+'),  -- sometimes
    ->        '%25','%') as replaced;
+--------------------------+----------+
| original                 | replaced |
+--------------------------+----------+
| %20%27%7C%26%5E%2B%2D%25 |  '|&^+-% |
+--------------------------+----------+
1 row in set (0.01 sec)

mysql>

We can easily turn this into a function: (more…)

Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)

By Augusto Bott May 6th, 2008 at 4:07 pm
Posted in Oracle
Tags:

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

After our last post about installing Oracle 11g on Ubuntu 7.10 (November, 6th), and considering Ubuntu 8.04 LTS was released on April 21st, I spent some time reviewing and putting together this new HOWTO for the installation.

Please note: I’ve used the x86 server version of Ubuntu 8.04, but the same steps should work without any problems for the Desktop version. Also notice that this whole procedure can easily take over six hours to complete, so don’t complain I didn’t warn you!

So, let’s get started, shall we?

Step One

Get the Ubuntu Linux 8.04 Hardy Heron (x86, 32-bit) image here, burn it, and install on any box you like. The only remark on the installation is that you should ask the installer to install an OpenSSH server at the end of the installation, since we’ll perform all the steps on this procedure remotely.

I’m not sure about the minimum requirements for the server, as, the last time I checked, running Oracle on Ubuntu is not officially supported by Oracle. In case you’re wondering, however, I’m using an x86 Pentium-like machine with 512M of RAM.

Step Two

Download Oracle 11g for Linux (x86, 32-bit).

(more…)

First Impressions at the MySQL Users Conference 2008

By Augusto Bott April 15th, 2008 at 2:55 pm
Posted in MySQL
Tags:

Hi there!

I arrived at Santa Clara yesterday, just in time for the MySQL Community dinner (check this post on Arjen’s blog). It was a lot of fun, not to mention the opportunity to talk to developers and other folks from MySQL/Sun.

Unfortunately, I forgot to pack in my luggage a card reader or a proper cable for my camera, so pictures will have to wait a few days. To mitigate this problem, I’ll try to hunt down more posts from other guys, but in the meantime, you might want to check the 2008 MySQL Users Conference & Expo group at Flickr.

Yesterday was the “Tutorials Day”. I’ve been to many of them. The subjects were so interesting I just couldn’t stay put for the whole session so, I kept jumping from one to the other. A few quite interesting sessions: MySQL Proxy, the complete tutorial. A very interesting session on hacking and adjusting it to fit your needs. It was held by Jan Kneschke (main author and developer) and Giuseppe Maxia (testing).

MySQL Cluster, with Stewart Smith. An amazing and thorough session on MySQL Cluster - all day long. There’s nothing better than learning from the guys that actually are writing the code, right? If you are curious, his blog can be found here.

In the afternoon, there were two very interesting sessions, but I had to pick only one of them. SQL Antipatterns (by Bill Karwin) was quite interesting, but I ended up at the Ask Bjørn Hansen’s session, called Real World Web: Performance & Scalability, MySQL Edition. This must have been one of the best sessions, ever (mostly because we’ve been giving the exact same advice to our clients for some time now).

This morning started with a keynote from Mårten Mickos (who used to be MySQL’s CEO, but his “job title” must have changed after the acquisition by Sun). His speech was followed by Jonathan Schwartz’s (CEO of Sun) and after that, we heard from Werner Vogels (CTO of Amazon.com). Quite interesting, but I’m not about to repeat everything they’ve said. Instead, I’m linking Colin Charles’s post, Ahead in the Cloud by Verner Vogels.

I’m running to another session now, so… keep tuned: more news will follow!

Installing Oracle 11g on Ubuntu Linux 7.10 (Gutsy Gibbon)

By Augusto Bott November 6th, 2007 at 3:59 pm
Posted in Oracle
Tags:

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

After many requests from readers, I’ve put together new, revised version of the Oracle 11g on Ubuntu recipe. This new version is a little different than the first one published: it’s based on a bare-bones install of Ubuntu 7.10 (Gutsy Gibbon) server version instead of the desktop version. As an improvement, I’ve tried to pare down dependencies to a minimal set.

Your feedback is more than welcome — it’s the main reason why I wrote a new version of this HOWTO. I’ve also tested and repeated this procedure twice. Even so, it might still have problems, so please let me know so we can improve it 1.

(more…)

From MySQL to Oracle: A Few Differences

By Augusto Bott September 20th, 2007 at 1:44 pm
Posted in Group Blog PostsMySQLOracle

As stated on my first post on this blog, I’m a MySQL DBA trying to draw a map of this new (to me) world called Oracle. The other day I was trying different things with Oracle, like (but not limited to) issuing kill -9 to random Oracle processes to see what would happen (on my own box of course!). The purpose? To study STARTUP statements and recovery techniques, and to get to know a little better the Oracle SQL dialect.

I was a little surprised by the results. They’re probably no news for most of you guys, but it is new to me, and I’d like to share my findings with other MySQL guys around the planet.

(more…)

Installing Oracle 11g on Ubuntu Linux 7.04

By Augusto Bott July 30th, 2007 at 12:12 pm
Posted in Oracle
Tags:

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

Note: I have now published “Installing Oracle 11g on Ubuntu Linux 7.10 (Gutsy Gibbon)”

Note: This page focuses on Ubuntu installs. Oracle has published a web page for successfully installing Linux on unsupported platforms that you may find helpful.

I come from a MySQL background, and I have been given the challenge of learning Oracle. I can’t just play around with our customers’ databases, but I remembered that Paul Vallée said that there is nothing wrong with learning on company time. So I decided to install my own Oracle database, which I’ll be free to destroy in every way I can think of… and of course, free to bring it back to life. Recovering from crashes will probably be the most difficult part of my adventures in the Oracle world, but let’s take one step at a time, shall we?

Now, onto Oracle 11g (beta 5) on Ubuntu 7.04 (Feisty Fawn). One little issue is that Ubuntu is unsupported by Oracle. So, through this text, we will trick the Oracle installer into thinking it’s actually running on a Red Hat box.

(more…)