Skip to content
September 8, 2011 / Alex Nedoboi

Install Oracle Express XE 11gR2 on Oracle Linux 6.1 x64. (No bitmap index conversion on the fly!)


Some time ago, if you said you had installed Linux and, heavens forbid, Oracle on Linux, you’d be considered an utter geek.

Fast forward 15 year. These days, when people (who have experience with other databases and operating systems) ask me about Oracle/Linux, I feel somewhat embarrassed.

Let me illustrate what I mean.

Install Oracle Linux 6

After downloading it from edelivery.oracle.com/linux (version 6.1 x86_64 in this example), burn the .iso (or just use the .iso itself in case of virtual machine), and power on the box.

Wait a minute while it boot ups. Skip the image check. Once you see the Next button in the bottom right corner, click it.

Click Next again.

Click Next again.

Click Next again.

Click Next again.

Click Yes (to discard the data on the disk).

Name your machine. For example, o61.localdomain, then configure the network if you want to. Using DHCP might seem trendy, but if you prefer knowing the IP, set it here.

Click Next. (Select your location if you want to, or pretend you’re in New York.)

Click Next.

Click Next. (Partition the disk(s) if you want to. You can keep the default layout with LVM, or if you see no point, just two partitions should do – root/ext4 and swap.)

Click Next again.

Click Next again. (No need to tick “Database Server”, the Basic one will do just fine.)

Click Next, this is the last time. Watch Linux install or go put a kettle on.

Done. Yep, done, just 15 or so minutes.

So, the strategy. If you see Next, and are happy with the default setting, click it.

Install Oracle XE 11g R2

At this point you might think – installing Linux was way too easy, you can’t beat that.

Well, let’s see if installing Oracle is even easier.

Download the .zip from http://www.oracle.com, unzip it, and install it -

[root@o61 Disk1] rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm

Then configure it -

[root@o61 Disk1] /etc/init.d/oracle-xe configure

Wow, that was tricky, clicking Enter five times (except the password step).

All done. In less than half hour.

Time to play

Allow connections from outside the machine, as SYSTEM run -

SQL> exec dbms_xdb.setListenerLocalAccess(false)

Also, make sure the firewall (iptables) allows connections on 1521 and 8080, or disable iptables altogether.

Let’s check the management page, go to http://server_address:8080/apex (log in as SYSTEM and password from the “oracle-xe configure” step).

Looks nice.

xe-1

Click the Storage tab. You can see SYSAUX/UNDO/TEMP are (kind of) unlimited, and USERS is limited to 11G (suppose Oracle intended the pun).

xe-2

What optimizer parameters do we get in 11gR2 XE?

xe-3

No bitmap indexes on the fly

Let’s have some fun.

SQL> create table people (id number(10), first_name varchar2(100), last_name varchar2(100));

Table created.

SQL> insert into people 
  2  select level, chr(ascii('A') + mod(level*11,13)), chr(ascii('A') + mod(level*19,23))
  3  from dual
  4  connect by level <= 10000;

10000 rows created.

SQL> commit;

Commit complete.

SQL> create index i_first on people(first_name);

Index created.

SQL> create index i_last on people(last_name);

Index created.

And then -

SQL> set autotrace on

SQL> set linesize 120

SQL> select count(1) from people where first_name = 'J' and last_name = 'S';

  COUNT(1)
----------
        33

Execution Plan
----------------------------------------------------------------------------------------
| Id  | Operation           | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT    |                  |     1 |     4 |      4(25) | 00:00:01 |
|   1 |  SORT AGGREGATE     |                  |     1 |     4 |            |          |
|*  2 |   VIEW              | index$_join$_001 |    33 |   132 |      4(25) | 00:00:01 |
|*  3 |    HASH JOIN        |                  |       |       |            |          |
|*  4 |     INDEX RANGE SCAN| I_LAST           |    33 |   132 |      1 (0) | 00:00:01 |
|*  5 |     INDEX RANGE SCAN| I_FIRST          |    33 |   132 |      2 (0) | 00:00:01 |
----------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("LAST_NAME"='S' AND "FIRST_NAME"='J')
   3 - access(ROWID=ROWID)
   4 - access("LAST_NAME"='S')
   5 - access("FIRST_NAME"='J')

Statistics
----------------------------------------------------------
  0  recursive calls
  0  db block gets
 21  consistent gets
  0  physical reads
  0  redo size
526  bytes sent via SQL*Net to client
519  bytes received via SQL*Net from client
  2  SQL*Net roundtrips to/from client
  0  sorts (memory)
  0  sorts (disk)
  1  rows processed

SQL>

What do we see here, on Express Edition?

Hash join (range scan, range scan), and 21 consistent gets.

What would we see on Enterprise Edition?

------------------------------------------------------
| Id  | Operation                         | Name     |
------------------------------------------------------
|   0 | SELECT STATEMENT                  |          |
|   1 |  SORT AGGREGATE                   |          |
|   2 |   BITMAP CONVERSION COUNT         |          |
|   3 |    BITMAP AND                     |          |
|   4 |     BITMAP CONVERSION FROM ROWIDS |          |
|*  5 |      INDEX RANGE SCAN             | I_LAST   |
|   6 |     BITMAP CONVERSION FROM ROWIDS |          |
|*  7 |      INDEX RANGE SCAN             | I_FIRST  |
------------------------------------------------------

Bitmap “and” (bitmap conversion(range scan), bitmap conversion(range scan)). And 5 gets.

Yes, this bit of functionality didn’t make it into XE.

But when you have free Oracle 11gR2 on free Linux, all installed and running in about 30 minutes, can you complain?

6 Comments

Leave a Comment
  1. Vincent de Beet / Jan 24 2013 06:52

    [...] Instead of the logon shown above I get A logon to Application Express I certainly didn’t ask for ! I am asked for a “workspace” ? [...]

  2. Paul / Jul 30 2013 19:22

    Database configuration failed with multiple ORA-01034, ORA-27101 errors. Oracle Linux 2.6.39-400.17.1.el6uek.x86_64

    • Alex Nedoboi / Jul 31 2013 09:31

      Hi Paul. This simply means that the script cannot connect to the database. Most likely, because of your network set up.

      Check your tnsnames.ora and find the host name, in my example it was o61.localdomain. Then see if it resolves to your machine’s IP address.

      Then you can try re-running the configuration script. Or, to perform a clean install, do “rpm -e oracle-xe” first, then start from “rpm -ivh …” again.

      Alex.

      • Tim M. Hidalgo / Feb 11 2014 16:32

        Alex,

        Thanks for this article, it was pretty much that easy!

        I ran into the same error as Paul. My /etc/hosts files looked kind of weird so I edited it to read

        127.0.0.1 localhost ..
        ::1 localhost

        Re-ran configure and it finished successfully

        Cheers

Trackbacks

  1. Install Oracle XE on Oracle Linux | codepimp

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: