How to install and configure Oracle Virtual Server 3.2 at home (Part 2/2)

This post covers the configuration of VM Manager using equipment at home, if you need to install it please read the first part of this post to learn how to do it.

One of the first things that I noticed by using VM Manager and trying to create my first VM is how complex it is, don’t get me wrong, the interface is actually clean but this is a complete datacenter virtualization solution and it’s aimed to manage multiple OVM servers using external storage, I’ll try to make it simple as this is our “home edition” configuration.

First open the URL address you received during the installation to connect to the management console, ignore the security warning and continue to the login screen. Enter the user and password.

Now we will review the following steps one by one

  1. Discover the OVM server.
  2. Configure storage.
  3. Configure network.
  4. Create server pool
  5. Configure repositories.
  6. Configure external storage to host ISOs and templates.
  7. Import ISO images or templates
  8. Create virtual machine.
  9. Boot the VM.

Continue reading

Posted in Linux/Unix, Oracle Server, Virtualization | Tagged , , , , , , , , | 3 Comments

How to install and configure Oracle Virtual Server 3.2 at home (Part 1/2)

As a DBA we do like to play with features and versions a lot, now with the release of Oracle 12c I wanted to take my virtualization system to another level ;-)

I have been using VirtualBox on Linux for a while but I know how much power I can get using “real” hyperthreaded virtualization, so I decided to give Oracle Virtual Server a try after seeing small PCs running OVM and hosting three 11g RAC virtual nodes at Oracle university.

Requirements (software, virtual hardware and real hardware)
OVM needs 2 main components, one is the VM server, which will host the Virtual Machines and a Management console (VM Manager), which requires a separate server (can be a virtual machine).

For VM MANAGER I will use a Virtual Box machine as follows.

Oracle Enterprise Linux 6
25GB Disk space

For the VM server I will be using a quad-core machine with 2 hard drives. The more memory you have the better because OVM does not support memory overcommitment. This means that you can install as many VMs as your memory support.

Yes, we need at least 2 HDD, one used as the installation/boot disk, the other one will be used as local storage for VMs.
Note: the second disk has to be raw, no partitions in it.
Note 2: As an alternative you can use external storage, like those disk boxes that offer iSCSI or NFS (or another server sharing its disk like FreeNAS), if you have external storage the VM server machine needs only 1 HDD.


Continue reading

Posted in Oracle Server, Virtualization | Tagged , , , , , , | 3 Comments

virtualbox script to control Virtual Machines

Additional to my daily job, I need to “play” from time to time in my home server, it’s a quad core machine with 8 gigs of RAM and two hard drives, nothing special about it, the important thing is that it does the job.

About 8 month ago I upgraded the OS and VMWare server started to “complain”, specially the graphical interface, it was discontinued and almost dead, so I decided to move to VirtualBox, I also updated the OS to Oracle Linux 6.

I’m surprised on how complete VirtualBox is and the multiple configuration options available, the graphical interface just doesn’t make justice to the product.

I started creating virtual machines to test my new toy and I realized that when the virtual machines are started from the graphical interface (I use gnome) they have a “collateral” impact on the host performance, having that GUI interface sitting there cost cpu and memory, after that I understood the importance on correctly setting the “VRDE” (Virtual Box Remote Desktop Extension), let me tell you something, it really rocks.
VRDE allows you to connect to your machines, linux, windows or whatever, using your normal Windows remote desktop connection, is a true console that works even if the virtual machine you are connecting to have no network.

I want to share with you a script that I developed using bash shell scripting to control machines on VirtualBox 4, I call it vbctl (VirtualBox control), and it really helps controlling the machines states (startup, pause,shutdown ,save state, etc).

– It will scan the virtual machines in the system and list them (screenshot 1).
– It will allow you to perform operations on them (screenshot 2).
– Designed for headless machines, it will only start headless machines and it will show the RDC port (VRDE Port) in the listing (screenshot 1).
– VRDE activation, if you start a machine with VRDE disabled it will enable it and ask for a port number (between 5000 and 5050).

