Blogs

Oracle 12c & 19c Home Provisioning

By Carlos Cuellar posted 01-17-2019 08:41:34 PM

  

 This is a follow up for article https://community.delphix.com/delphix/topics/delphix-oracle-home-provisioning-overview
where it’s explained in detail how Delphix has various capabilities of provisioning Databases including Application binaries. There is tested that Oracle Homes can also be provisioned in a similar manner to VDB’s.

 

But Oracle 11g Binaries were used in previous article and we wanted to test with Oracle 12c and 19c Binaries too to confirm this capability.

 

Here we will walk through the entire process in a Single node with standalone configuration.


Oracle Home Provision

As in the previous note, in order to provision Oracle Home, you have to make sure that Source and Target Environments have same physical characteristics, with respect to OS Version, make and model. Also, Provisioning Mount Point on the Target should not be a Symbolic Link.

There are 2 prerequisites for this process to work:

1. - Oracle RDBMS owner needs to be added in both source and target environments:

2. -  You need to make sure that Oracle has privileges to write to  Delphix user OS home.

Here you have the steps below describe the process of Oracle RDBMS 12c Home Virtualization and Provisioning:

1.     Login to Delphix GUI as delphix_admin (or admin user when installing  5.3.0 version or newer) user.

2.     Go to Manage-> Environments

3.     Select the Source Environment, which will be used for Oracle Home provisioning.

4.     In the Source Environment Page, click on Databases on the right side top of the screen.

5.     Select the Dataset Home Type as Unstructured Files and enter the correct path of Oracle Home that will be used for Oracle Home provisioning (Make sure to select Oracle RDBMS binaries owner as user to run this process):


Once done, this will create a new Source of Unstructured Files in the Source Environment:


6.     Go to Manage -> Databases -> Add dSource to add the Oracle binaries home as a dSource.

Under Advanced>> option, you can include all the paths to be excluded in the dSource.



Executable owned by root cannot be provisioned. Delphix recommends to exclude oradism, extjob, jssu under $ORACLE_HOME/bin and externaljob.ora under $ORACLE_HOME/rdbms/admin . Log/Trace files under $ORACLE_HOME/rdbms/log and $ORACLE_HOME/network/log are also candidates for exclusion as they don’t consume unwanted space:



7.     In the Next Screen, give a name for this dSource and choose the Target Group:



8.     Moving forward on the wizard provisioning process, you can select Snapsync Policy and create Hooks depending on the requirements.



9.     Once done, a dSource of vFiles for Provisioning Oracle Home will be created. This dSource can be provisioned to Target as the new Oracle Home using regular VDB provisioning techniques. You can take Snapshots as appropriate. Patching activities would definitely be a Use Case where Snapshots are taken before and after the software upgrade and you can keep a binaries library where you can identify when patches are applied and maintain them in case they are required.

10.   To Provision Oracle Home, expand the dSource. Click on Provision in the main page. Select appropriate environment on the left side. Enter correct path for the Mount Point (Mount Point to be created in target and owned by Oracle RDBMS user). Make sure the path is not a Symbolic Link. And make sure you select Oracle RDBMS user to run this process.

 

11.   In the Next Screen, provide proper name for vFiles Name. Choose correct Target Group and Snapsync Policy.

12.   In the Next Screen, add a Configure Clone Hook for Run Shell Command Type for attaching Oracle Home to the Central Inventory. We used as an example the attachHome script provided by Oracle located in $ORACLE_HOME/oui/bin which is as follows:

#!/bin/sh

OHOME=<MOUNT-POINT-PATH-ENTERED-IN-STEP-10>

OHOMENAME=<Name for Oracle Home in Inventory>

CUR_DIR='pwd'

cd $OHOME/oui/bin

./runInstaller -detachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $* > /dev/null 2>&1

./runInstaller -attachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $*

cd $CUR_DIR

mkdir -p $OHOME/rdbms/log

mkdir -p $OHOME/network/log

 

For Example:

#!/bin/sh

OHOME=/mnt/provision/oraclebinaries

OHOMENAME=Ora12ctest

CUR_DIR='pwd'

cd $OHOME/oui/bin

./runInstaller -detachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $* > /dev/null 2>&1

./runInstaller -attachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $*

cd $CUR_DIR

mkdir -p $OHOME/rdbms/log

mkdir -p $OHOME/network/log

 

You can see that we are also creating back the network/rdbms and network/log folders because we excluded them from the ingestion process.

Also add a PreStop hook to detach the Oracle home(that will be useful when deleting this vfiles dataset) as follows:

#!/bin/sh

OHOME=<MOUNT-POINT-PATH-ENTERED-IN-STEP-10>

OHOMENAME=<Name for Oracle Home in Inventory>

CUR_DIR='pwd'

cd $OHOME/oui/bin

./runInstaller -detachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $*

cd $CUR_DIR

 

For example:

#!/bin/sh

OHOME=/mnt/provision/oraclebinaries

OHOMENAME=Ora12ctest

CUR_DIR='pwd'

cd $OHOME/oui/bin

./runInstaller -detachhome ORACLE_HOME=$OHOME ORACLE_HOME_NAME=$OHOMENAME $*

cd $CUR_DIR

 

13.   Complete the provisioning process by clicking Finish.

14.   Once the provisioning process completes, Oracle Home will be made available on the Target Environment. One can also verify the Central Inventory Contents for Hook updates.

·       Under the Mount Point directory used for Provisioning, check for oraInst.loc file.

·       inventory_loc would point to the Central Inventory Location.

·       Go to ContentsXML directory under Central Inventory Location. Check inventory.xml file for relevant updates of the new provisioned Oracle Home.

For the above Example, one would find the following entry (IDX may vary depending on number of Oracle Homes)

<HOME NAME="Ora12ctest" LOC=" /mnt/provision/oraclebinaries " TYPE="O" IDX="1"/>

 

 

Example:

Refresh the Environment to make sure that the Provisioned Home is now reflected in Delphix. Go to Manage->Environments and pick the right environment and click on the refresh icon:

With this we have completed virtualizing Oracle 12c binaries. Now we can provision vDBs using the newly virtualized binaries.

 

Here is one example when provisioning a vDB on the environment where the virtualized binaries have been provisioned previously:

After provisioning the new vDB, you can confirm the binaries used for it by selecting the vDB, going to Configuration tab and then on Source tab looking into Repository value:





#Virtualization

0 comments
35 views