Wednesday, April 11, 2012

Oracle Internet Directory (OID) 11g: Part III - Schema Installation

This is part II in the series I started on installating and setting up OID11g (11.1.1.5.0) which is part of Oracle Fusion Middleware 11g and in this case licensed under Oracle Directory Services Plus. Please check my previous posts on licensing and requirements for those details. For this posting I'm assuming you've already created a certified repository database and are now ready to install and setup the OID schemas. In my case I created an 11.2.0.3 EE single instance database repository using ASM for storage management. Check my blog entries for details on installing and setting up Grid Infrastructure, and installing and creating a database. Yes, I know these are shameless plugs for additional page views and I would also appreciate you clicking on a few advertiser links while there as well, thanks!

The OID 11g installation will no longer create a repository so this must be done upfront. You do have the option of setting up the schemas but using the Repository Creation Utility or RCU upfront is recommended. RCU is a tool to create the repositories scheams for various Fusion Middleware tools, which in this case we will be using it to create schemas required for OID and DIP (Directory Integration Platform). What is RCU exactly? It is effectively the replacement in FMW 11g for the Oracle Application Server 10g Metadata Repository Creation Assistant (also known as MRCA or RepCA). The documentation will tell you that RCU can be downloaded from MOS, OTN and Oracle e-Delivery Cloud but for me it was a bit difficult to locate the actual download except for the latter, i.e. Oracle e-Delivery Cloud, so this is where I'd recommend searching to save time and effort. The RCU version must match the version of FMW or rather OID that you intend to use, which in my case is 11.1.1.5.0. I prefer command line installations since they can be scripted and run without user interaction so I'll start out with that method and show the GUI interactive method following.


Setup
1. Extract the download to a staging directory and export the location to your environment as RCU_HOME:

$> export RCU_HOME=/tmp/stage/rcu

2. RCU is apparently a 32-bit installation and requires a 32-bit OS to install but it is possible since 11.1.1.4.0 to install from a  64-bit OS:

$> set linux32 bash

Method 1 - Using Command Line in Silent Mode

3. Create a text file which contains the various passwords in sequence of being prompted:

$> vim rcupwd.txt
sysP#ssw0rd
odsP#ssw0rd
odsP#ssw0rd

The first password is for SYS, the second and third are for the Oracle Directory Services or ODS schema. It is repeated since there are two prompts for this user's password.

4. I prefer to use ASSM for my tablespaces but by default RCU does not create all the required tablespaces for the schemas as such. A bit curious given Oracle's constant recommendations on this front but not completely unexpected if you've done repository installations before. Modify file $RCU_HOME/integration/oid/oid_Storage.xml replacing as shown below:


      <TablespaceAttributes NAME="OLTS_BATTRSTORE" >
      <AutoSegmentSpaceManagement>false</AutoSegmentSpaceManagement>
...
    <TablespaceAttributes NAME="OLTS_SVRMGSTORE" >
      <AutoSegmentSpaceManagement>false</AutoSegmentSpaceManagement>
TO
    <TablespaceAttributes NAME="OLTS_BATTRSTORE" >
      <AutoSegmentSpaceManagement>true</AutoSegmentSpaceManagement>
...
    <TablespaceAttributes NAME="OLTS_SVRMGSTORE" >
      <AutoSegmentSpaceManagement>true</AutoSegmentSpaceManagement>


This ensures all TBS are created with ASSM as the database default of local extent management will be picked up. You may need to modify the extend sizes for the DBF manually after installation to ensure all extents are spread across all ASM disks for your AU size.

Installation
5. Run the RCU installation:

$> cd $RCU_HOME/bin
$> ./rcu -silent -createRepository -databaseType ORACLE -connectString [orads01.mydomain.lab:1521:dsrep.mydomain.lab] -dbUser sys -dbRole SYSDBA -component OID -variables RCU_LOG_LOCATION=/tmp -schemaPrefix LAB -f < rcupwd.txt
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites

Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
Percent Complete: 35
Percent Complete: 29
Percent Complete: 91
Repository Creation Utility: Create - Completion Summary
Database details:
Host Name                       : orads02.mydomain.lab
Port                            : 1521
Service Name                    : DSREP.MYDOMAIN.LAB
Connected As                    : sys
Prefix for (non-prefixable) Schema Owners : DEFAULT_PREFIX
RCU Logfile                     : /u01/app/rcuHome/rcu/log/logdir.2012-01-24_13-37/rcu.log
Component schemas created:
Component                       Status  Logfile
Oracle Internet Directory               Success /u01/app/rcuHome/rcu/log/logdir.2012-01-24_13-37/oid.log
Repository Creation Utility - Create : Operation Completed

You can get the meaning of the various arguments I've used from the RCU documentation but they are pretty self explanatory.

Method 2 - Using the GUI

1. Issue the command:

$> $RCU_HOME/bin/rcu

rcu_oidschema-01

On the welcome screen, click "Next".

2. Select "Create" for creation of the schemas:

rcu_oidschema-02

3. Input the connection details into the appropriate fields, as shown in the screen shot:

rcu_oidschema-03

RCU will verify the information by making a test connection while also verifying that the database requirements are met to act as a repository:

rcu_oidschema-03b

4. Select the components to install, which is "Oracle Internet Directory". I also chose the "Directory Integration Platform" in my case though this is not shown in the screen shots.

rcu_oidschema-04

RCU checks that the component prequisites are okay.

rcu_oidschema-04b

5. The tablespace mapping is shown. I suggest leaving the defaults with the possible exception of the temp changed if needed (I changed mine to TEMP). You can manage the settings (such as ASSM and so on) via clicking on the "Manage Tablespaces" button.

rcu_oidschema-05

A confirmation box is displayed informing any non-existent tablespaces are about to be created, which is followed by another completion confirmation box:

rcu_oidschema-05b

rcu_oidschema-05c

6. The summary screen is displayed which indicates you are about to begin creation of the schemas:

rcu_oidschema-06

7. Once completed summary completion screen is shown:

rcu_oidschema-07

At this point setup of the OID repository is complete and you can move on to the installation of WebLogic or OID software which I will demonstrate in another blog entry. The sequence does not matter since only the software for OID will be installed (and patched), however, the WLS piece and all other pre-requisites (DB repository) should be in place prior to starting OID configuration.