I want to state that this is not an intelligent script, it will do whatever you ask it to do (with some minor exceptions), for example, it will allow you to shut down a machine that’s already down.

Installation instructions:
– Create a directory (with the virtualbox administrator user).
– Save the script as
– chmod 740
– edit your .bash_profile and create an alias (optional)
alias vbctl=’/<path>/’

Click to enlarge

Screenshot 1 – Click to enlarge

click to enlarge

screenshot2 – Click to enlarge

One last thing, if you improve this script please share it back!



Well, the OperSource spirit arrived sooner than I expected.

In less than two weeks I received the first important improvement!

  • V1.3  can now be downloaded from here

Mr. João Figueiredo improved the visual presentation and added colors! he also fixed minor problem when Virtual machine names have spaces.

Please visit his website for screenshots and details or download the script directly from his website.

Version 1.2 is still available for download.

Posted in Linux/Unix, Oracle Server, Virtualization | Tagged , , , | 4 Comments

How to install ASMLIB from Oracle’s public YUM

There are several ways to get ASMLIB, we can download it from the OTN here, or we can download it from from ULN (Unbreakable Linux Network).

Also it comes in the the Unbreakable Linux media, but if you are not subscribed to ULN and you are not using Unbreakable Linux then most people go to the OTN, where you have to select your Linux flavor and then navigate to the correct file according to the linux kernel and then download the 3 files one by one.

I’m going to explain here how easy is to get it from Oracle’s public YUM repository (how to configure the public YUM repository?)

Once you have the public YUM enabled do as root:

yum install oracleasm-support oracleasmlib oracleasm-`uname -r`

ET VOILA!!! it will take just one minute to complete!.

Here is an example on a CentOS 5.4

[root@scen503 yum.repos.d]# yum install oracleasm-support oracleasmlib oracleasm-`uname -r`
..   skipping a bunch of things...
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-2.6.18-194.el5.x86_64 0:2.0.5-1.el5 set to be updated
---> Package oracleasm-support.x86_64 0:2.1.4-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

Package                      Arch       Version          Repository       Size
oracleasm-2.6.18-194.el5     x86_64     2.0.5-1.el5      el5_u5_base      25 k
oracleasm-support            x86_64     2.1.4-1.el5      ol5_u6_base      87 k

Transaction Summary
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 113 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm   |  25 kB     00:00
(2/2): oracleasm-support-2.1.4-1.el5.x86_64.rpm          |  87 kB     00:00
Total                                           133 kB/s | 113 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : oracleasm-support                                        1/2
Installing     : oracleasm-2.6.18-194.el5                                 2/2

oracleasm-2.6.18-194.el5.x86_64 0:2.0.5-1.el5
oracleasm-support.x86_64 0:2.1.4-1.el5


Then just follow the installation guide…here are some quick steps to configure ASMLIB:

[root@scen503]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
[root@scen503]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm

Then we need to create all disks, change ASMLIBDISK1 according to your naming conventions:

/usr/sbin/oracleasm createdisk ASMLIBDISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done

and finally scan and list the disks

/usr/sbin/oracleasm scandisks

/usr/sbin/oracleasm listdisks

Find more of ASM here.

Good luck!

Posted in High-Availability, Linux/Unix, Oracle Server | Tagged , , , | 3 Comments

Oracle 11.2 XE (beta) is out!

Hi eveyone, I’m so happy about this news because I have successfully used Oracle 10.2 XE before for personal and business solutions (even on banks and telecommunication companies) and it was getting older and older…

Oracle 11.2 XE (beta) is available for download here, for Windows 32bit and Linux 64bit.

You can find the documentation here.

Download size for Linux 64bit is 271MB

