Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

Oracle

Posted May 27, 2009

VMware and Oracle Setup Examples - Part 2

By Steve Callan

In the last article, covering the installation of Oracle9i on Windows 2003 Server on VMware Workstation, we saw how a virtual machine application could make creating what appears to be an odd environment fairly easy to accomplish. Why spend time building an Oracle9i environment, you may ask. The fact is that not every business using Oracle has moved out of the relative dark ages with respect to versions of the RDBMS. If you have the opportunity to attend a user's group meeting, a common question for the audience is to show by a raise of hands which versions are being in used. Version 8.1.7.4 is alive and well, and so is the occasional 7.3.4. Plenty of 9.2.0.X is around, along with a lot of 10gR2, and a sprinkling of 11g.

Sometimes, the database is part of something larger. Case in point: E-Business Suite. Versions 11.5.9 and 10 shipped with release 9.2, and just because you’re not upgrading to R12 does not mean you cannot upgrade the database tier to 10g before you get around to the R12 upgrade (which comes with 10g). The point here, especially for relative beginners, is that you are not limited to only knowing the release you started learning with. You can go back in time if need be.

Installing Oracle Enterprise Linux

There are plenty of examples available on the Internet on how to install Oracle Enterprise Linux. Some of them go into detail about the required packages, but few give a 100% accurate list of the RPMs on the five OEL5 disks. The first indication that an rpm is missing is during the startup of Oracle Universal Installer via the runInstaller script. The typical error has to do with a missing shared object file. You would think, of course, that since Oracle Corp. is furnishing this release of Red Hat that it would have been a bit more specific about what it takes to make the OEL distribution install ready for the RDBMS. Even if you select all optional features, you still need to do some extra work. One of the quick fixes is to install the libXp package found on disk 3. I mention this because Oracle somehow manages to provide a working VM template with this combination of OS and RDBMS.

Aside from getting over the making OEL install ready, the running of OUI and the creation of a seed database is pretty straightforward. The VMware settings I used to run OEL5, which in turn hosts a 10gR2 database, are:

VMware settings

The total disk space set aside for this includes enough space for the install CDs and the creation of a seed database, and plenty of room to grow the database for testing. The memory allocation of 1GB is good enough, and the rest I let OEL pick up from the host (recall that OEL, as does Windows 2003 in these examples, is the guest). One item you will probably want to change is the host name. If you do nothing (or just accept defaults), you’ll end up with a host name of localhost and a domain name of localdomain. These aren’t very practical settings or values (but they work), so you can change them via the same steps you would to change the host name if you were on a p-machine.

Once the database is installed, open up a terminal window (send a shortcut to your desktop) and start the instance (open the database).

open up a terminal window and start the instance

Within VMware Workstation, you can share drives and folders from the host with your guest OS. If you note the VMware settings screenshot, you can see that a USB controller and a CD/DVD drive are available. This sharing capability opens up many possibilities, a couple of which are the staging of traditional dump files from export/import, data pump dump files, and datafiles comprising transportable tablespace sets.

Another feature within VMware is the ability to suspend your session and restore it later. Using that will save a good bit of time as compared to performing a “server” startup during power on.

Connecting Windows to Windows

In the last article, Oracle9i on Windows 2003 Server was installed in the workstation. Can you connect, as in an Oracle Net Services kind of way, the guest database to a host database? In this example, the host database is Oracle 11g, running on Vista Business.

The two-way (or can be one-way, that’s up to you) configuration setup to establish connectivity between a database on the host and one on the guest is nothing more than the standard TNS drill of editing the tnsnames.ora files on both ends.

On the 11g/Vista Business end, after a typical default installation, the tnsnames.ora file will contain something similar to:

# tnsnames.ora Network Configuration File: 
E:\app\oracle\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCL11 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = W500)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl11)
    )
  )

Add the stanza, which defines the connection to the SID or service on the guest system.

To test connectivity (e.g., going from the host to the guest), use ping and tnsping. The example below shows the results of testing from the host to the guest. This test is nothing new, but serves as a proof of concept.

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Steve>ping w2003

Pinging w2003 [192.168.66.247] with 32 bytes of data:
Reply from 192.168.66.247: bytes=32 time<1ms TTL=128
Reply from 192.168.66.247: bytes=32 time<1ms TTL=128
Reply from 192.168.66.247: bytes=32 time<1ms TTL=128
Reply from 192.168.66.247: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.66.247:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\Steve>tnsping orcl

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 22-MAY-2009 04:49:51

Copyright (c) 1997, 2007, Oracle.  All rights reserved.

Used parameter files:
E:\app\oracle\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = W2003)(PORT = 1521)) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (10 msec)

The IP address you see may have subnets or octets you don’t normally see on a home network (66.247 in this case), which is typically of the form 192.168.0.X, with “X” ranging from 1 to however many devices (laptops, desktops, printers, print servers, router, Xbox, etc.) you have installed.

Connections in general

One thing to be cognizant of is to not set yourself up for failure by trying to span too many versions. This is true regardless of VMware usage. In other words, version X may be too new (or old) to connect to version Y. The chart below (extracted from a MetaLink note) should give you a pretty good idea as to what the spanning tree looks like.

chart extracted from a MetaLink note

Individually, the version of Oracle you install may work in the guest OS you configured, but it doesn’t necessarily mean you will be able to connect to every other version.

The possibilities are almost limitless

Listed below are some of the features, options, and possibilities you can explore by using VMware.

  • Traditional export/import
  • Data pump
  • Transportable tablespaces
  • Database links
  • RAC
  • Data Guard/standby database
  • Oracle Net Services
  • GRID Control
  • Testing upgrades and patching, and being able to replay a session
  • Taking a snapshot of a session for rapid restore
  • Moving or replicating environments/snapshots between servers

In general, the list includes just about anything you can do to go between different versions or Oracle and between different operating systems.

Another option at your disposal is to use partitioning – the OS kind, not the Oracle table variety. PartitionMagic (from Symantec, and at a cost) and GParted (freeware from Gnome) are examples of disk partitioning tools, but these aren’t for the faint of heart when it comes to what is impacted during their use, namely, they alter your computer’s boot up process. Another limitation is that you are generally limited to using one OS at time, as opposed to what VM allows, which is multiple operating systems running concurrently.

In closing

In short, having VMware (or any virtual environment) at your disposal provides the ultimate sandbox. As long as you have a “safe” point or state to return to, it is practically impossible to permanently break anything. As a DBA, especially when it comes to Oracle, you can’t have too much experience when it comes to knowing multiple operating systems and versions of the RDBMS (and associated products too for that matter). Many companies are adopting VM full steam ahead, so add knowing how to use a few VM applications (VMware, ESXi, Oracle, etc.) as part of your repertoire.

» See All Articles by Columnist Steve Callan



Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM