Friday, November 23, 2012

Reinstalling an Oracle Database Appliance Part 3

An Oracle Database appliance is a set of standard hardware and software molded together to created a 2 node RAC cluster that is easy to deploy. In parts 1 & 2 i talked about what methods you can use to reformat or erase the Oracle Database Appliance and rebuild it. In this post  i will talk about 2 methods to complete a deployment on the Oracle Database Appliance (ODA).
You can use the GUI tool oakcli deploy that will walk you thru all the steps and let you add all the IP's and then do the deploy.
You can use the Oracle Appliance Kit offline configurator to generate the conf file and then either run  oakcli deploy to quickly validate all the information and runa graphical deploy.
The Oracle Appliance Kit Offline Configurator is available at the Oracle Technology Network ODA Page .  The Offline configurator is an exact replica of the oakcli deploy tool except it can be done on your laptop so you dont have to type all the info on the server. The Offline Configurator allows to save a text file in the below format.
#onecommand.params generated by GUI tool
# Confuration information


DbNodeArr=(ALL )

This text file contains a complete snapshot of the ODA being Built. Below is how the ODA configurator looks like.

Once the file is loaded you can go thru a standard GUI deployment.
The Second method which is very useful to deploy an ODA is the silent method. you can use the text file generated from the ODA offline configurator and copy the config file

./oakcli copy -conf /software/test11_12.txt
Successfully copied the config file!!!

Once the config file has been copied you list what the steps are

[root@oak1 onecmd]# cd /opt/oracle/oak/onecmd
[root@oak1 onecmd]# ./ -l
INFO   : Logging all actions in /dev/null and traces in /dev/null
INFO   : Loading configuration file /opt/oracle/oak/onecmd/onecommand.params...
The steps in order are...
Step  0 = ValidateParamFile
Step  1 = SetupNetwork
Step  2 = WriteNodelists
Step  3 = SetupSSHroot
Step  4 = SetupDNS
Step  5 = UpdateEtcHosts
Step  6 = SetTimezone
Step  7 = SetupNTP
Step  8 = SetupILOM
Step  9 = ValidateEnv
Step 10 = CreateUsers
Step 11 = SetupStorage
Step 12 = SetupSSHusers
Step 13 = InstallGIClone
Step 14 = RunGIClonePl
Step 15 = RunRootScripts
Step 16 = GIConfigAssists
Step 17 = CreateASMDiskgroups
Step 18 = InstallDBClone
Step 19 = RunDBClonePl
Step 20 = DbcaDB
Step 21 = SetupEMDbControl
Step 22 = SetupACFS
Step 23 = SetupTFA
Step 24 = SetupASR
Step 25 = ResecureMachine
[root@oak1 onecmd]#
It is very important to validate how many steps are there since Oracle can change the number between the versions. The above is a snapshot of ODA 2.4 Steps. you can decide to break down the number of steps run this in debug mode in which case you will have interaction on some steps. or just execute via a shell script
[root@oak1 onecmd]# ./ -r 1-25

This will execute the ODA deploy in non GUI mode with all logging happening as normal.
This concludes this 3 part series on how to reinstall an Oracle Database Appliance. Please feel free to ask any questions regarding the ODA and i will try to the best of my knowledge to answer them

Reinstalling an Oracle Database Appliance part 1 Reinstalling an Oracle Database Appliance Part 2

Tuesday, November 20, 2012

Restoring a Database with Rman Controlfile Parameters

There are occasions when you recieve a complete backup of a database from a  place different then yours and have to do a restore. normally a restore is simple . put the files in a directory run rman catalog on them and you are done. but what if you have rman configuration parameters stored in the controlfile and you are trying to duplicate the database. During a duplicate rman will restore the controlfile and then use the parameters associated in the controlfile for the next steps.
I hit this issue when the db i was trying to duplicate  has sbt_tape parameter and the host i was trying to duplicate on  has no MML configured to it.
After trying a couple of times with no luck. I opened an SR and got a response from a very helpful Oracle Support guy (even on Sev 3).
Below are the procedures i followed to solve my rather simple problem.
1. Startup the auxiliary database in nomount
2. Restore the controlfile from the autobackup piece
RESTORE CONTROLFILE FROM '.... location and name of the autobackup piece ...';
3. Mount the database:
4. Clear the SBT related configurations, CHANNEL and DEVICE - Do a show all and make sure there are no parameters that you might have an issue with
See the RMAN reference guide under CONFIGURE for details on how to do this.
5. In SQLPLUS backup the controlfile:
ALTER DATABASE BACKUP CONTROLFILE TO '/location/of/backups/control.dbf';
6. Startup the auxiliary database in nomount
7. Move the controlfile autoback piece out of the backup location
8. Run the Duplicate, which now will use the controlfile copy we created with correct RMAN configuration.

I was unaware of doing something this way and i guess its good to learn something new everyday.

Thursday, November 15, 2012


To install an new EM12c environment it is highly recommended you run the emprereqkit  utility . This utility is accessible thru the installation binaries  in the $SHARED_SOFT_PATH/ directory. if you are running a prereq check via a shared mount point . you might hit an error like the one below. This error happens if you ran an emprereqkit   on another environment and never completed all the tasks.

