Monday, July 30, 2012

Custom RPM's on a Oracle Database Appliance

Oracle Database Appliance comes bundled with a lot of things but there are still time when you will need to install custom RPM's to enahnce some of the capabilities of the ODA.  Cases might include 3rd party agents that include specific requirements or Oracle open source packages like yast that are needed to manage the ODA from the linux Administration perspective via Enterprise Manager Cloud Control.
Initially when i needed to do this i added a yum repository and downloaded the RPM directly . Oracle Strongly recommends against that practice since it can allow someone to update all the RPM's from the public yum repository or the up2date and cause the Oracle Database Appliance functionality fail.
Oracle has published 2 MOS notes detailing the 2 recommended methods to get RPM's from the oracle repositories

Method 1. 

Note ID 1461818.1 describes the process to download the RPM's to a different linux server which should have the same architecture and kernel and then copy them to the Oracle Database Appliance for install . This methods sets up the public yum repository on the alternate server and using

   yum install --downloadonly --downloaddir="directory_path" "rpm name"

This methods allows for download of the rpm  which can then be copied onto the Oracle Database Appliance and applied. If you have multiple Oracle Database Appliances this is an ideal way to download once and apply to many . This will also allow you to  be able to catalog the RPM's since you might have to uninstall the RPM's prior to an ODA Patch install.

Method 2

The  second method is described in MOS Note  ID  1461798.1. This Notes explains how to download RPM's directly onto the ODA. Oracle Strongly Warns against a couple of things here
  1. Do not set the yum repository directly on the database appliance 
  2. Try not to install RPM's with complex dependencies since a rollback will be complicated
  3. If not sure what to Open an SR with Oracle prior to installing the RPM's 
Download the zip file from   MOS Note  ID  1461798.1 called ODA
unzip it under /opt/oracle/oak/odarpm   <-- New directory

It will setup the yum repository and test connectivity ot the internet.
If you are usng a Proxy server. you will have to setup the http_proxy variable

export http_proxy="http://proxyserver:port"
  ./getrpm [RPM_NAME]   -- get the rpm
   yum deplist [RPM Name]  -- validate dependencies
   rpm -ivh [/PATH/RPM_NAME] -- Install the rpm
Always catalog all the rpm and their dependencies you have installed since this will complicate the ODA patching process and might cause components to fail. My Personal recommendation to use Method 1. designate a box that is non prod as the primary source of RPM's and deploy to all ODA's from that Box.

Wednesday, July 25, 2012

Oracle Database Appliance Patch 2.3.0 release and new features

Oracle Database Appliance Patch 2.3.0 was just released to the public it seems.
 A couple of things 2.3 is not a cumulative patch if you are running 2.1 you will need to apply the 2.2.0 patch before proceeding to 2.3.0 .
if you have secured your ODA using STIG Implementation Script for Oracle Database Appliance [ID 1461102.1] there is now a step to disable the STIG security.
Database Patching is now Rolling upgradable , Yay

There is  a new
oakcli show databases
to verify database version before and after a patch.
There is also a
oakcli upgrade database
in case you are still on to upgrade  the database.

There are a lot of new features in this patch

Feature #1
Multi-homes and Multi-DB support
Supported versions are and
Feature #2
oakcli create
oakcli create and oakcli delete are used to create and delete new databases and database homes
Feature #3
Db Configuration parameters.
 # oakcli show db_config_params -detail  -- to look at config parameters

  # oakcli create db_config_params -conf newconf  -- to create a config file based for use with oakcli create

Most of the data is from the Readme . I will install it and see how it works out and what other undocumented stuff is in the patch

Wednesday, July 04, 2012

Using Rman Active Duplicate to create a Standby from a standby

There comes a time when you need to find ways to get something done in an innovative manner with as little interruption to the primary as possible. This was the case that i was working on to rehost a database where i had network issues and a standby database available. In comes Rman Active Duplicate.
Rman active duplicate was available in  11.1 and can be used to duplicate a database as well as create a standby . The real kicker was apparently due to BUG 11715084 you will hit an error like below.

channel ORA_AUX_DISK_1: SID=135 device type=DISK
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3002: failure of Duplicate Db command at 02/02/2011 13:28:25
RMAN-5531: a mounted database cannot be duplicated while datafiles are fuzzy

The patch for this bug is available for & . But i had to get  a backport to for AIX. After the patch is installed it is simple to run rman active duplicate.
A sample script is below

 connect target  abc/abc@olddb

connect auxiliary sys/abc@newddb

run {

allocate channel prmy1 type disk;

allocate channel prmy2 type disk;

allocate auxiliary channel stby type disk;

allocate auxiliary channel stby2 type disk;

duplicate target database for standby from active database


   set db_unique_name='newdb'

   set log_archive_max_processes='25'

  set fal_client='newdb'

  set control_files='+DATA01/control01.ctl'


  set fal_server='olddb'

  set standby_file_management='AUTO'

  set log_archive_config='dg_config=(olddb,newddb)'

  set log_archive_dest_1='service=olddb ASYNC valid_for=(ONLINE_LOGFILE,PRIM

ARY_ROLE) db_unique_name=olddb'



Google Search