A year back, following the Oracle’s blog, got excited and got engaged with a tedious task to setup a Vision instance for Oracle R12 12.1.3 using the templates.

Against all the warnings and negative responses, I did manage to setup Oracle VM Manager and other repositories using Oracle Virtual Box and put the Vision instance online.

The efforts were unjustified as the tasks involved were supposed to be carried out by a seasoned DBA with advance level Linux knowledge. Apparently I lost the appetite to continue with the solution and discarded the entire setup along with the data repositories.

which explained a different approach towards setting up a Vision instance using the same Oracle templates for R12 12.1.3 and decided to give it a try.

I must say, John Piwowar @ pythian has put everything in place, so that a novice like me could follow the instructions without making any kind of mistakes and get the vision instance up and running.

Once the vision instance was up and running, I started wondering whether I could try something further. Oracle’s template based approach was involving two independent virtual machines serving two different roles

One server providing the database node

Second server providing the application node

At work I am used to deal with a single server hosting both database and application nodes which makes few things like server administration, OS patching etc easier.

Hence I started pondering the possibilities of merging both database and application servers into a single server.

Right now, after around 48 hours, I have successfully managed to merge both the nodes into a single server (virtual) and online with the Vision instance & I am going to share the entire procedures in detail so that you can also!

PART-1 Collect and arrange your stuff

Minimum Requirements

A desktop/laptop machine with minimum 4GB free RAM for the virtual machine. That means you must have 6-8GB base memory

Loads of free storage space. If your fixed disk doesn’t have minimum 500GB free disk space, I recommend you to buy a 1T external HDD (the read/write speed may be compromised, USB3 could be a minor exception)

Access to a very fast internet connection to download the templates from Oracle e-delivery portal

You have to download 11 files, 38GB by continuing

Pythian post describes a method to use wget to download all the files listed, using a file list input parameter, from a OSx/Linux host.

I downloaded the above files from a Windows machine, and must say it was a painful process.

PART-2 Convert the template files into .img and then .vdi files

I am not going to repeat the steps which are already clearly narrated with pythian article. Only suggest that, don’t use a Windows machine and 7zip to do all the unzip and joining the files. You use a Linux Virtual machine to do those jobs. It would be faster, and it would be the best. I created a Oracle Linux 6 VirtualBox to do those jobs by sharing the downloads folder with the Virtual Machine.

PART-3 Backup everything!

So once the img files are converted as .VDI files, the most import thing is to backup the .VDI files to somewhere else! Yes, you may corrupt the sources available inside the .VDI files while attempting to setup the Vision instance. If you don’t have a backup, you have to go through the painful process of unzipping, combining and converting the .img files to .VDI formats. Trust me, this exercise could easily run into 4-6 hours time, depending upon the efficiency of your hardware.

PART-4 1st Gear, slow start

Create a folder called “myvision” (name it anything)

Copy both System.vdi and ebs1211db.vdi (While converting the .img files I gave the .VDI files the same image names) from your database template folder or backup folder to “myvision” folder

The actual size of ebs1211db.vdi over Windows environment will be approximately 220GB, which will be few GB smaller over Linux environment.

As we are planning to host both the dB and Application tier from a single server, we MUST increase the size of ebs1211db.vdi

Let me explain why, prior going ahead

Oracle’s approach towards the VM setup was purely involving two servers(virtual) and both database & application files are placed on /u01 mount point

ie, Database server has a mount point called /u01 and so does the application server

All the clone scripts available for both database & applications servers have certain scripts hardcoded with /u01 as base path. Hence, one could get into useless activities of editing scripts to change the hardcoded base path values to adjust the cloning (Which was done successfully)

Release ebs1211db.vdi from the Gparted Virtual Machine. Let us start creating a Virtual Machine using Oracle’s VirtualBox. Please note we are using the latest version of VirtualBox, if you are not, please update prior you move ahead with rest of the exercises

Please check the VM configurations I made for my Vision Instance Server with the below image

You can see that I have attached both System.vdi & ebs1211db.vdi files under SATA

Now, most important: You must have a .iso image or a physical DVD/CD for a recent release of Oracle/CentOS/RHEL linux, as we have to alter few attributes of the Virtual Machine we are going to put online.

Oracle has created the VM compiling a XEN kernel, which will not work under VirtualBox & you will fail to boot your Vision Instance VM, unless the kernel pointers are changed and recompiled.

Don’t worry it is pretty easy

Follow pythian article until the new kernel installation part

If you have just downloaded the templates from Oracle, you have the latest release of Oracle Linux embedded with System.img/.vdi file, and you don’t have to install a new kernel.

As root