Following exception occured in EMPrereqKit
Calling sequence (top to bottom)
--level 1--------------------------------------
Class/Method: EMPrereqKitManager/getInitialState
Message     :  Please end the session in last db (runPrereqs, runCorrectiveActions, runPostCorrectiveActions). Then only you can start a new session at a new db

         at oracle.sysman.emdrep.emprereqkit.emprerequisitemanager.EMPrereqKitManager.getInitialState(
         at oracle.sysman.emdrep.emprereqkit.emprerequisitemanager.EMPrereqKitManager.processActionsList(
         at oracle.sysman.emdrep.emprereqkit.emprerequisitemanager.EMPrereqKitManager.executeMainOperation(
         at oracle.sysman.emSDK.emdrep.emprereqkit.EMPrerequisiteKit.executeMainOperation(
         at oracle.sysman.emdrep.emprereqkit.core.EMPrereqKit.main(

 Caused by: null

empreqkit creates a state file that keep tab on the state of the job.
the Statefile is created in $SHARED_SOFT_PATH/
a cat of the statefile will show something like this

If this state file is there it will not  allow you to run a seperate session until either the old session on the old database server  is completed or the statefile is removed or renamed.

Tuesday, November 06, 2012

Reinstalling an Oracle Database Appliance Part 2

This is the second post in the series for Reinstalling the Oracle Database Appliance. In the last post i discussed using Bare matal install to reimage the ODA and perform a new deployment. In this post i will talk about is a utility provided by Oracle as Part of the Oracle Appliance Kit (OAK). This utility performs the following

The Cleanup Steps are the following:

    1. uninstall ASR
    2. de-install All Oracle Software except the Oracle applicance Kit and the OS
    3. Cleanup Disk
    4. drop all users
    5. rollback various system configs
    6. remove public and private IP info

The script is available in /opt/oracle/oak/onecmd directory and will  ask you to confirm 

[root@oak1 ]# ./

Please enter the root password for performing cleanup:
Re-enter root password:
About to clear up OAK deployment,public network connectivity will be lost,root password will be set to default and both nodes will be rebooted
Do you want to continue(yes/no):

This will cleanup all the software on both the nodes. Please note while the OAK software will remain. you will lose access to the box since the public IP will be wiped out. you will need to access the ILOM and remote console in to reconfig the IP's on both nodes 

./oakcli configure firstnet
This will allow you to either further patch the system or run a deployment .
The difference between the vs Baremetal can be attributed to 2 main things and while both must be used with caution and provide loss of data. Cleanupdeploy will not format the root filesystems so anything not on shared disk is preserved but will keep the old version of the OAK software in tact. Bare Metal restore on the other hand will wipe out everything but will also give you the software version you need. For new deployments if your intention is to go to 2.4 and your ODA is running version 2.1 my recommendation would be to do a Bare metal prior to deployment. The will help in redploy an ODA for cases like moving from HIGH redundancy to NORMAL redundancy if you have not yet deployed an ODA or of you want the additional space and have something like Dataguard to failover you database . rebuild the ODA and fail it back.

In the 3rd Part of this series i will walk thru the deployment process and how to do deployment manually or via the OAK Configuration Assistant.

Reinstalling an Oracle Database Appliance part 1 Reinstalling an Oracle Database Appliance Part 3

Sunday, November 04, 2012

Reinstalling an Oracle Database Appliance Part 1

Oracle Database Appliance comes with factory installed software. If you need to reinstall or reimage the ODA you can do that using a couple of methods. I'm going to have  series of posts talking about reinstalling and redeploying an ODA using various methods
A reinstall needs to start with cleaning up
There are 2 methods for cleanup..
  1. Using a Bare Metal Install
  2. Using
A Bare metal Install is done by downloading an ISO from the MOS. The latest 2.4 ISO can be downloaded Here.
While there is a complete document available via Note. 1373599.1. 
I will give a brief synopsis of what is needed. A Bare install needs to be done per node and the instructions are the same. Please note a bare metal install will format all disks. All data will be lost. All instructions here will cause loss of data and should be done with extreme caution.
  1. . Download the 2.4(or version you need) ISO.
  2.  Login to the ILOM 
  3.  Go to the Remote Control tab and launch remote control.
  4.  In the java window that opens Select Devices --> Cdrom Image
  5. Select where the image resides on your laptop and click ok. This will map the cdrom image to your device
  6. Once the mapping is confirmed . go to the ILOM Remote control tab - >Host Control  and Select Cdrom as the next boot device
  7. In the Remote Control -->Remote Host Control  Select Power Cycle and OK
  8. This will reboot the node and start the install process. 
  9. If you are installing over a network. Please make sure not to disconnect until the install is completed.
  10. The reimage process can take between 1 to 2 hrs  to complete.
  11. After the reimage is complete.  the node is now akin to a factory installed node for the version you just imaged on.
  12. Follow the same steps to image the second node . Both nodes can be imaged in parallel.
  13. The ILOM and Bios are not impacted and a deploy/patch will need to be run to get the ILOM/BIOS to update.
  14. Run a ./oakcli configure firstnet to IP and bring the node on the public network
  15. Follow the steps in the read-me of the End user bundle to deploy the ODA.
 In the next post I'll talk about and how you can run a cleanupdeploy to reinstall the ODA.

Reinstalling an Oracle Database Appliance part 2 Reinstalling an Oracle Database Appliance Part 3

Friday, November 02, 2012

Oracle Database Appliance (ODA) Patch 2.4 is out

This is just a post ot point out that ODA Patch 2.4 is out. ODA Patch 2.4 requires 2.2 or above to install.
A couple of Highlights of this release seem to be
  1. Enhanced odachk 2.16
  2. A trace file analyzer 
  3. The ability to now use normal redundancy for DATA and RECO diskgroups
The ability to double mirror instead of triple mirror move the ODA's capacity from 4Tb to 6TB and is a choice in the offline configurator
if you have an old deploy file you can load it in the 2.4 Offline configurator by changing
I will play around with the trace file analyzer to see what it brings to the table.

Google Search