The limitations are:

  • Only one instance can be installed per server.
  • It will use only one of the available processors.
  • It will support up to 11B of data (not including system data).
  • It will use up to 1GB of available RAM.

These and other limitations like features not included can be found here.

About a year ago I couln’t find a thing about the XE roadmap, I was a little bit worried about how old the 10.2 XE was and it even came to my mind that they were going to let it die, so these are very good news!

Posted in Linux/Unix, Oracle Server | Tagged , , , , | 1 Comment

Exadata workshop – impressions and notes

I have read articles and specs on Exadata before, but now I have had the opportunity to assist to an Exadata Hands-On workshop.

I’m writing these impressions without talking too much about the specs, they are everywhere, some links here.

Basically, Exadata’s architecture splits processing in two different layers, Database servers (compute processing) and the Storage servers called “Storage Cells” (data processing). Each Storage Cell consist of servers with 12 internal disks each (the numbers of servers will vary from Quarter, Mid or Full rack configurations), when a request arrives, the storage evaluates and filters out unneeded rows, Oracle explains that its common to send 10x less data to the database servers, this translate into improved IO and smaller SGAs, on top of that the servers have dual ported cards 40Gb/sec InfiniBand.

Other things that Exadata can offload to the storage side is the filtering for the incremental backups and the processing power for the encryption.

Continue reading

Posted in High-Availability, Oracle Server, Performance & Tuning | Tagged , , , , | Leave a comment

Benefits and consequences of the NOLOGGING option

I still find confusion out there about the LOGGING and NOLOGGING clauses when performing DML and DDL operations, the reality is that the NOLOGGING clause will work only on particular conditions, but all regular inserts,updates and deletes will still log the operations.

The benefits of the NOLOGGING option are:

  • Will save disk space when the archive option is enabled.
  • Will largely reduce I/O on the redologs.
  • Will reduce the time it takes to complete the operation.

Please note that NOLOGGING operations will only reduce -not eliminate- the logging.

Lets see an example -

--   First: we create an empty table with the nologging clause
SQL>  create table logging_example nologging as select * from dba_objects where 1=2;

Table created.

--Now let's enable the statistics and perform a couple of tests:

SQL> set autotrace on statistics
SQL> set timing on

-- insert the records the traditional way
SQL> alter system flush buffer_cache;  --clean the cache to compare the speeds in equal conditions

System altered.

Elapsed: 00:00:01.49

SQL> insert into logging_example select * from dba_objects;

50864 rows created.

Elapsed: 00:00:01.59

 0  recursive calls
 5250  db block gets
 6766  consistent gets
 982  physical reads
5636712  redo size --without the APPEND hint
 670  bytes sent via SQL*Net to client
 586  bytes received via SQL*Net from client
 3  SQL*Net roundtrips to/from client
 1  sorts (memory)
 0  sorts (disk)
 50864  rows processed

-- insert the records with the APPEND hint (nologging)
SQL> alter system flush buffer_cache;  --clean the cache to compare the speeds in equal conditions

System altered.

Elapsed: 00:00:01.06

SQL> insert /*+ append */  into logging_example select * from dba_objects;

50864 rows created.

Elapsed: 00:00:00.59

 0  recursive calls
 743  db block gets
 5374  consistent gets
 944  physical reads
2200  redo size --with the APPEND hint
 654  bytes sent via SQL*Net to client
 604  bytes received via SQL*Net from client
 3  SQL*Net roundtrips to/from client
 1  sorts (memory)
 0  sorts (disk)
 50864  rows processed

We can see that there is a big difference on the redo size generated by each insert, there are many post and articles on the internet  that show the speed benefits when using the NOLOGGING option, but here I mainly want to clarify that a regular insert (no APPEND hint) will still generate redologs even if the table have been created with the NOLOGGING option.

What happens to the data after a restore when a nologging operation was performed on it?
Continue reading

Posted in Backup & Recovery, Oracle Server, SQL | Tagged , , , , , , , | 7 Comments