#rpm –qa | grep kernel

If your uek kernel version matches as one provided with the image or higher, you can safely move ahead with creating a new initrd entry. As root issue the following command

If you were following pythian post attentively, your new virtual machine MUST boot, without throwing any errors and prompt you for a login

The default password for root is “ovsroot”

I hope you did change the /etc/fstab entry for “/u01” mounting point prior rebooting the server as mentioned last time and that you have changed the

/etc/sysconfig/oraclevm-template entry to RUN_TEMPLATE_CONF=YES

If you haven’t, please do & restart the Virtual Machine. Optionally you can set a static IP to your box, so that you can start using a ssh client like putty, which will genuinely make many things easier while setting up the server at later stages.

Once the server restarted, you will notice that Oracle will automatically start the cloning process based on the “RUN_TEMPLATE_CONF=YES” entry

Throughout, we were using a hostname “appvis”, hence all the instructions, workarounds will utilize the same hostname. Please adjust the hostname according your preferences

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 42

Make a note of the System Port Pool you have entered here, as we must use the same while setting up the Application tier, in order to establish a connection to the database & perform the cloning process

Sit back and let the cloning process for database to complete. It may take a while. Once the cloning process is over, the database will be started.

After a successful completion of cloning, the server will come back to a logon prompt

login as “oracle” and the default password is “oracle”

You will be asked to change the password for user oracle and APPS, ignore the prompts this time.

PART-7 4thd Gear, Free on the roads, hacking the Application tier

As I mentioned, what we are going to do is a pure hack, against Oracle’s design structure.

The first step is to create a soft link, which is mandatory for cloning the Application tier

This error is caused by missing “adautocfg.sh” file in the folder /u01/E-BIZ/inst/apps/VIS_appvis/admin/scripts which the auto configuration tries to access.

Without this file in this particular directory, the cloning process will never complete successfully. So we have to find a solution for it (I am not a APPS DBA and genuinely do not have any idea why the heck this file is missing in this particular location. All I could do is a guess work and it is towards avoiding the oracle template configuration wizard part, which initiates few functions. I’ll check it one of the following days and update this post accordingly)

As root

#cd /u01/E-BIZ/inst/apps/VIS_appvis/admin/scripts#touch adautocfg.sh

#vi adautocfg.sh

and paste the following (Yes you can do it, just change the VIS_appvis with your CONTEXT name)

#!/bin/sh# dbdrv: none

## $Header: adautocfg_ux.sh 120.4 2008/02/19 04:28:02 sbandla ship $## ################################################################# This file is automatically generated by AutoConfig. It will be read and# overwritten. If you were instructed to edit this file, or if you are not# able to use the settings created by AutoConfig, refer to Metalink Note# 387859.1 for assistance.## ###############################################################

The cloning process must complete without throwing any further errors and you will be asked whether the application should be started by the end of the cloning process. You can go ahead with starting the application tier.

However, you will notice, the apache HTTP will fail to start, as the CONTEXT FILE will have entries, which were not properly put in place during our last clone process as it has ended up with a FATAL error.

Let us edit the CONTEXT file and correct those entries now.

(This situation arises only if the cloning is done as user root)

As root

#vi /u01/E-BIZ/inst/apps/VIS_appvis/appl/admin/VIS_appvis.xml

Search for the string

/s_appsuser

replace s_appsuser values “root” with “oracle” and s_appsgroup with “oinstall”

Incase if you are not sure about the http port, open up “VIS_appvis.xml” CONTEXT FILE and scan through, you will find it with url address area

Use sysadmin/sysadmin to logon and enjoy!!!

PART-8 5th Gear, Smooth Sailing, Restarting and online

As a system administrator I literally don’t like the idea of starting resource hungry services until the boxes are completed booted up and online. I prefer to start certain services myself and make sure that whatever were started manually completed the startup process successfully.

As root switch to “/etc/init.d” folder

chmod –x ebizdb

and you are done! The database will not startup next time while you are starting your Vision instance.

I personally prefer to have a proper GUI, coming from an entirely Windows environment, that is a MUST for many times, regardless whether I am working with Linux or Windows systems

Here are the few things I have done to get the GNOME desktop installed with the basic Oracle linux Server embedded with the Oracle VM templates for Oracle R12 12.1.3

(Please make sure, from your Oracle linux box you have access to internet. Do you a ping www.google.com and confirm you are getting replies)

(Please shutdown both database and application prior proceeding)

(Please increase the size of System.vdi file PRIOR experimenting with any of the below exercises, and be careful while you would use Gparted to do it. Make a backup for system.vdi file and follow the thread provided above with the post to resize the partition (it is easy, I assure))