IN ORACLE MILIEU …

Beyond Knowledge

Understanding AutoConfig

Introduction:

AutoConfig is the tool, which is used to configure oracle application systems. Its basically a perl script with a shell wrapper over it. At present there are more then 300 configuration files and environment files in application system. Whenever a change is made to any of the configuration parameter, the change needs to be propagated correctly to correct configuration and environment files. Managing such changes in such large number of files is really difficult.

Context File:

AutoConfig uses a file called context file, which is used to configure changes. Context file is a XML file having all the parameters of application system. These parameters are part of some configuration file for some services or it may be part of some environment file. When we create an application system (using Rapid install), context file gets created automatically will all the parameters and there values. Most of the parameters take default value, where as some parameters takes the value that is supplied at the time of installation.

Optionally we can create context file separately using adbldxml.sh/adbldxml.pl script. These scripts are present in $FND_TOP/bin directory. adbldxml.sh in turn runs oracle.apps.ad.context.GenerateContext java class.

Following is an example entry for the context variable “domainname” from the log file of adbldxml.pl run:

 [ s_domainname ]
SEVERITY         : INFO   
SOURCE SEARCHED  : Using System commands to get Domain name value   
SEARCH RESULTS   : Domainname could not be found using system commands.   
SOURCE SEARCHED  : Database table - GLOBAL_NAME   
SEARCH RESULTS   : Query on database table GLOBAL_NAME returned - XXXX.WORLD;  

                   Table is hosting incorrect value for domain.

SOURCE SEARCHED  : Prompting the user for the domain name.  
SEARCH RESULTS   : Value accepted from the user - its.yale.edu  
VALUE ASSIGNED   : its.yale.edu  
USER ACTION      : No action required           

The above entry shows the sources searched, search results for each search and the final assignment for the context variable domainname. As you can see adbldxml.pl provides the search information in great detail in its log file. This log file helps a lot in debugging adbldxml.pl behavior.

Each placeholder in the template file has a corresponding xml node (a context variable) in the context file. They all have a mandatory attribute called oa_var, the attribute value for this attribute is the placeholder name. Each node is primarily identified by the oa_var attribute value and can optionally have other attributes like oa_type, oa_enabled scope and default. The node’s only child is a text node, which stores the placeholder’s environment specific value. From here on I will refer to this text value as the “text value of the context variable”. The description of these context variables along with their oa_var value can be seen in adctxinf.tmp (stored in $AD_TOP/admin/template).

Context variables in the context file are organized in a hierarchical order, hence the choice of xml to store them. These context variables mainly lie under five top level parent nodes i.e. oa_system, oa_host, oa_install, oa_environments and oa_processes. Each top level parent node is further divided into further levels before you reach the real context variables.

To change any configuration option in the Oracle Applications environment, we need to change the value of corresponding context variable in the context file and then run autoconfig for our changes to take effect. For example if we need to change the web server port then we would change the text value of the context variable “webport” (oa_var value s_webport), and then run autoconfig. Since the context file is just an xml file, it can be updated in many ways. I will describe some of them later.

How it works:

Each configuration file has one (sometimes two, one for NT and one for UNIX) corresponding template file (provided by autoconfig patches, stored in $PROD_TOP/admin/template directory). Profile options and other instance specific information in the database is maintained by many sql scripts, called from wrapper shell/perl scripts. These scripts also have corresponding template files (also provided by autoconfig patches, `in $PROD_TOP/admin/templates). In these template files all the environment specific values are replaced by placeholders (like %s_webhost%).

Following entry in httpd.conf

Timeout 300 is replaced by following in its template $FND_TOP/admin/template/httpd_ux_ias1022.conf

Timeout %s_ohstimeout%

Environment specific values for this placeholder is stored in an environment specific xml file (called application context file) stored in $APPL_TOP/admin.

For e.g.

For the above placeholder the value stored in the xml file is:

<ohstimeout oa_var=”s_ohstimeout”>300</ohstimeout>

Each placeholder has a corresponding xml node in the context file. The placeholder name is the value for the “oa_var” attribute of the xml node, the placeholder name without the prefix “s_” (generally) is the node name for the xml node and the value is stored as a child text node. These xml nodes are termed as context variables by Oracle documentation and each node primarily is identified by its oa_var attribute value. So effectively we can say that in the above case we replace “300″ by context variable “ohstimeout” whose oa_var value is “s_ohstimeout”.

Configuration files can be easily created from the template file by just replacing all the placeholders with the corresponding values from the context file. This process is termed as “instantiating the template” in Oracle documentation.

Driver files (stored in $PROD_TOP/admin/driver) store information about what to do with each template (e.g. instantiate it and replace the existing configuration file with it, instantiate it and run it). These files are named as <PROD_TOP>tmpl.drv (e.g. adtmpl.drv, fndtmpl.drv etc.) They contain one line for each template they manage.

When autoconfig (adconfig.pl or adconfig.sh) runs it just processes the driver file for each product, line by line doing what the driver file instructs it to do. The order of execution of each line is not sequential as we shall see later. The diagram below depicts the autoconfig functionality.

auto.jpg

Editing context file:

1. Editcontext

Editcontext is a java application provided by oracle for updating the values in the context file. It is provided as a patch (patch: 2873456). Editcontext provides a list of all the updatable context variable values along with their titles. The title is not the variable name or value of oa_var attribute, but it is derived from adctxinf.xml, which comes with the editcontext patch and stores the title along with the oa_var value for each context variable. Editcontext only lists those context variables, which are listed in its repository (adxmlctx.tmp). If you find that, not all variables are listed, then the version of this file is probably lower than the adxmlctx.tmp stored in $AD_TOP/admin/template. In that case just copy this file from $AD_TOP/admn/template to the editcontext repository (i.e. <patch unzip directory>/editcontext/etc).

After launching editcontext, we have to find the context variable that we want to update. Once we find it, we can just change the value and save the new value to the context file (To be precise editcontext rewrites the whole context file instead of just updating one value). Since the list of context variables is quite long, it may take a while to find the desired context variable in the list.

2.      Oracle Applications Manager

Oracle Applications Manager is a web-based portal for managing Oracle Applications. Along with many other features, this product has a section for updating the context files. This product lists everything for each context variable i.e. name, oa_var attribute value, description, and real updateable value. Moreover instead of giving us a long list of context variables to search from, it divides the context file into many sections and each section is displayed in the xml tree format making it easier to find a particular context variable. It also provides us with the option of adding custom context variables (which we will look at in the customization section).

One thing to remember while updating context variables using OAM is that what it displays is gotten; by parsing the context file stored in fnd_oam_context_files table (Autoconfig at each run uploads the context file in this table). When we try to update the context file, OAM first update’s the status flag from ‘S’ to ‘H’(History) for our context file record, it then inserts another row for the same context file with status ‘S’. (OAM inserts another row instead of updating the existing row to maintain change history for each context file) It then requests the specific node’s FNDFS listener for updating the file on the file system (autoconfig uses the file on the file system). So we have to make sure that the FNDFS listeners are running on all the nodes before using OAM to update the context file.

With all the features of Oracle Applications Manager mentioned above, updating context files using Oracle Applications Manager seems to be the direction Oracle is trying to move.

3.      Scripted Update

EditContext and Oracle Application Manager are good for updating context file if you need to update one or two context variables. If you need to modify quite a few variables (for e.g. if you need to update all the ports in the context file) then using these GUI tools do become cumbersome. It would be nice to have a scripted way of updating lots of values in the context file using a data source of changes. I will describe two ways of achieving this using Oracle supplied code.

a. Java class oracle.apps.ad.context.UpdateContext

This java class allows us to change one context variable at a time from the command line. But we can easily use a shell/perl/python/tcl/etc script to call this class multiple times for different context variables based on a changes file, which stores all our required changes

For example let’s say we need to change the following context variables. The first column is the oa_var values of the context variable and the second column is desired value. These values are stored in a file changes.txt

 s_webport 7777
 s_webport_pls 9999
 s_oprocmgr_port 9997
 s_active_webport 9996
 s_forms_servlet_portrange 1801-1810
 s_oacore_servlet_portrange 2801-2810

The following perl script loops through each record in changes.txt and updates the context file by calling the java class once for each line. The syntax it uses to call this java class is:

java oracle.apps.ad.context.UpdateContext CONTEXT NAME VALUE

where

CONTEXT – Context File Name
NAME – context variable name
VALUE – Desired Changed value

b. Using Perl Module TXK::XML:

The above technique works well but it is quite heavy on resource consumption, since we start a new jvm for every update. For every update the java code has to parse the xml file, create the DOM tree, do the update in memory and then write it back to the file system. It would be more efficient if we could just parse the xml file only once and do all our updates before writing the xml file to the file system. This can be achieved by using oracle supplied perl module TXK::XML (Found in $AU_TOP/perl/TXK). For using TXK::XML we load the context file as as TXK::XML object, change the configuration option values by using setOAVar method ot the TXK::XML object and then write the file back to the file system. The only thing to take note of is setOAVar expects a hash reference as the input variable. This hash will contain the list of context variables to be changed in a key value pair; the key is the oa_var value of the context variable and the value is the corresponding desired values.

If we use any programmatic method to update the context file, we are not allowing OAM to maintain a change history for all our context files, which is very important since context file is the central repository for all the configuration options. This can be easily taken care by updating the existing record for our context file to status ‘H’ in fnd_oam_context_files table and then inserting the changed context file into the table using executable FNDCPUCF (in $FND_TOP/bin).

Since the context file is just an xml file, you can basically use any xml parser or write your own xml parser to do the updates, but in my experience the above mentioned methods has been the least error prone and least time consuming. Moreover in all of the above methods I am using Oracle’s code to update the xml file.

The Template Files

Template files are files, which are merged with the context file (instantiated) to produce configuration files or scripts to update the database. They are stored in <PROD_TOP>/admin/templates directory. Autoconfig patches/Technology stack patches install new templates or upgrade existing templates. Now let’s look at how these template files are created.

Let’s take a small configuration file REP60_<SID>.ora (Reports server configuration file):

mailprofile="$Header: REP60_server.ora 115.5 2004/03/24 01:10:51 njoseph ship $"
nlssupport=yes
maxconnect=20
cachedir="/u02/app/oracle/product/8.0.6/reports60/server/cache"
cachesize=50
minengine=5
maxengine=10
initengine=5
maxidle=30
security=1
englife=50   

If we replace all the environment specific values with context variables from the context file, then this is what we get:

mailprofile="$Header: REP60_server.ora 115.5 2004/03/24 01:10:51 njoseph ship $"
nlssupport=yes
maxconnect=20
cachedir="%s_tools_oh%/reports60/server/cache"
cachesize=50
minengine=%s_minengine%
maxengine=%s_maxengine%
initengine=0
maxidle=30
security=1
englife=50  

And now we have a template file corresponding to the Reports server configuration file. The placeholder values enclosed by “%” correspond to the context variable in the context file. If we instantiate this template using the values from the context file we can easily recreate our configuration file. All the configuration files and sql scripts are converted to templates in similar fashion and supplied to us by autoconfig patches.

The Driver Files

Driver files, as the name suggests drives what autoconfig does (stored in <PROD_TOP>/admin/driver). They are named as <PROD_TOP>tmpl.drv i.e. adtmpl.drv, fndtmpl.drv etc. Autoconfig patches install and update these driver files. Each driver file has one line for each template it manages. Each line tells autoconfig what to do with that template. This is achieved by using a particular syntax that conveys the relevant information to autoconfig. Following is the syntax for the lines in the driver files.

<PROD> <Location> < Name> <Action> <Dest directory> <Dest file name> <File permission>

 For e.g.
 ad admin/template adconfig.txt INSTE8 /admin     adconfig.txt      600
Column Description
PROD Product Name
Location Directory underneath PROD_TOP where the template is located. Generally “admin/template”.
Name Name of the template File
Action Type of action to be performed on this template (Refer to the following table for description of different kinds of action)
Dest Directory Destination directory of the instantiated template file. We can use context variables enclosed In “” to specify the destination directory. For example if we want to specify $APPL_TOP/admin as the destination directory we would specify it as “<at>/admin” in the driver file.
Dest file name Destination configuration file name for the instantiated template file. We can use context variables enclosed in “” to specify the destination configuration file name. For example if the destination file has Database SID we can specify it as “<SID>.env” in the driver file.
File Permission Autoconfig generates the configuration file with the provided unix style permission.

Actions:

Action Description
INSTE8
  • Instantiate (replace context variables with values from xml context file)
  • Copy the result to the <Dest directory>/<Dest file name> overwriting the existing configuration file, if one exists.
  • Change the permission to <File permission>
INSTE8_SETUP
  • Instantiate (replace context variables with values from xml context file)
  • Copy the result to the <Dest directory>/<Dest file name> overwriting the existing file, if one exists.
  • Change the permission to <File permission>
  • Execute the instantiated file.
INSTE8_APPLY
  • Instantiate (replace context variables with values from xml context file)
  • Copy the result to the <Dest directory>/<Dest file name> overwriting the existing file, if one exists.
  • Change the permission to <File permission>
  • Execute the instantiated file.
INSTE8_PRF
  • Instantiate (replace context variables with values from xml context file)
  • Copy the result to the <Dest directory>/<Dest file name> overwriting the existing file, if one exists.
  • Change the permission to <File permission>
  • Execute the instantiated file.
INSTALL
  • Instantiate the template file only if the resulting configuration file does not already exist.

Though the description of three of the actions is same, they are there to get different execution order within autoconfig’s execution of each driver file. The execution order in which autoconfig processes each line is INSTE8, INSTALL, INSTE8_SETUP, INSTE8_APPLY and INSTE8_PRF. These actions mark the different phases of autoconfig i.e. Setup phase, Apply phase and Profile phase. It’s also possible to run autoconfig only up to a particular phase.

The driver file syntax also supports if then else branching based on type of node (i.e. web, admin, forms etc), which is useful in a multi node installation. The syntax also supports the branching based on the platform type (Unix or Windows). This allows having multiple templates for each configuration file and instantiating a particular template based on the platform.

For e.g.
if platform NT
ad admin/template APPLSYS_nt.env INSTE8 .env 600
endif

or

if installation-type admin node nodedev forms formsdev web webdev
ad admin/template adconfig.txt INSTE8 /admin adconfig.txt 600
end if

The driver file syntax also supports including other driver files which are processed by autoconfig recursively

For e.g.
#include        fnd     admin/driver    fndtmpl.drv

When autoconfig (adconfig.pl or adconfig.sh) runs it just processes each product’s driver file respecting the, if then else branching as it processes the lines in the driver files. It also processes all included driver files recursively.

 

Oracle Real Application Cluster 10g

Introduction

Oracle Real Application Cluster (RAC) is a revolution in the database management system. It is an extension of Oracle single instance database. RAC is basically a cluster of instances working on the same database. As you know instance is nothing but the computer memory and some background processes, so in case of RAC we have multiple such instances which are installed and configured on different nodes and we have a single database (datafiles) which are accessed by these instances. This post explains the technical details about the RAC architecture and also I will discuss about the installation of RAC.

What is Oracle Real Application Cluster 10g?

Software Architecture

A RAC is a clustered database. A cluster is a group of independent servers that cooperate as a single system. In the event of system failure clustering ensure high availablity to the user. Access to mission critical data is not lost. Redundant hardware components, such as additional nodes, interconnects and disks, allow the cluster to provide high availability. Such redundant hardware architecture avoids a single point of failure and ensures high availability for the system.

1.jpg

Above figure shows the architecture for RAC. In RAC each instance runs on a seperate server which can access database made of multiple disks. For RAC to act as a sngle database, each seperate instance in a RAC should be a part of cluster. For the external users all the instance (nodes) which are part of cluster will look as single instance.

For each instance to be a part of cluster, we need to have some cluster software installed and all the instance should register in the cluster software. From Oracle Database 10g onwards, Oracle provides its own clusterware, A software to be installed on the nodes which are the part of cluster. Advantage with Oracle clusterware is that customer doesn’t have to purchase any third party clusterware. Also the clusterware provided by Oracle is integrated with OUI for easy installation. When a node in a Oracle cluster is started, all instances, listener and services are stared automatically. If an instance fail, the clusterware will automatically restart the instance so the services is often restored before the administrator notices it was down.

Network Architecture

Each RAC node should have at least one static IP address for the public network (Used by application) and one static IP address for the private cluster interconnect. Also we can have 1 virtual IP address(VIP) for each node.

The private networks are critical components of a RAC cluster. The private networks should only be used by Oracle to carry Cluster Manager and Cache Fusion (Explained Later) inter-node connection. A RAC database does not require a separate private network, but using a public network can degrade database performance (high latency, low bandwidth). Therefore the private network should have high-speed NICs (preferably one gigabit or more) and it should only be used by Oracle.

Virtual IPs are required for fail over. This is called TAF (Transparent Application Failover). Processes external to the Oracle 10g RAC cluster control the Transparent Application Failover (TAF). This means that the failover types and methods can be unique for each Oracle Net client. For failover to happen client connections are made using VIPs.

Hardware Architecture

Both Oracle Clusterware and Oracle RAC require access to disks that are shared by each node in the cluster. The shared disks must be configured using OCFS (1 or 2), raw devices or third party cluster file system such as GPFS or Veritas.

OCFS2 is a general-purpose cluster file system that can be used to store Oracle Clusterware files, Oracle RAC database files, Oracle software, or any other types of files normally stored on a standard filesystem such as ext3. This is a significant change from OCFS Release 1, which only supported Oracle Clusterware files and Oracle RAC database files. Note that ASM cannot be used to store the Oracle clusterware files, since clusterware is installed before installaing ASM and also clusterware have to be started before starting ASM.

OCFS2 is available free of charge from Oracle as a set of three RPMs: a kernel module, support tools, and a console. There are different kernel module RPMs for each supported Linux kernel.

Installing RAC 10g

Installing a RAC is a 5 step process as given below.

1) Complete Pre-Installation Task
Hardware Requirement
Software Requirement
Environment Configuration, Kernel parameter and so on.
2) Perform CRS installation
3) Perform Oracle Database 10g Installation
4) Perform Cluster Database creation
5) Complete post installation task

Pre-Installation Task

Check System Requirement

- Atleast 512MB of RAM
Run below command to check
# grep MemTotal /proc/meminfo
- Atleast 1G of swap space
Run below command to check
# grep SwapTotal /proc/meminfo
- /tmp directory should be 400M
Run below command to check
df -h /tmp

Check Software Requirement
- package Requirements

For installing RAC, the packages required for Red Hat 3.0 are:
gcc-3.2.3-2
compat-db-4.0.14.5
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
openmotif21-2.1.30-8
setarch-1.3-1

you can verify if these or higher version packages are present or not using following command
# rpm -q <package_name>

- Create Groups and Users

You can create unix user groups and user IDs using groupadd and useradd commands. We need 1 oracle user and 2 groups – “oinstall” being the primary and “dba” being secondary.

# groupadd -g 500 oinstall
# groupadd -g 501 dba
# useradd -u 500 -d /home/oracle -g “oinstall” -G “dba” -m -s /bin/bash oracle

Configure Kernel Paramters

- Make sure that following parameters are set in /etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 658576
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 1048536
net.core.wmem_default = 262144
net.core.wmem_max = 1048536

To load the new setting run /sbin/sysctl –p

These are the minimum required values, you can have higher values as well if your server configuration allows.

Setting the system environment

- Set the user Shell limits

cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login << EOF
session required /lib/security/pam_limits.so
EOF

cat >> /etc/profile << EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >> /etc/csh.login << EOF
if ( \$USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF

- Configure the Hangcheck Timer

Hangcheck-timer module monitors the Linux kernal for extended operating system hangs that can affect the reliability of RAC node and cause database corruption. If a hang occurs, the module reboots the node.

You can check if the hangcheck-timer module is loaded by running lsmod command as root user.

/sbin/lsmode | grep -i hang

If the module is not running you can load it manually using below command.

modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
cat >> /etc/rc.d/rc.local << EOF
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
EOF

- Configuring /etc/hosts

/etc/hosts contains the hostname and IP address of the server.

You will need 3 hostnames for each node in the cluster. One will be public hostname for primary interface. Second will be private hostname for cluster interconnect. Third will be virtual hostnames (VIP) for high availability.

For Node 1

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
140.87.222.169 ocvmrh2045.us.oracle.com ocvmrh2045 #node1 public
140.87.241.194 ocvmrh2045-nfs.us.oracle.com ocvmrh2045-nfs ocvmrh2045-a #node1 nfs
152.68.143.111 ocvmrh2045-priv.us.oracle.com ocvmrh2045-priv #node1 private
152.68.143.112 ocvmrh2053-priv.us.oracle.com ocvmrh2053-priv #node2 private
140.87.222.220 ocvmrh2051.us.oracle.com ocvmrh2051 # Node1 vip
140.87.222.225 ocvmrh2056.us.oracle.com ocvmrh2056 # Node2 vip

For Node 2

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
140.87.222.222 ocvmrh2053.us.oracle.com ocvmrh2053 # Node2 Public
140.87.241.234 ocvmrh2053-nfs.us.oracle.com ocvmrh2053-nfs ocvmrh2053-a # Node2 nfs
152.68.143.111 ocvmrh2045-priv.us.oracle.com ocvmrh2045-priv # Node1 Private
152.68.143.112 ocvmrh2053-priv.us.oracle.com ocvmrh2053-priv # Node2 Private
140.87.222.220 ocvmrh2051.us.oracle.com ocvmrh2051 # Node1 vip
140.87.222.225 ocvmrh2056.us.oracle.com ocvmrh2056 # Node2 vip

- Creating database Directories

You have to get the following directories created for you with a write permission for oracle user.

Oracle Base Directories
Oracle Inventory Directory
CRS Home Directory
Oracle Home Directory

In our case the directories are:

Oracle Base Directories – /u01/app/
Oracle Inventory Directory – /u01/app/oraInventory
CRS Home Directory – /u01/app/oracle/product/10.2.0/crs
Oracle Home Directory – /u01/app/oracle/product/10.2.0/db

Configure SSH for User Equivalence

The OUI detects whether the machine on which you are installing RAC is a part of cluster. If its a part of cluster then you have to select the other nodes which are the part of cluster and on which you want to install the patch. But when OUI tries to install the patch on other node while connecting from 1st node, it will ask for login credential and prompt for a password in between the installation, which we want to avoid. For this purpose we have to have user equivelence in place. User equivalence can be achieved by using SSH. First you have ot configure SSH.

Logon as the “oracle” UNIX user account

# su – oracle

If necessary, create the .ssh directory in the “oracle” user’s home directory and set the correct permissions on it:

$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh

Enter the following command to generate an RSA key pair (public and private key) for version 3 of the SSH protocol:

$ /usr/local/git/bin/ssh-keygen -t rsa

Enter the following command to generate a DSA key pair (public and private key) for version 3 of the SSH protocol:

$ /usr/local/git/bin/ssh-keygen -t dsa

Repeat the above steps for all Oracle RAC nodes in the cluster

Create authorized key file.

$ touch ~/.ssh/authorized_keys
$ cd ~/.ssh
bash-3.00$ ls -lrt *.pub
-rw-r–r– 1 oracle oinstall 399 Nov 20 11:51 id_rsa.pub
-rw-r–r– 1 oracle oinstall 607 Nov 20 11:51 id_dsa.pub

The listing above should show the id_rsa.pub and id_dsa.pub public keys created in the previous section

In this step, use SSH to copy the content of the ~/.ssh/id_rsa.pub and ~/.ssh/id_dsa.pub public key from all Oracle RAC nodes in the cluster to the authorized key file just created (~/.ssh/authorized_keys).

Here node 1 is ocvmrh2045 and node 2 is ocvmrh2053

ssh ocvmrh2045 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh ocvmrh2045 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh ocvmrh2053 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh ocvmrh2053 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

Now that we have the entry for all the public keys on both the node in this file, we should copy the file to all the RAC nodes. We done have to do this on all nodes, just copying the file to other nodes will do.

scp ~/.ssh/authorized_keys ocvmrh2053:.ssh/authorized_keys

Set permissions to the authorized file

chmod 600 ~/.ssh/authorized_keys

Establish User Equivalence

Once SSH is configured we can go ahead with configuring user equivalence.

su – oracle

exec /usr/local/git/bin/ssh-agent $SHELL
$ /usr/local/git/bin/ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)
Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

- Test Connectivity

Try the below command and it should not ask for the password. It might ask the password for the first time, but after that it should be able to execute the steps without asking for password.

ssh ocvmrh2045 “date;hostname”
ssh ocvmrh2053 “date;hostname”
ssh ocvmrh2045-priv “date;hostname”
ssh ocvmrh2053-priv “date;hostname”

Partitioning the disk

In order to use OCFS2, you need to first partition the unused disk. You can use “/sbin/sfdisk –s” as a root user to check the partitions. We will be creating a single partition to be used by OCFS2. As a root user, run the below command.

# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

You can verify the new partition now as

# fdisk -l /dev/sdc

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 1305 10482381 83 Linux

When finished partitioning, run the ‘partprobe‘ command as root on each of the remaining cluster nodes in order to assure that the new partitions are configured.

Configure OCFS2

We will be using OCFS2 here in this installation. OCFS is a cluster file system solution provided by Oracle, which is specially meant for RAC instllation. Once configure the disk for OCFS we can use the same for clusterware files (like OCR – Oracle Cluster Registry file and Voting file), as well as we can use the same disk for database files.

# ocfs2console

22.jpg
Select Cluster -> Configure Nodes

Click on Add on the next window, and enter the Name and IP Address of each node in the cluster.
Note: Use node name to be the same as returned by the ‘hostname’ command

33.jpg

Apply, and Close the window.

After exiting the ocfs2console, you will have a /etc/ocfs2/cluster.conf similar to the following on all nodes. This OCFS2 configuration file should be exactly the same on all of the nodes:

node:
ip_port = 7777
ip_address = 140.87.222.169
number = 0
name = ocvmrh2045
cluster = ocfs2

node:
ip_port = 7777
ip_address = 140.87.222.222
number = 1
name = ocvmrh2053
cluster = ocfs2

cluster:
node_count = 2
name = ocfs2

Configure O2CB to Start on Boot and Adjust O2CB Heartbeat Threshold

You now need to configure the on-boot properties of the O2CB driver so that the cluster stack services will start on each boot. You will also be adjusting the OCFS2 Heartbeat Threshold from its default setting of 7 to 601. All the tasks within this section will need to be performed on both nodes in the cluster as root user.

Set the on-boot properties as follows:

# /etc/init.d/o2cb offline ocfs2
# /etc/init.d/o2cb unload
# /etc/init.d/o2cb configure

Configuring the O2CB driver.

This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on boot. The current values will be shown in brackets (‘[]‘). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort.

Load O2CB driver on boot (y/n) [y]: y
Cluster to start on boot (Enter “none” to clear) [ocfs2]: ocfs2
Specify heartbeat dead threshold (>=7) [7]: 601
Writing O2CB configuration: OK
Loading module “configfs”: OK
Mounting configfs filesystem at /config: OK
Loading module “ocfs2_nodemanager”: OK
Loading module “ocfs2_dlm”: OK
Loading module “ocfs2_dlmfs”: OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Starting O2CB cluster ocfs2: OK

We can now check again to make sure the settings took place in for the o2cb cluster stack:

Verify that ocfs2 and o2cb are started. Check this on both nodes. As root user:

# chkconfig –list |egrep “ocfs2|o2cb”
ocfs2 0:off 1:off 2:on 3:on 4:on 5:on 6:off
o2cb 0:off 1:off 2:on 3:on 4:on 5:on 6:off

If it doesn’t look like above on both nodes, turn them on by following command as root:

# chkconfig ocfs2 on
# chkconfig o2cb on

Create and format the OCFS2 filesystem on the unused disk partition

As root on each of the cluster nodes, create the mount point directory for the OCFS2 file system.

# mkdir /u03

Run the below command as a root user only on 1 node to create a OCFS2 file system on the unused disk /dev/sdc1, that you partitioned above.

# mkfs.ocfs2 -b 4K -C 32K -N 4 -L /u03 /dev/sdc1
mkfs.ocfs2 1.2.2
Filesystem label=/u03
Block size=4096 (bits=12)
Cluster size=32768 (bits=15)
Volume size=10733944832 (327574 clusters) (2620592 blocks)
11 cluster groups (tail covers 5014 clusters, rest cover 32256 clusters)
Journal size=67108864
Initial number of node slots: 4
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Formatting Journals: done
Writing lost+found: done
mkfs.ocfs2 successful

The meaning of the above command is partition with a volume label of “/u03″ (-L /u03), a block size of 4K (-b 4K) and a cluster size of 32K (-C 32K) with 4 node slots (-N 4).

Once OCFS2 filesystem is configured on the disk, you can mount the same.

Mount OCFS2 filesystem on both nodes

Run the below command on all nodes to mount the disk having OCFS2 file system.

# mount -t ocfs2 -L /u03 -o datavolume /u03

You can verify if the disk is mounted correctly or not using below command

# df /u03

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc1 10482368 268736 10213632 3% /u03

Create the directories for shared files

As root user, run the following commands on node1 only. Since /u03 is on a shared disk, all the files added from one node will be visible on other nodes.

CRS files:

# mkdir /u03/oracrs
# chown oracle:oinstall /u03/oracrs
# chmod 775 /u03/oracrs

Database files:

# mkdir /u03/oradata
# chown oracle:oinstall /u03/oradata
# chmod 775 /u03/oradata

Installaing Oracle Clusterware

Before installing the Oracle RAC database, we need to install Oracle clusterware. Clusterware will create 2 important files. One is the OCR file (Oracle Cluster Registry) and other is Voting file. OCR file is used for registering the nodes involved in RAC installation and to store all the details about those nodes. Voting file is used to get the status of each node after a definite period of time. Each node will register its presence after a definite time into this voting file. This is called heart beat of RAC. If a node goes down, then it wont be able to register its presence in voting file and other instance will come to know. Other instance will then bring up the crashed instance.

Follow the below step to install clusterware.

From the setup directory run the ./runInstaller command

Below are the main screen and the inputs to be given.

Welcome page - Click Next

11.jpg

Specify Inventory Directory and Credentials – Enter the inventory location where it should create inventory

12.jpg

Specify Home Details - Specify the correct location of home. Provide the location for crs home. Note that this location may not be a shared location. This is the location for installing a crs software and not for OCR and voting file.

13.jpg
Product Specific Prerequisite Checks - OUI will perform the required pre-reqs checks. Once done, press Next.

14.jpg

Specify Cluster Configuration – On this screen you need to add all the servers that will be part of RAC installation. Basically this is a push install, where the installation will be pushed to all the nodes we are adding here. So that we “don’t’ have to install CRS again from node 2.

15.jpg
Specify Network Interface Usage – We need at least 1 network to be private and not to be used by application. So make 1 network as private network, so that we can use the same for interconnect.

16.jpg
Specify OCR Location – This is where you will provide the location for OCR file. Remember that this file should be shared and accessible to all the nodes. We know that we have a shared disk /u03. In the above step under “Create the directories for shared files”, we created a “/u03/oracrs” directory. This can be provided here.

17.jpg
Specify Voting Disk Location – On this screen you will provide the location for voting file. You need to provide the shared location here as well. You can provide the same shared location we created in above step.

18.jpg

Summary – Click on Install

You can verify the cluster installation by running olsnodes.

bash-3.00$ /u01/app/oracle/product/10.2.0/crs/bin/olsnodes
ocvmrh2045
ocvmrh2053

Create the RAC Database

You can follow the same steps that you follow for installing the single instance database, only couple of screens are new in this instllation as compared to single instance database installation.

111.jpg

4) Specify Hardware Cluster Installation Mode – Select cluster installation and click on select all to select all the nodes in the cluster. This will propogate the installation in all the nodes.

121.jpg

10) Specify Database Storage Options – In this case if you are not using ASM or Raw devices and using file system then specify the shared location we created above. This is important because all the instance should have access to the datafiles. We are creating multiple instances but we are having single database(database files).

At the end, it will give the summary and you click on install.

Congratulations! Your new Oracle 10g RAC Database is up and ready for use.

References

Oracle RAC Documentation – http://download.oracle.com/docs/html/B10766_08/toc.htm

Oracle Technical White Paper May 2005 by Barb Lundhild

Converting a single instance database to RAC – http://www.oracle.com/technology/pub/articles/chan_sing2rac_install.html#prelim

 

Oracle Database Lite 10g (OLite 10g)

Introduction

Oracle Database Lite 10g extends the power of grid computing to a mobile workforce with a complete, integrated, secure database for building, deploying, and managing mobile applications for a broad range of mobile devices. Oracle Database Lite 10g enables persistent access to critical information and applications without requiring continuous connectivity to back-end enterprise systems. As a result, users increase the efficiency, productivity, and responsiveness of mobile workforces while reducing costs and improving customer satisfaction.

Oracle Database Lite is a complete, integrated, and secure infrastructure to build, manage, and provision mobile database application to a broad range of wireless devices. It is the leading platform to develop, deploy and manage mobile applications that store data locally on mobile devices (Smartphones, PDAs, Handheld Computers, and traditional Laptops) and synchronize data with central servers. Oracle Database Lite includes: scalable data synchronization architecture to thousands of mobile users; centralized management through easy-to-use graphical user interface; utilizes Oracle Real Application Clusters for maximum high-availability and failover; and revolutionary new mobile database development tools increases developer productivity. With Oracle Lite, your business cost-effectively extends enterprise data to occasionally connected mobile users. Oracle Lite is a complementary product optimized to work with Oracle Database Standard or Enterprise Edition.

Usability

Employees are working away from their desks and require access to corporate data normally found only on desktop devices connected to enterprise networks. Wireless connections for mobile users offer the promise of remote access of enterprise data but persistent wireless connections are not always possible, practical or desirable.

Wireless connections are not always possible because mobile workers may be in an environment that does not have wireless coverage. Often it is not practical to use a persistent wireless connection because applications do not have a real time data access requirement to justify the costs of communications. There are situations where a wireless connection is not desirable because the very presence of a wireless connection could compromise an application or a user’s security.

Developers require an infrastructure with application services that enable the development, delivery and operation of secure, personalized applications to mobile or embedded devices.

Database Lite Components

Oracle Database Lite 10g is a part of Oracle’s Database that extends the grid environment
and it makes your applications mobile. Oracle Database Lite describes a group of components that includes the Lite Database, the Mobile Server for Data Synchronization, Life Cycle Management and a Rapid Application Development environment.

Oracle Database Lite is a complete solution and includes more than a small database. The Oracle Lite database included in this solution is not an abbreviated version of the Oracle database but was designed from the ground up to be used with mobile applications in small and embedded devices.

untitled.jpg

Prerequisite Software for Lite

Since Oracle Database Lite stores and retrieves your information from an Oracle database, you must have a back-end Oracle database to run Lite. The Oracle database can be either Standard or Enterprise Edition, running a minimum version of 8.1.7 or higher.

Middle-Tier Option for Mobile Server

Oracle Database Lite uses a middle-tier to communicate between the clients and the back-end database. You must use one of the following as the middle-tier:

  • Stand alone OC4J – for development environments
  • Oracle Application Server – for production environments

Stand Alone OC4J

Stand Alone OC4J is automatically installed with Oracle Database Lite and this provides a standalone Mode for development environments.

Mobile Server in standalone mode uses the standalone version of Oracle Containers for J2EE (OC4J). This is the preferred configuration for development and testing but it will
support only a limited number of concurrent users.

Oracle Application Server

Production environments require either Oracle Application Server 10g. The application server is not installed with Oracle Database Lite and must be installed before installing Oracle Database Lite Mobile Server.

The Oracle Application Server production environment will support large numbers of  users, provides caching, load balancing, centralized management, security, and Single Sign On support.

Oracle Lite Database

The Oracle Lite Database is a small footprint, Java enabled, secure, relational database
management system created specifically for laptop computers, handheld computers, PDAs, and information appliances. Oracle Lite Database runs on Windows 2000/XP, Windows CE/Pocket PC, Symbian OS, and Embedded Linux.

Oracle Lite Database provides JDBC, ODBC, ADO.NET and Simple Object Data Access (SODA) APIs, for an easy-to-use C++ interface that is optimized for the object-oriented and SQL functionality of Oracle Database Lite.

Installation of the Mobile Development Kit (MDK) installs the Oracle Lite Database and all its utilities on your development machine.

Data Synchronization

A user’s data is synchronized between Oracle Lite Database and an Oracle database server.

Synchronization is accomplished by invoking the Mobile sync client, mSync, which interacts with the Mobile Server. The Mobile Server uses synchronization objects such as users, publications, publication items, and subscriptions to process client and server data changes. This technique is referred to as a publish/subscribe model.

Synchronization Process

Oracle Database Lite contains a subset of data stored in the Oracle database. This subset is stored in snapshots in the Oracle Lite database. Unlike a base table, a snapshot keeps track of changes made to it in a change log. Users can make changes in the Oracle Lite database while the device is disconnected, and can synchronize with the Oracle database
server.

There are basically three types of publication items that can be used to define synchronization; fast refresh, complete refresh, and queue based. The most common method of synchronization is a fast refresh publication item where changes are uploaded by the client, and changes for the client are downloaded.

Meanwhile, a background process called the Message Generator and Processor (MGP) periodically collects the changes uploaded by all clients and applies them to database tables. It then composes new data, ready to be downloaded to each client during the next
synchronization, based on predefined subscriptions.

Oracle Lite Sync is a two step asynchronous process:

untitled1.jpg

  1. Sync moves updated rows from the client database to the In Queue and from the Out Queue to the client database.
  2. MGP (Message Generator Processor) applies In Queue changes to base tables and Composes the changes to the base tables to client Out Queues.

Until recently, most business applications have only been accessible from network tethered PCs in offices, away from where a business’ productive assets and employees are at work, its customers are serviced, and its operations performed. A new generation of lightweight and powerful mobile devices combined with inexpensive, widely available wireless data connections promise to redefine the reach of Enterprise applications. Oracle is committed to servicing the mobile computing needs of businesses worldwide with solutions and software platforms that offer the depth of feature, scalability, reliability and performance.

Please note that above discussion is taken from Oracle white paper.

Below I have given the steps for installing Olite 10g in E- Business suite environment.

Installing OLite 10g

For installing Oracle database lite 10g for demo and checking out product features, you need to get the required software download from thislink.

Once downloaded, it need to be installed, very similar to our regular database installation. I have given the brief installation step for the same. As far as DBA is concern, the main resonsibility lies in installation and management. Please follow the below steps to install this software successfully. Also, please note that the steps below are the installtion steps for Linux OS. But though the basic steps are going to be almost same in any platform.
Note that the below discussion is for the installation on R12 instance.

Once the dump is extracted from zip file, before starting the OUI, you need to set the following environment variable.

ORACLE_HOME
JAVA13_HOME
TNS_ADMIN

For this software you need to set the path for ORACLE_HOME. You can create a directory called olite10g and set the path for this directoy as ORACLE_HOME.

JAVA13_HOME will be the location for your JAVA home. You can check the path for your java installtion, either 1.3 or 1.4 and set the path accordingly. Usually in Linux the path will be some thing like /local/java/jdk1.4.2.

TNS_ADMIN should point to $ORACLE_HOME/network/admin

Make sure you drop ‘mobileadmin’ schema with cascade option.

Connect to applications as system user and

SQL> Drop user mobileadmin cascade;

User Dropped.

SQL>

Once the above parameters are set and exported, check the DISPLAY environment variable(if installing on any of UNIX platform) and use the below command (from the software dump directory) to start the installation.

==========================================================
./runInstaller -invPtrLoc $ORACLE_HOME/oraInst.loc

Starting Oracle Universal Installer …

Checking requirements…

Checking operating system version: must be redhat-2.1, UnitedLinux-1.0 or redhat-3
Passed
All requirements met.

Checking if CPU speed is above 450 MHz.
Actual 3056 MHz Passed
Checking for Kernel version 2.4.21-4.EL Passed
Checking swap space: must be greater than 1536 MB.
Actual 23744MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-05-28_03-38-56AM. Please wait ..
sal Installer, Version 2.3.0.10.0
Copyright (C) 1999, 2003, Oracle. All rights reserved.

1.jpg

The above screen is just a welcome screen. Click next.

Next screen is a Inventory screen. Please note that we are here using the local inventory as specified by invPtrLoc attribute supplied, when we started the installation above. We also specified the location of oraInst.loc file. If the file doesnt exist, installer will create the file and the location of inventory will the one that we will provide in this Specify Inventory Directory screen. So basically oraInst.Loc file will be created with the inventory location as given in this screen. Give the location of your ORACLE_HOME, followed by a directory oraInventory. Even if the directory does not exist, installer will create the same.

1-1.jpg

2.jpg

In the above screen, we just specify the group of the user who is doing installation.

3.jpg

Specify File location page needs the product.jar file, which comes with software dump and name & location of ORACLE_HOME. Keep the default value and click next.

4.jpg

Press ‘Yes’ when you get such warning. The reason for this warning is that, the ORACLE_HOME directory that we are using is not empty, because we are creating the oraInventory directory in the same location. So by the time we come to this sceen, some components of inventory already got created in ORACLE_HOME directoy.

5.jpg

Select Installation Type as Mobile Server. This also includes Mobile Development Kit. Press Next.

6.jpg

On Mobile Server Repository Database Information page, you need to provide the information about, the hostname on which database resides, the tnsport of database and database sid. Once provided the info, click Next.

7.jpg

Mobile Server Repository screen will confirm your acceptance in installing the mobile server repository. This will create a schema, which will contain some schema and code objects specific to mobile administration. If you remember, before starting the installation, we have dropped mobileadmin schema for the same purpose. In case there is already existing repository, then the repository creation wizard will fail. So in usual practice, we drop the repository and create a fresh one when we install Olite 10g. ALso please note that upgrade repository option doesnt work with 10g Olite installation. Select Yes option if you want to create repository, else you can even select No.

If you select No at this point and later at some point of time, if you need to create a repository, you can do same by running just the respsitory wizard (repwizard) present in ORACLE_HOME/mobile/server/admin. But also note that, database information for creating repository cannot be given later, while creating the repository. But anyway you can change the information for the same by editing configuration file.

After the installtion, I will be mentioning the configuration file for OLite 10g installation in Oracle Apps R12.

At this point we will be going with repository creation option.

8.jpg

Port Number for OC4J HTTP Listener is the port we specify for webtogo URL for administration. We are use any of the unused port numbers, which are greater then 1024.

9.jpg

Demo Applications comes with product which can be used for testing and demo. Its totally upto the user to either install the same or skip. In this installation, we will be skipping the demo applicaitons.

10.jpg

Once all the parameters are provided, click on Install. The product installation will begin.

11.jpg

You can also see the progress, when the installation proceeds.

12.jpg

Once the product installation completes, Mobile Server Repository creation will start automatically. In this case the wizard will just have to create a schema(mobileadmin) and objects. For that it has to connect as system.

Since we have already specified the database details, where the wizard will connect, during installation part, it will just ask for system password. Please provide correct system password for your main database and click next.

13.jpg

When you click next, it will connect to database and check for mobileadmin schema, If the mobileadmin schema is found it will give upgrade option, else it will give the message as given in above screen and proceed further to create a new repository. Click next to continue.

14.jpg

When you click on next, it will ask for schema password, which you have to set in this screen. The schema name will be MOBILEADMIN, and password will be what ever you set here.

15.jpg

Administrator password if for administering the webtogo URL. Note that MOBILEADMIN is a database user, where are ADMINISTRATOR is a user for webtogo application. You can set the password for Administrator user on this screen.

16.jpg

As I said before, its going to install a new repository. Click next to continue.

17.jpg

You can see the Repository Creation progress.

18.jpg

Once the repository creation task is done. It will show the message as seen in the screen. Click on finish button to finish the wizard.

19.jpg

At the end you can just exit. Our Oracle Database Lite installation with repository creation was successful.

Next task that comes after installation is bringing up the services and sanity checking the  URL.

 

Configuration

At the starting of installation, we set 3 environment variables related to OLite 10g

ORACLE_HOME

JAVA13_HOME

TNS_ADMIN

Basically, when ever we have to manager Olite, we need to have these varaiables configuraed with correct values. Since we are talking about Olite installing in E-Buiness suite, we will talk about the configuration w.r.t R12.

The above three paramters can be set correct in a configuartion file called asgovars_ux.env present in $ASG_TOP/admin/template directory. Just edit the file and set these environment variables. Once that is done source the file. After sourcing when you see ORACLE_HOME, it will be pointing to Olite ORACLE_HOME (and not tools ORACLE_HOME).

You can go to $ORACLE_HOME/mobile/server/bin

and run the following command

(appmgr03) bin – -bash $ ./runmobileserver &
[1] 766
(appmgr03) bin – -bash $ 07/05/29 12:48:28 Warning: Error reading transaction-log file (/slot03/appmgr/olite10g/mobile_oc4j/j2ee/mobileserver/
persistence/transaction.state) for recovery: premature end of file
07/05/29 12:48:28 Forced or abrupt (crash etc) server shutdown detected, starting recovery process…
07/05/29 12:48:28 Recovery completed, 0 connections committed and 0 rolled back…
07/05/29 12:48:31 Tutalii: /SLOTS/slot03/appmgr/olite10g/mobile/server/bin/jzlib.jar archive

(appmgr03) bin – -bash $

This will start the webtogo service. You can verify the same using following command

(appmgr03) bin – -bash $ ps -eaf | grep oc4j.jar
appmgr03   767   766  8 12:48 pts/3    00:00:04 /local/java/jdk1.4.2/bin/java -Xms256m -Xmx512m -jar oc4j.jar

appmgr03   971 32439  0 12:49 pts/3    00:00:00 grep oc4j.jar
(appmgr03) bin – -bash $

You can see, there is 1 oc4j.jar process that is running.

The configuration file for web-to-go is present in $ORACLE_HOME/mobile/server/bin directory, and the name is webtogo.ora.

This file basically contains the database details like, Olite ORACLE_HOME, JDBC connection string, encrypted password, maximum number of connection allowed and log & trace file details.

The port number, that we select for Olite (8080), wont be present in webtogo.ora. The port information will be present in http-web-site.xml file present in $ORACLE_HOME/mobile_oc4j/j2ee/mobileserver/config directory. You can change the port any time in http-web-site.xml file and bounce the services, the new port will take effect.

For shutting down the service, there is no special command and we need to kill the oc4j.jar process, that is running. Thats the only way that is currently available for shutting down the Olite service.

The URL for accessing webtogo can be constructed as followes:

http://(hostname):(port)/webtogo.

The port here is webtogo port(8080), configured during installation.

Once the above installation is done, you can follow metalink note ID  386682.1 for post installation task. Note that these post installation task is required only if the installation is done for E-Business suite.

 

Oracle Database 9i Interview Questions

Intention of this post is to get as much interview question for Oracle DBA as possible to help you get the idea about the type of questions you can expect in interviews and exams. This will help you in increasing the knowledge about oracle database 9i as some of the questions may be new to you. This post has questions related to oracle 9i DBA only.
1) Explain the difference between a hot backup and a cold backup and the benefits associated with each.

A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any point in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk.

2) You have just had to restore from backup and do not have any control files. How would you go about bringing up this database?

I would create a text based backup control file, stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.

3) How do you switch from an init.ora file to a spfile?

Issue the create spfile from pfile command.

4) Explain the difference between a data block, an extent and a segment.

A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object. Extent may not be continuous.

5) Give two examples of how you might determine the structure of the table DEPT.

Use the describe command or use the dbms_metadata.get_ddl package.

6) Where would you look for errors from the database engine?

In the alert log.

7) Compare and contrast TRUNCATE and DELETE for a table.

Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.

8) Give the reasoning behind using an index.

Faster access to data blocks in a table.

9) Give the two types of tables involved in producing a star schema and the type of data they hold.

Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.

10) What type of index should you use on a fact table?

A Bitmap index.

11) Give two examples of referential integrity constraints.

A primary key and a foreign key.

12) A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?

Disable the foreign key constraint to the parent, drop the table, re-create the table, enable the foreign key constraint.

13) Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to any point in time. NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.

14) What command would you use to create a backup control file?

Alter database backup control file to trace.

15) Give the stages of instance startup to a usable state where normal users may access it.

STARTUP NOMOUNT – Instance startup. Control File is read here.

STARTUP MOUNT – The database is mounted. Datafiles are read for the status and checked with control file.

STARTUP OPEN – The database is opened. Normal users can access.

16) What column differentiates the V$ views to the GV$ views and how?

The INST_ID column which indicates the instance in a RAC environment the information came from.

17) How would you go about generating an EXPLAIN plan?

Create a plan table with utlxplan.sql.

Use the explain plan set statement_id = ‘tst1′ into plan_table for a SQL statement

Look at the explain plan with utlxplp.sql or utlxpls.sql

18) How would you go about increasing the buffer cache hit ratio?

Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. If a change was necessary then I would use the alter system set db_cache_size command.

19) Explain an ORA-01555

You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.

20) Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

21) How would you determine the time zone under which a database was operating?

select DBTIMEZONE from dual;

22) Explain the use of setting GLOBAL_NAMES equal to TRUE.

Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

23) Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application, a function will return a single value. A package on the other hand is a collection of functions and procedures that are grouped together based on their commonality to a business function or application.

24) Explain the use of table functions.

Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.

25) Name three advisory statistics you can collect.

Buffer Cache Advice, Segment Level Statistics, & Timed Statistics

26) Where in the Oracle directory tree structure are audit traces placed?

In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer

27) Explain materialized views and how they are used.

Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.

28) When a user process fails, what background process cleans up after it?

PMON

29) What background process refreshes materialized views?

The Job Queue Processes.

30) What is the Difference between OLTP and OLAP

OLTP is nothing but OnLine Transaction Processing ,which contains a normalised tables and online data,which have frequent insert/updates/delete.

But OLAP(Online Analtical Programming) contains the history of OLTP data, which is, non-volatile ,acts as a Decisions Support System and is used for creating forecasting reports.

31) How would you determine what sessions are connected and what resources they are waiting for?

Use of V$SESSION and V$SESSION_WAIT

32) Describe what redo logs are.

Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database.

33) How would you force a log switch?

ALTER SYSTEM SWITCH LOGFILE;

34) Give two methods you could use to determine what DDL changes have been made.

You could use Logminer or Streams

35) What does coalescing a tablespace do?

Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents into large single extents.

36) What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.

37) Name a tablespace automatically created when you create a database.

The SYSTEM tablespace.

38) When creating a user, what permissions must you grant to allow them to connect to the database?

Grant the CONNECT to the user.

39) How do you add a data file to a tablespace?

ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>

40) How do you resize a data file?

ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;

41) What view would you use to look at the size of a data file?

DBA_DATA_FILES

42) What view would you use to determine free space in a tablespace?

DBA_FREE_SPACE

43) How would you determine who has added a row to a table?

Turn on fine grain auditing for the table.

44) How can you rebuild an index?

ALTER INDEX <index_name> REBUILD;

45) Explain what partitioning is and what its benefit is.

Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.

46) You have just compiled a PL/SQL package but got errors, how would you view the errors?

SHOW ERRORS

47) How can you gather statistics on a table?

The ANALYZE command.

48) How can you enable a trace for a session?

Use the DBMS_SESSION.SET_SQL_TRACE or

Use ALTER SESSION SET SQL_TRACE = TRUE;

49) What is the difference between the SQL*Loader and IMPORT utilities?

These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formatted or delimited files.

50) Name two files used for network connection to a database.

TNSNAMES.ORA and SQLNET.ORA

References:

The above questions and answers are taken from http://www.dbasupport.com/

 

Oracle Application Express – Installtion Guide

This article provides instructions for installing and configuring the Oracle Application Express (formerly HTML DB) software release 2.2. Please note that these instructions cover the standalone version only.

Installing Oracle Application Express is a two step process:

  1. Configure an Oracle HTTP Server (Release 9.0.3 or higher) with mod_plsql which is used to connect to the Oracle database where the Oracle Application Express objects will be installed. It is also possible to use Oracle 9i Application Server release 1 (1.0.2.2) or higher.
  2. Install the database objects that make up Oracle Application Express to a pre-existing Oracle database (Oracle9i Release 2 (9.2.0.3) or later).

Important Note: When installing Oracle Application Express, you will be required to install the Oracle HTTP Server which can be found on the Oracle10g Release 2 Companion CD. Although not a requirement, I will be installing the Oracle HTTP Server to the same machine which already includes an installation of the Oracle Database software.

The Oracle HTTP Server cannot be installed into an existing Oracle Home. It must be installed into a new Oracle Home!

Prerequisites for the Installation:

This section describes the requirements for installing Oracle Application Express, Release 2.2.

Browser Requirements

To view or develop Oracle Application Express applications, Web browsers must support Java Script and the HTML 4.0 and CSS 1.0 standards. The following browsers meet this requirement:

  • Microsoft Internet Explorer 6.0 or higher (Windows only)
  • Netscape Communicator 7.2 or higher
  • Mozilla 1.2 or higher
  • Firefox 1.0 or higher

Operating System Requirements

From what I have read and tested, Oracle Application Express can be installed on the following Operating System platforms:

Linux – Red Hat Enterprise version AS/ES 2.1 or higher; or SUSE Enterprise Server version SLES-8 or higher.

  • Solaris 9 or higher.
  • Windows 2000 Professions or higher (with service pack 3 or higher)
  • Windows XP Professional
  • Windows 2003 (32-bit systems)

Disk Space Requirements

Verify that the file system that contains the Oracle home directory contains at least 460MB of free disk space for the installation. Also during the installation process, about 110MB of temporary disk space will be required.

Database Requirements

For installing Application Express we need to have a database created before. Same database will be used for creating the objects required for Oracle Application Express.

The installation of Oracle Application Express requires certain objects to be created in an Oracle database. With Oracle Application Express 2.2, the database is required to be Oracle9i Release 2 (9.2.0.3) or later. All of the Oracle Application Express database objects should be created in a separate tablespace which we will create later on in this article.

Shared Pool Size Requirements

Oracle Application Express requires the shared_pool_size of the target database to be at least 100 MB.

Determine the current value of the shared_pool_size parameter:

SQL> show parameter shared_pool_size

Verify JOB_QUEUE_PROCESSES

The initialization parameter JOB_QUEUE_PROCESSES for the Oracle database determines the maximum number of concurrently running jobs. Starting with Oracle Application Express Release 2.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

You can view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SQL> SELECT VALUE FROM v$parameter WHERE NAME = ‘job_queue_processes’;

If you need to modify the JOB_QUEUE_PROCESSES initialization parameter, log into the database as SYSDBA using SQL*Plus and run the ALTER SYSTEM … statement. For example, to set the number of JOB_QUEUE_PROCESSES to 20, use:

SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20;

Installing Oracle HTTP Server

When installing Oracle Application Express, you will be required to install the Oracle HTTP Server which can be found on the Oracle10g Release 2 Companion CD. Although not a requirement, I will be installing the Oracle HTTP Server to the same machine which already includes an installation of the Oracle Database.

Important Note: The Oracle HTTP Server cannot be installed into an existing Oracle Home. If another Oracle product is installed on the same server, you will need to create a new Oracle home name and location for the Oracle HTTP Server

This section assumes you have access to and will be installing the Oracle HTTP Server from the Oracle10g Release 2 Companion CD. Note that with a few minor modifications, you can also install an earlier version of the Oracle HTTP Server from the Oracle10g Release 1 Companion CD.

You can perform the install from the CD or download it from Oracle Technology Network (OTN)

After downloading and unzipping the Oracle10g Release 2 Companion CD software to a temporary directory, follow the instructions below to install the Oracle HTTP Server:

Step 1) Start the Oracle Universal Installer from the Oracle10g Release 2 Companion CD

./runInstaller -invPtrLoc /u01/app/orsbox/OHS/oraInst.Loc
test.jpg

On Select a product to Install Select Oracle Database 10g Companion Products 10.2.0.1.0
2.jpg

3.jpg
On Specify Home Details Select Different Oracle Home path and name (other then ORACLE_HOME for database)

4.jpg

On Available Product Components screen select ‘Apache Standalone’ product only

5.jpg

Pre-Requisite check will run. Check if you get any error here. If there is some error then correct the same and repeat the above steps again.

6.jpg

Check the summary screen and press in ‘Install‘ button

7.jpg

Installer will show you the progress for installation

8.jpg

Configuration Assistant will configure Apache HTTP server and OC4J component.

9.jpg

End of installation. Press Exit and come out of the wizard.

Test the Oracle HTTP Server Installation

After the installation of the Oracle HTTP Server is complete, you should test it. Point your browser to the URL that was displayed on the “End of Installation” screen by the Oracle Universal Installer. For me, the URL was http://ocvmrh2124.us.oracle.com:7777/

Starting / Stopping / Restarting Oracle HTTP Server:

Start All: $ORACLE_HOME/opmn/bin/opmnctl startall
Stop All : $ORACLE_HOME/opmn/bin/opmnctl stopall
Start HTTP Process: $ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=HTTP_Server
Stop HTTP Process : $ORACLE_HOME/opmn/bin/opmnctl stopproc ias-component=HTTP_Server
Restart HTTP Process: $ORACLE_HOME/opmn/bin/opmnctl restartproc ias-component=HTTP_Server

Installing Oracle Application Express:

Download Oracle Application Express 2.2

APEX 2.2 can be downloaded from official OTN site

Oracle Application Express was previously known as HTML DB. With the release of 2.0, Oracle officially changed the name from HTML DB to Oracle Application Express (APEX) on January 30, 2006.

Important Note: Note that the version of HTML DB shipped on the Oracle10g Release 2 Companion CD is version 1.6. With Oracle10g Release 1, the version of HTML DB is 1.5.

After downloading the file from OTN, unzip the same.

You need to create a new tablespace for APEX application.

Create Tablespace for Oracle Application Express Database Objects:

SQL> CREATE TABLESPACE htmldb DATAFILE ‘/u01/app/orsbox/oradata/htmldb_01.dbf’ SIZE 1000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT auto;

Tablespace created.

Create Oracle Application Express Database Objects:

After the new tablespace has been created, the next step is to create all required database objects for Oracle Application Express. These database objects are all created by running a single SQL script that can be found in the Oracle Application Express software distribution downloaded earlier in this section. The SQL script to run is named apexins.sql and can be found in the apex directory created when unzipping the software distribution. For the purpose of this example, I ran the script as follows (note that this install script can take quite awhile to complete):

Change the directory to APEX directory you have unziped

[orsbox@ocvmrh2124 conf]$ cd apex

Connect to database as sysdba and run following command

@apexins welcome htmldb htmldb temp /i/ orcl

Below is the brief explanation for this command.

Parameters to APEX Database Object Creation SQL Script
welcome The password for the Oracle APEX administrator account, the APEX schema owner (FLOWS_020200), the APEX files schema owner (FLOWS_FILES), and the APEX public user schema (APEX_PUBLIC_USER). The APEX schema owner is the user or schema into which Oracle Application Express database objects will be installed. The APEX files schema owner is the user or schema where uploaded files are maintained in Oracle Application Express.
htmldb Name of the default tablespace for the APEX schema owner – (FLOWS_020200).
htmldb Name of the default tablespace for the APEX files schema owner – (FLOWS_FILES). Note that Oracle Application Express creates a table namedFLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ in this tablespace used to store any uploaded files. Although this could have been a separate tablespace, it is just as easy having the all objects in a single tablespace.
temp Name of the temporary tablespace to be used for all schemas created by the Oracle Application Express install process.
/i/ Virtual directory that is used for images rendered by Oracle Application Express. To support future Oracle HTML DB upgrades, define the virtual image directory as/i/.
orcl Name of the Oracle Net connect string to the database where Oracle Application Express database objects are to be installed. If this is a local install, you can usenone or NONE.

During the Oracle Application Express install process, three schemas will be created. A description of each of these schemas is provided in the following table:

Oracle Application Express Database Schema Accounts
FLOWS_020200 This is basically the schema owner of all objects (tables, views, packages, functions, etc.) used by Oracle Application Express. The only exception is the table installed in the FLOWS_FILES schema (FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$) for storing uploaded files. Note that this account is locked at the end of the installation and cannot be used unless it is first unlocked.
FLOWS_FILES This schema is used to store uploaded files to Oracle Application Express. These can include scripts, documents, cascading style sheets, etc. Note that this account is locked at the end of the installation and cannot be used unless it is first unlocked.
APEX_PUBLIC_USER This schema is used by Oracle Application Express to login to the database and has access to database objects in the above two schemas for all application functionality.

Recompiling Invalid PL/SQL Packages:

After installing the Oracle Application Express database objects, it is recommended (however not required) to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time.

Run the utlrp.sql script from the Oracle Database home:

SQL> @?/rdbms/admin/utlrp.sql

Install Oracle Application Express Database Images:

After successfully creating all of the required Oracle Application Express database objects, the next step is to copy the necessary images, templates, cascading style sheets, themes, java scripts, (and several other file types) into the directory tree of the Oracle HTTP Server. The Oracle HTTP Server was installed earlier in this article and is located at:

$ORACLE_HOME = /u01/app/orsbox/OHS

The images and other file types to copy can be found in the Oracle Application Express software distribution downloaded earlier under the …/apex/images directory.

The files will need to be copied to the $ORACLE_HOME/Apache/Apache/images directory as illustrated in the following examples:

[orsbox@ocvmrh2124 orsbox]$ cd apex
[orsbox@ocvmrh2124 orsbox]$ cp -R images $ORACLE_HOME/Apache/Apache

Configure Database Access Descriptor:

Now that the Oracle Application Express images are in place, the next step is to configure the Oracle Database Access Descriptor (DAD) file. The configuration file is named dads.conf and should be located in the $ORACLE_HOME/Apache/modplsql/conf directory. The DAD is used by the Oracle HTTP Server and mod_plsql extension module to connect to the Oracle database.

Change the below text according to your setup and copy the below text to dads.conf

Parameters to be changed in below text are

Alias -> This is the alias for images directory under Apache Home
PlsqlDatabasePassword -> This is the password for APEX user, you can set any password here, which will be used further
PlsqlDatabaseConnectString -> This is the connect string for your database. This is of the form HOST.DOMAIN:PORT:DB_NAME

=============================================================== Alias /i/ “/u01/app/orsbox/OHS/Apache/Apache/images/”
AddType text/xml xbl
AddType text/x-component htc

<Location /pls/apex>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDatabasePassword welcome
PlsqlDatabaseConnectString ocvmrh2124.us.oracle.com:1522:ORCL
PlsqlAuthenticationMode Basic
PlsqlDefaultPage apex
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
</Location>
===============================================================

For a complete description of each of the parameters used in the dads.conf configuration file, read through the file dads.README located in the same directory. The following table provides a brief description of the key parameters:

Oracle DAD Configuration Parameters and Description
Alias This is set to the virtual directory you specified when running theapexins.sql file to create the Oracle Application Express database objects. This value must match the value you specified which is recommended to be /i/. The virtual directory should refer to the location where you copied the Oracle Application Express images to in the Oracle HTTP Server directory tree.
<Location /pls/apex> This is the name of the virtual path that will be used to access application in Oracle Application Express. For example,http://linux3:7777/pls/apex/f?p=100.
PlsqlDatabaseUsername This is the database username that will be used by the mod_plsqlextension module to connect to Oracle database. The database username should be APEX_PUBLIC_USER – the schema created by theapexins.sql script. All connections coming from an Oracle Application Express application, regardless of their login id and password, will be connected to the database with this username. This even includes applications that use a different parsing schema! Consider an application that uses a parsing schema of DEV_WS. The session user will be APEX_PUBLIC_USER but the Current User will be set to DEV_WS

SELECT
    sys_context('USERENV','SESSION_USER') "Session User"
  , sys_context('USERENV','CURRENT_USER') "Current User"
FROM dual;

Session User      Current User
----------------- ------------
APEX_PUBLIC_USER  DEV_WS
PlsqlDatabasePassword This must match the password you provided during the creation of the Oracle Application Express database objects (@apexins.sql). This is the password used by the PlsqlDatabaseUsername (above) to connect to the Oracle database.
PlsqlDatabaseConnectString The connection URL string used to connect to the Oracle database in the format server.domain:port:sid. If the database is located on the same server, you can use localhost.

Obfuscate the PlsqlDatabasePassword Parameter:

Notice that when we configured the dads.conf file, we put in the plain text password for the Oracle database user. Exposing plain text passwords is never good security practice, especially for this sensitive database account. Fortunately, Oracle provides an obfuscation utility that targets and encrypts the PlsqlDatabasePassword entry in the dads.conf file. This utility is named dadTool.pl and can be found in the $ORACLE_HOME/Apache/modplsql/conf directory.

Run the dadTool.pl utility as follows:

[orsbox@ocvmrh2124 orsbox]$ export ORACLE_HOME=/u01/app/orsbox/OHS
[orsbox@ocvmrh2124 orsbox]$ echo $LD_LIBRARY_PATH

[orsbox@ocvmrh2124 orsbox]$ PATH=$ORACLE_HOME/Apache/modplsql/conf:$PATH;export PATH
[orsbox@ocvmrh2124 orsbox]$ PATH=$ORACLE_HOME/perl/bin:$PATH:.;export PATH
[orsbox@ocvmrh2124 orsbox]$ LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
[orsbox@ocvmrh2124 orsbox]$ PERL5LIB=$ORACLE_HOME/perl/lib:.;export PERL5LIB
[orsbox@ocvmrh2124 orsbox]$ cd $ORACLE_HOME/Apache/modplsql/conf
[orsbox@ocvmrh2124 conf]$ perl dadTool.pl -o

Information
—————————————————————————-
Backed up older dads.conf as /u01/app/orsbox/OHS/Apache/modplsql/conf/dads.conf.orig.2007-07-13_09-04

All passwords successfully obfuscated. New obfuscations : 1
[orsbox@ocvmrh2124 conf]$

Restart the Oracle HTTP Server:

[orsbox@ocvmrh2124 conf]$ $ORACLE_HOME/opmn/bin/opmnctl restartproc ias-component=HTTP_Server
opmnctl: restarting opmn managed processes…

Now you can access your APEX URL: http://ocvmrh2124.us.oracle.com:7777/pls/apex

 

Oracle – Stellent

Oracle – Stellent

Oracle announced that it has agreed to acquire Stellent, Inc. (NASDAQ: STEL), a global provider of enterprise content management (ECM) software solutions, through a cash tender offer for $13.50 per share, or approximately $440 million. On December 14, 2006, Oracle completed its acquisition of Stellent Inc., a global provider of enterprise content management (ECM) software solutions.

The combination of Oracle and Stellent offers customers secure, reliable, and highly scalable content management solutions that meet the day-to-day needs of all users across the enterprise, while also delivering sophisticated ECM capabilities to professional users.

More details about the same in press release

Oracle Enterprise Content Management:

Oracle Enterprise Content Management is the industry’s most unified enterprise content management platform that enables you to leverage industry-leading document management, Web content management, digital asset management, and records management functionality to build your business applications. Building a strategic enterprise content management infrastructure for content and applications helps you to reduce costs, easily share content across the enterprise, minimize risk, automate expensive, time-intensive and manual processes, and consolidate multiple Web sites onto a single platform.

Here we will see the installation and use of Oracle Universal Content Management.

Pre-Requisite:

UCM (Universal Content Management) uses any of the existing database like Oracle, IBM DB2, Sybase, SQL Server etc and creates repository for document management.
Also UCM needs apache installtion version 2.0 or more.

Pre-Installation Steps:

Before starting the installation, make sure to create a new tablespace in your database for conctent management. Also create a new user for content management. This will be the user used by tool for entry into the database.

SQL> create tablespace cs_tbs datafile ‘/u01/app/oracle/product/oradata/cs_tbs01.dbf’ size 500M extent management local
2  segment space management auto;


Tablespace created.

SQL> create user csuser identified by welcome
2  default tablespace cs_tbs
3  temporary tablespace temp
4  quota unlimited on cs_tbs account unlock;

User created.

Installating Apache (version 2.0 or more):

You need to have Apache http server installed for accessing this product. The version for Apache should be 2.0 or more. You can install apache by following this URL.

Universal Content Management Installation:

[oracle@ocvmrh2023 linux]$ ./setup.sh

Please select your locale from the list.
*1. English-US
2. English-UK
Choice?
1

Throughout the install, when entering a text value, you can press Enter to accept the default that appears between square brackets ([]). When selecting from a list, you can select the choice followed by an asterisk by pressing Enter.

Select installation type from the list.
*1. Install new server
2. Update a server
Choice?
1

Content Server Installation Directory

Please enter the full pathname to the installation directory.
Content Server Core Folder [/stellent/server]:
/u01/app/oracle/product/UCM/stellent/server

Create Directory
*1. yes
2. no
Choice?
1

Java virtual machine
*1. Sun Java 1.5.0_11 JDK
2. Specify a custom Java virtual machine
Choice?
1
Installing with Java version 1.5.0_11.

Enter the location of the native file repository. This directory contains the native files checked in by contributors.
Content Server Native Vault Folder [/u01/app/oracle/product/UCM/stellent/server/vault/]:

Create Directory
*1. yes
2. no
Choice?
1

Enter the location of the web-viewable file repository. This directory contains files that can be accessed through the web
server.
Content Server Weblayout Folder [/u01/app/oracle/product/UCM/stellent/server/weblayout/]:

Create Directory
*1. yes
2. no
Choice?
1

This server can be configured to manage its own authentication or to allow another master to act as an authentication proxy.
Configure this server as a master or proxied server.
*1. Configure as a master server.
2. Configure as server proxied by a local master server.
Choice?
1

During installation, an admin server can be installed and configured to manage this server. If there is already an admin server
on this system, you can have the installer configure it to administrate this server instead.
Select admin server configuration.
*1. Install an admin server to manage this server.
2. Configure an existing admin server to manage this server.
3. Don’t configure an admin server.
Choice?
1

Enter the location of an executable to start your web browser. This browser will be used to display the online help.
Web Browser Path [/usr/bin/mozilla]:

Content Server locale
*1. English-US
2. English-UK
Choice?
1

Please select the region for your timezone from the list.
*1. Use the timezone setting for your operating system
2. Pacific
3. America
4. Atlantic
5. Europe
6. Africa
7. Asia
8. Indian
9. Australia
Choice?
1

If you are working with multilingual content, you may want to set the file encoding for the content server to UTF-8. If not set
to UTF-8, the server will use the native encoding of your operating system.
Use UTF-8 file encoding
1. yes
*2. no
Choice?
2

Please enter the port number that will be used to connect to the Content Server. This port must be otherwise unused.
Content Server Port [4444]:

Please enter the port number that will be used to connect to the Admin Server. This port must be otherwise unused.
Admin Server Port [4440]:

Enter a security filter for the Content Server port. Hosts which are allowed to communicate directly with the Content Server
port may access any Content Server managed resource. Insure that hosts which need access are included in the filter. See the
installation guide for more details.
Incoming connection address filter [127.0.0.1]:
127.0.0.1|140.87.222.145

*** Content Server URL Prefix

The URL prefix specified here is used when generating HTML pages that refer to the contents of the weblayout directory within
the installation. This prefix must be mapped in the web server Additional Document Directories section of the Content Management
administration menu to the physical location of the weblayout directory.

For example, “/stellent/” would be used in your installation to refer to the URL http://stellent.company.com/stellent which
would be mapped in the web server to the physical location /stellent/server/weblayout.
Web Server Relative Root [/idc/]:

Enter the name of the local mail server. The Content Server will contact this system to deliver email.
Company Mail Server [mail]:

Enter the e-mail address for the system administrator.
Administrator E-Mail Address [sysadmin@mail]:

*** Web Server Address

Many generated HTML pages refer to the web server you are using. The address specified here will be used when generating those
pages. The address should include the host and domain name in most cases. If your webserver is running on a port other than 80,
append a colon and the port number.

Examples: www.stellent.com, stellent.company.com:90
Web Server HTTP Address [ocvmrh2023]:

Enter the name for this instance. This name should be unique across your entire enterprise. It may not contain characters other
than letters, numbers, and underscores.
Content Server Instance Name [idc]:

Enter a short label for this instance. This label is used on web pages to identify this instance. It should be less than 12
characters long.
Content Server Instance Label [idc]:

Enter a long description for this instance.
Content Server Description [Content Server idc]:

Web Server
*1. Apache
2. Sun ONE
3. Configure manually
Choice?
1

Please select a database from the list below to use with the Content Server.
Content Server Database
*1. Oracle
2. Microsoft SQL Server 2005
3. Microsoft SQL Server 2000
4. Sybase
5. DB2
6. Custom JDBC settings
7. Skip database configuration
Choice?
1

Manually configure JDBC settings for this database
1. yes
*2. no
Choice?
2

Manually configure JDBC settings for this database
1. yes
*2. no
Choice? n
Choice?
2

Oracle Server Hostname [localhost]:ocvmrh2023

Oracle Listener Port Number [1521]:

*** Database User ID

The user name is used to log into the database used by the content server.
Oracle User [user]:csuser

*** Database Password

The password is used to log into the database used by the content server.
Oracle Password []:
welcome

Oracle Instance Name [ORACLE]:orcl

Configure the JVM to find the JDBC driver in a specific jar file
1. yes
*2. no
Choice?
2

The installer can attempt to create the database tables or you can manually create them. If you choose to manually create the
tables, you should create them now.
Attempt to create database tables
1. yes
*2. no
Choice?
1

The database you selected supports using Unicode (UCS-2) text fields instead of native encoded text fields. If you are working
with multilingual content, you may want to use Unicode text fields instead of native encoding text fields.
Use Unicode text fields
1. yes
*2. no
Choice?
2

Select components to install.
1. CheckOutAndOpen: Checkout and Open component
*2. CheckSCSHealth: Content Server health checking support
*3. comptool: Command-line component installation tool
*4. ConfigMigrationUtility: Configuration packaging and installation utility
5. ExtranetLook: Extranet website support
6. FileStoreProvider: Alternate FileStoreProvider Implementation
7. LinkManager8: Hypertext link management support
8. OracleQueryOptimizer: Tool for configuring database query hints
*9. PopUpCalendar: Popup calendar for selecting dates
10. ProxyConnections8: Proxy connections plugin support
11. ThreadedDiscussions: Threaded discussion management
*12. CoreWebdav: Content Server Core WebDAV support
*13. WebUrlMapPlugin: Web URL mapping tool
*14. WsdlGenerator: WSDL generator tool
*15. YahooUserInterfaceLibrary: Yahoo User Interface components
16. DBSearchContainsOpSupport: Database Search ‘contains’ operator support.
Enter numbers separated by commas to toggle, 0 to unselect all, F to finish:

Checking configuration. . .

Configuration OK.

Review install settings. . .
Content Server Core Folder: /u01/app/oracle/product/UCM/stellent/server
Java virtual machine: Sun Java 1.5.0_11 JDK
Content Server Native Vault Folder: /u01/app/oracle/product/UCM/stellent/server/vault/
Content Server Weblayout Folder: /u01/app/oracle/product/UCM/stellent/server/weblayout/
Proxy authentication through another server: no
Install admin server: yes
Web Browser Path: /usr/bin/mozilla
Content Server locale: English-US
Content Server Port: 4444
Admin Server Port: 4440
Incoming connection address filter: 127.0.0.1|140.87.222.145
Web Server Relative Root: /idc/
Company Mail Server: mail
Administrator E-Mail Address: sysadmin@mail
Web Server HTTP Address: ocvmrh2023
Content Server Instance Name: idc
Content Server Instance Label: idc
Content Server Description: Content Server idc
Web Server: Apache
Content Server Database: Oracle
Manually configure JDBC settings for this database: false
Oracle Server Hostname: ocvmrh2023
Oracle Listener Port Number: 1521
Oracle User: csuser
Oracle Password: zOM7/dPTbxKhdCRQzA4jSV9eBjlsXKu4A4fJY/StGPU=
Oracle Instance Name: orcl
Configure the JVM to find the JDBC driver in a specific jar file: false
Attempt to create database tables: yes
Use Unicode text fields: no
Components:
CheckSCSHealth,comptool,ConfigMigrationUtility,PopUpCalendar,CoreWebdav,

WebUrlMapPlugin,WsdlGenerator,YahooUserInterfaceLibrary

Proceed with install
*1. Proceed
2. Change configuration
3. Recheck the configuration
4. Abort installation
Choice?
1
Finished install type Install at 7/26/07 8:20 AM.

Post Install Steps:

Carry out the following changes in Apache configuration file httpd.conf. Add following entry (after making the changes specific to your installation) at the end of file.

LoadModule IdcApacheAuth /u01/app/oracle/product/UCM/stellent/server/shared/os/linux/lib/IdcApache22Auth.so
IdcUserDB idc “/u01/app/oracle/product/UCM/stellent/server/data/users/userdb.txt”

Also set the alias for weblayout directory present in install base. Add the below content (after making the changes specific to your installation) in the lines of “location” settings in configuration file.

Alias /idc “/u01/app/oracle/product/UCM/stellent/server/weblayout”
<Location /idc>
Order allow,deny
Allow from all
DirectoryIndex portal.htm
IdcSecurity idc
</Location>

Login Access:

http://ocvmrh2023.us.oracle.com:7771/idc/

Multiple Database Block Sizes and the Buffer Cache

In oracle 10g we can have multiple block sizes at the same time. When a tablespace is created we can assign a block size for the objects that will be created in that tablespace.

The DB_BLOCK_SIZE parameter in your initialization parameter file determines the size of your standard block size in the database and frequently is the only block size for the entire database.

The DB_CACHE_SIZE parameter in your initialization parameter file specifies the size (in bytes) of the cache of the standard block sized buffers. Notice that you don’t set the number of database buffers; rather, you specify the size of the buffer cache itself in the DB_CACHE_SIZE parameter.

You can have up to five different database block sizes in your databases. That is, you can create your tablespaces with any one of the five allowable database block sizes.

But before you use non standard block size, you have to define the cache size for these non standard block size. We have a paramter called DB_nK_CACHE_SIZE for setting the cache size for non standard block size.

The new init.ora parameters that allow you to use non-default block sizes are:

DB_2K_CACHE_SIZE
DB_4K_CACHE_SIZE
DB_8K_CACHE_SIZE
DB_16K_CACHE_SIZE
DB_32K_CACHE_SIZE

Another classification for buffer cache is depending on the algorithm used to keep the contents into the cache. We have basically 3 types in this catagory.

1) DB_KEEP_CACHE_SIZE
2) DB_RECYCLE_CACHE_SIZE
3) DB_CACHE_SIZE

DB_KEEP_CACHE_SIZE is where the object are always present when they are loaded. The objects which qualifies for this cache are those which are very frquently accessed and which has to be retained in memory. For example, frquently used small lookup tables. This cache is a subset of default cache defined by parameter DB_CACHE_SIZE. For any database we need to have DB_CACHE_SIZE set.

DB_RECYCLE_CACHE_SIZE is where you dont want to store the object. You want to clear off the object from cache as soon as it is used. You have to be careful while using this, since this may incure performance hit in case you allocated a frequently used object to this cache.

DB_CACHE_SIZE is the size for default cache.

it is important to note that the init.ora parameters and functionality regarding the keep and recycle buffer pools has changed between Oracle8i and Oracle9i. Those changes are
summarized in the table below:

Version Of Oracle Init.ora parameters Functionality
Oracle8i                             BUFFER_POOL_KEEP = <buffers>                Subsets of the data
BUFFER_POOL_RECYCLE = <buffers>        buffer cache

Oracle9i and 10g              DB_KEEP_CACHE_SIZE = <size>                   Independent of the
DB_RECYCLE_CACHE_SIZE = <size>           data buffer cache

To specify the use of the keep, recycle or default buffer pools, you can use the storage clause of the alter table statement:

alter table <table_name> storage (buffer pool keep);
alter table <table_name> storage (buffer pool recycle);
alter table <table_name> storage (buffer pool default);

Note: The keep and recycle buffer pools are only available for the standard
block size. Non-standard block-size caches have a single default pool.

So again back to non standard cache size. Lets say the default block size is 8K and you want to create 1 more block size for you future tablespaces. In that case you have to
assign the buffer cache for those block size in the memory. Remember, when
you create a non standard block sizes, the memory (cache size) allocation for these block
size will be taken again from physical memory RAM and hence the RAM consumption with go up. This memory wont be allocated from existing db_cache_size.

Example

SQL> show parameters db_cache_size

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_cache_size                        big integer 200M

Now we have 200M set for DB_CACHE_SIZE and db_keep_cache_size and db_recycle_cache_size is not set.

SQL> show parameter db_keep_cache_size

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_keep_cache_size                   big integer 0

SQL> show parameter db_recycle_cache_size

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recycle_cache_size                big integer 0

Also we can see the size of buffer cache using show sga

SQL> show sga

Total System Global Area 1073741824 bytes
Fixed Size                  1984184 bytes
Variable Size             750786888 bytes
Database Buffers 209715200 bytes
Redo Buffers                6397952 bytes
Lets now try to create a tablespace with 4K block size.

SQL> create tablespace test_tbs4k datafile ‘/dy/oracle/product/db10g/dbf/test_tbs4k_1.dbf’ size 100M blocksize 4K;
create tablespace test_tbs4k datafile ‘/dy/oracle/product/db10g/dbf/test_tbs4k_1.dbf’ size 100M blocksize 4K
*
ERROR at line 1:
ORA-29339: tablespace block size 4096 does not match configured block sizes

Oracle in not intelligent enough to translate the block size of 4k into 8k buffer size. Because it cannot load the content of this datafile created for this tablespace having block size of 4k into buffer buffer of 8k.

So we need to create a buffer of 4K block size, after that only we can create a tablespace for 4k block size.

If we see the parameter db_4k_cache_size is not set.

SQL> show parameters db_4k_cache_size

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_4k_cache_size                     big integer 0

SQL> alter system set db_4k_cache_size = 100M;

System altered.

SQL> show parameter db_4k_cache_size;

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_4k_cache_size                     big integer 100M
SQL> show parameter db_cache_size

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_cache_size                        big integer 200M
SQL> show sga

Total System Global Area 1073741824 bytes
Fixed Size                  1984184 bytes
Variable Size             750786888 bytes
Database Buffers 314572800 bytes
Redo Buffers                6397952 bytes
SQL>

If we see the above stats, it clearly shows tghat db_cache_size has not reduced, but
database buffer size has increased not to 300M. Now we can create a tablespace for 4K block size

SQL> create tablespace test_tbs4k datafile ‘/dy/oracle/product/db10g/dbf/test_tbs4k_1.dbf’ size 100M blocksize 4K;

Tablespace created.

SQL>

You can get the information about your database buffer cache from a view v$buffer_pool

SQL> select name, block_size, current_size from v$buffer_pool;

NAME                 BLOCK_SIZE CURRENT_SIZE
——————– ———- ————
DEFAULT                    8192          200
DEFAULT                    4096          100

You can get more stats and information on you buffer pool using the view v$buffer_pool_statistics.

 

Installing Oracle Database 10g R2 on Solaris 5.9

Introduction

To being with installation we need to follow some pre-reqs docs regarding operating system requirements, Checking disk space, RAM, correct OS patches and correct Oracle software dump. Here we will see the installation steps of Oracle Database 10.2.0.2 on Solaris 5.9

Determining Disk and Memory Requirements

For Solaris OS you can check the OS level setting as given below. Check metalink note 169706.1 for the same.

Checking swap space

bash-2.05$ swap -s
total: 9342392k bytes allocated + 1155400k reserved = 10497792k used, 6616928k available

Checking RAM

bash-2.05$ /usr/sbin/prtconf | grep -i memory
Memory size: 16384 Megabytes
memory (driver not attached)
virtual-memory (driver not attached)

Checking OS version

bash-2.05$ uname -r
5.9

Checking Disk space

bash-2.05$ df -h .
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/dg01/vol01
615G   258G   335G    44%    /dy
Performing Pre-Installation Tasks

1)  Checking Additional OS packages for Solaris

Some additional packages are required for successful installation of Oracle software. To check whether required packages are installed on your operating system use following command:

bash-2.05$ pkginfo -i SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8
system      SUNWbtool      CCS tools bundled with SunOS
system      SUNWhea        SunOS Header Files
system      SUNWi1of       ISO-8859-1 (Latin-1) Optional Fonts
system      SUNWlibm       Forte Developer Bundled libm
system      SUNWlibms      Forte Developer Bundled shared libm
system      SUNWmfrun      Motif RunTime Kit
system      SUNWsprot      Solaris Bundled tools
system      SUNWtoo        Programming Tools
system      SUNWuiu8       Iconv modules for UTF-8 Locale
system      SUNWxwdv       X Windows System Window Drivers
system      SUNWxwfnt      X Window System platform required fonts
system      SUNWxwplt      X Window System platform software
ERROR: information for “SUNWi1cs” was not found
ERROR: information for “SUNWi15cs” was not found
ERROR: information for “SUNWxwplr” was not found
ERROR: information for “SUNWgcc” was not found

Install the missing package using command

pkgadd -d . SUNWi1cs SUNWi15cs SUNWxwplr SUNWgcc

(Note that above installation of packages must be done as a ROOT user)

2) Setting kernel parameters

Set the following values (either greater then or equal to) in /etc/system file as root user.

noexec_user_stack 1
semsys:seminfo_semmni 100
semsys:seminfo_semmns 1024
semsys:seminfo_semmsl 256
semsys:seminfo_semvmx 32767
shmsys:shminfo_shmmax 4294967295
shmsys:shminfo_shmmin 1
shmsys:shminfo_shmmni 100
shmsys:shminfo_shmseg 10

3) Reboot the system

/usr/sbin/reboot

4) Creating Oracle user

groupadd oinstall
groupadd dba
useradd -d /export/home/oracle -g oinstall -G dba -m -s /bin/ksh oracle
passwd -r files oracle

5) Check DISPLAY settings

You should check the DISPLAY setting if you are not doing the silent installation. You can do this using following command.

Check the IP address from /etc/hosts file.

export DISPLAY=(IP Address):1.0

6) Go to the dump location and execute runInstaller.

bash-2.05$ pwd
/nfs/stage/solaris/oracle/10G-R2-102010/Disk1/database
bash-2.05$ ls
doc           install       response      runInstaller  stage         welcome.html

The first screen that you see is the welcome screen. You can check the Oracle products that are installed using this screen. Also you can uninstall a product.

Once we press next…

Next screen will ask about Inventory directoy for our database. Specify the correct inventory directory (either central inventory or local inventory). The OS group can be either DBA or OINSTALL. Specify the correct value and press next.

Select the type of installation you want to do. The features for each type of installation is already provided. Press next when selected. Here we are doing Enterprise installation.

Select the location for your Oracle Home and the name. Please note that Oracle base directory should be created before proceeding further and also it should have correct permissions. Here Oracle base is /u00/oracle/product. The other directories for Oracle Home will be created by Oracle. Press next when selected the correct directory.

Oracle Universal Installer will perform the pre-install checks about the OS version, patch levels, memory parametrers etc.

You can select at this screen, whether you want to create a database or you want to install just a software on you want to configure ASM as well. Lets select database creation option and press next.

Select the type of database you want to create. In this case we will create a General purpose database.

Here you have to select the Global database name and SID. You can also select the character case and a choice to create sample schemas. Press next.

Since you are installing a single database and not a grid installation, so the choice of “Use Grid Control for Database Management” is disabled. You have to sue Database management, and you can enable EMail notifications. So that if there are some critical alerts then you can get an email notification for the same.

On “Specify Database Storage Option” you can specify the option for your file system. It can be either OS file system, or ASM or raw disk. Here we will be using OS file system.

On “Specify Backup and Recovery Option” you can specify if you need any automated backups for the environment. If you are opting for automated backups, then you need to specify the location for flash recovery area. Also you need to specify the operating system login credentials.

On this screen you need to specify the admin passwords. You need to specify passwords for SYS, SYSTEM, SYSMAN and DBSNMP. Here you have an option for having different passwords as well as same passwords for all users.

Final summary screen will just display the summary of installations that are going to happen. It will show complete product list, which is going to be installed. Press Install button.

Once you press on Install, the installation will start and it will install the products automatically. Also you can check the current action of installer by checking the log file provided at the botton of window. After the main software installation, the next screen comes the configuration screen as shown below.

Configuration screen will carry out network configuration, database configurations and installation of SQL* plus client tool. Network configuration is just configuring listener for database to take up remote connections. Database configuration assistant will come into picture when we are giving the option to create a database in “Select Configuration option” screen.

Once network configuration is done, universal installer will automatically start database configuration assistant. This will do the actual database creation. Here database name will be the one, which we specified on “Specify database configuration options” screen.

Once the installation completes an “End of Installation” screen will come. Here OUI will provide you will all the URLs for logging into Database Enterprise Manager. Here the last URL is EM URL.

That completes the installation of Oracle Database 10g R2 with creating a database using DBUA(Database Configuration Assistant).

 

Installing Oracle Apps 11i

Introduction

This post is about installing Oracle Apps 11i using rapid install. This is a very brief discription of the install document provided by Oracle. For details, you can always refer to the official docs of Oracle. I am providing the installation sequence for one of my test instance. I hope this will serve as a fast and simple docs for you to quickly understand the installation and the steps.

Basic installation of Oracle Applications 11i is divided into 3 parts.

  1. Pre-installation
  2. Installation
  3. Post-installation.

Pre-Installation

i) Checking system requirement

In pre-installation we check about

1) Software Requirement
2) CPU Requirement
3) Memory Requirement
4) Disk Space Requirement

required for installing Oracle Applications.

ii) Creating staging area

We then create a staging area where we download and extract all the required files. The staging area after extracting the software will look as shown below.

[root@ocvmrh2122 11i10_CU2_115102]# ls -rlt
total 24
drwxr-xr-x    5 root     root         4096 Oct 13  2005 oraDB
drwxr-xr-x   26 root     root         4096 Oct 13  2005 oraAppDB
drwxr-xr-x    6 root     root         4096 Oct 13  2005 oraiAS
drwxr-xr-x   10 root     root         4096 Oct 13  2005 oraApps
drwxr-xr-x    9 root     root         4096 May  7  2007 startCD

You need around 24G for staging area after extraction.

iii) Creating User Accounts

Before we start installation we need to create 2 users. One user (APPLMGR) will be the owner of middle tier and other user (ORACLE) will be the owner of database. Assign the primary owner as “oinstall” and secondary owner as “dba” for both the users.

Check the display setting before starting the installation. You can set the DISPLAY to hostname:0.0

Installation

We begin installation by running rapidwiz present in  startCD/Disk1/rapidwiz/ directory. Below are the screen shots that you will see. I have given the screen shots with my input for your easy referrence so that you can go through the same fast.

1.jpg

Welcome screen lists the database version and the technology stack components that are installed with the E-Business Suite. Click on next.

2.jpg

You can either make a new installation of upgrade an existing installation. In our case we are going to do a new installation. In case of Express Configuration you supply a few basic parameters, such as database type and name, top-level install directory, and increments for port settings. The remaining directories and mount points are supplied by Rapid Install using default values.

3.jpg

If you have previous installation saved configuration file you can give that as input. If you answer No, Rapid Install saves the configuration parameters you enter on the wizard screens in a new configuration file (config.txt) that it will use to configure your system for the new installation.

4.jpg

You can either select a single node installation of a multi-node installation. In our case we are going for a single node installation.

5.jpg

Select database type. We can either have a Vision demo database or a production database. Production database won’t have any data. Vision demo database will have test data present for our testing. If you are using Vision demo database then your database will need around 130G-140G of space. Else in case of production database space required would be 45G.

6.jpg

Set up the Oracle user and base install directory. Once you set the base install directory, all other directories will be set automatically. You can also edit the individual directories like ORACLE_HOME or db file location as per your requirement.

72.jpg

Select the type of licensing you got from Oracle. Completing a licensing screen does not constitute a license agreement. It simply registers your products as active.

8.jpg

If you select E-Business Suite price bundle then you will see this screen with some of the checkbox grayed. The products that are checked and grayed are licensed automatically as a part of the suite. The ones that are not must be registered separately as additional products — they are not part of the E-Business Suite price bundle. Place a check mark next to any additional products you have licensed and want to register.

9.jpg

Some systems require the country-specific functionality of a localized Applications product. For example, if your company operates in Canada, products such as Human Resources require additional features to accommodate the Canadian labor laws and codes that differ from those in the United States. In such situation, select the proper country. In my case there is no country specific functionality.

10.jpg

Select additional language. By default US will be selected. If you want to install any more language, then you can always select from the available list.

11.jpg

The Select Internationalization Settings screen derives information from the languages you entered on the Select Additional Languages screen. You use it to further define NLS configuration parameters.

12.jpg

Select the user and base directory for the application side installation. Once you set the base install directory, all other directories will be set automatically. You can also edit the individual directories like APPL_TOP, COMMON_TOP etc. as per your requrement.

13.jpg

Provide the domain name and the port ranges. Give the ports that are not used before as per your knowledge. Anyway the installer will check for port conflicts before it installs the application. You can even change the individual port setting as well.

14.jpg

You have now completed all the information Rapid Install needs to set up and install a single-node system. The Save Instance-specific Configuration screen asks you to save the values you have entered in the wizard in a configuration file.

15.jpg

Review pre-install checks. This will check whether all the requirements are met or not.

171.jpg

Once all the requirements are met, please proceed further to install the application.

16.jpg

Before installation it will give the summary of the techstack its going to install. Click on next.

18.jpg

You can see the progress of installation.

19.jpg

Once all the installation is done, it will show the components installed and its status.

21.jpg

Post-Installation

You can check for the post install steps from the metalink note ID 316365.1 as applicable.

Reference:

Oracle Apps 11i – Install Docs

Metalink Note ID: 316365.1

 

Enabling SSL in Oracle E-Business Suite Release 12

Overview

SSL stands for Secure Socket Layer which is protocol developed by Netscape. Data Transferred between Server & Client is secured (Encrypted).
Usually data transmitted between client machine & server (Web Server on http protocol & Forms Server on Sockets ) is clear text packets. Any one can put Packet Sniffer between Client machine & Server & can open & read all data transaction between your machine & Server (If he/she has network access) Hacker can get your Username/Password or any sensitive data. This become critical when you have Internet access to Oracle Applications 11i (Usually Self Service Implementation)

Communication between Client & Oracle Applications happens via three components.

  • Oracle Web Server (Initial Connection & all self service access is via Web Server/Apache). If your Form Server is in servlet Mode then Core Applications are also accessed via Web Server (oacore Component)
  • Oracle Form Server: For Core Oracle Application Access (Forms)
  • Database : You access web server which in turn talks to database Server via UTL_HTTP package via dad (/pls/$SID)

So You enable SSL on particular component depending on your requirement & component which is accessible over Internet & should be secured. You can Implement across all three component or only one or any two.

Concept:

SSL is a technology that defines the essential functions of mutual authentication, data encryption, and data integrity for secure transactions. Exchange of data between the client and server in such secure transactions is said to use the Secure Sockets Layer (SSL).

SSL uses 2 types of Certificates:

1.  User certificates:

These are Certificates issued to servers or users to prove their identity in a public key/private key exchange.

2.  Trusted certificates:

These are Certificates representing entities that you trust – such as certificate authorities that sign the user certificates they issue.

How SSL works with Middle Tier Oracle HTTP Server:

  1. The client sends a request to the server using HTTPS connection mode.
  2. The server presents its certificate to the client. This certificate contains the server’s identifying information.
  3. The client checks its list of Trust points and compares the information in the certificate with the server’s public key. If it matches, the server is authenticated as a trusted server.
  4. The client sends the server a list of the encryption levels, or ciphers, that it can use.
  5. The server receives the list and selects the strongest level of encryption that they have in common.
  6. The client creates a session key which is used to encrypt the data and sends this session key to the server which can decrypt the data with its private key

How SSL works with Oracle Database Server:

  1. The UTL_HTTP package is used for making HTTP callouts from SQL and PL/SQL to a Web Node (Oracle HTTP server).
  2. When the package fetches data from a Web site using HTTPS, it specifies the location to the Oracle Wallet that resides on the database server. This wallet contains the certificate for the Certifying Authority (CA) who signed the Web node’s server certificate.

Process:

For converting the application into SSL we need to have a Digital certificate. A Certificate Authority is a trusted third party responsible for issuing, revoking, and renewing digital certificates. All digital certificates are signed with the Certificate Authority’s private key to ensure authenticity. The Certificate Authority’s Public Key is widely distributed.

A Certificate Signing Request (CSR) is a digital file, which contains your public key and your name. You send the CSR to a Certifying Authority (CA) to be converted into a real Certificate.

A digital certificate is an electronic document that binds an identity to a pair of electronic keys that can be used to encrypt and sign digital information. A trusted third party, called a Certification Authority (CA), issues certificates. The document is usually in a standard X509 format and contains three elements:

  1. Entity attributes (information about your organization)
  2. Public key (which is bound to your organization)
  3. Digital signature of the trusted CA private key

Verisign (http://verisign.com/) will allow your organization to apply for a free trial certificate, which will be valid for 2 weeks for testing purposes.

Private (Server) Key:

The private key file is a digital file that you generate and for use to decrypt messages sent to you. The certificate request (CSR) that you send to your Certificate Authority (CA) is derived from this private key. Therefore, the resulting digital certificate (containing your public key), which is issued by your CA, is bound to this private key.

We will now look into the actual procedure for enabling the application with SSL. Not that below explanation is based on metalink note ID376700.1.

Middle tier setup

To start with SSL setup we have to create a certification request through Oracle wallet manager.

Step 1) Create wallet on the apps side

  • Login to application tier with applmgr user ID and navigate to $INST_TOP/ora/10.1.3 directory and source .env file present at that location. This will make 10.1.3 (IAS_ORACLE_HOME) as your ORACLE_HOME.
  • Navigate to $INST_TOP/certs/Apache directory.
  • Backup Apache directory
  • Start Oracle wallet manager

bash-2.05$ owm &
[1] 16555

  • Navigate Wallet -> New
    Answer No to: “Your default wallet directory doesn’t exist. Do you wish to create it now?”
    Set the wallet manager password (example. Welcome)
  • Click Yes when prompted “A new empty wallet has been created. Do you wish to create a certificate request at this time”.

Following screen appears

untitled.jpg

Common Name           – Your hostname
Organization Unit       – Your department name
Organization                – Your company name
Location/City              – Your city name
State/Province            – Your state name
Country                     - Your country name

Press OK once you fill all information. Save wallet in $INST_TOP/certs/Apache folder with name (server_name).cer

Once saved, it will ask, “A wallet already exist, you want to override”. You can say yes.
Click on certificate Request in the list provided on left side of Oracle wallet manager window and you can see your request contents on right side as seen in below screen.

untitled1.jpg

  • Wallet -> Autologin (Enable)
  • Wallet -> Save

Once you get the request content, you have to get the certificates from certifying Authority like verisign. Currently the certificate request that you created is your .cer file. Using this file you can get the actual certificate file, which will be .crt file. Along with that file you will also get your private key file (.key). So after getting certificate you will have 3 files with you

  1. Certificate request file (.cer)
  2. Actual certificate file (.crt)
  3. Private Key file (.key)

Once you get the certificate, you have to generate CA certification file. Since for any SSL certificate we need to have CA(Certifying Authority) file. Some of the certifying authority companies also provide CA files. But here we will see how to generate CA file from certificate file (.crt).

Step 2) Creating your certifying authority’s certificate

  • Copy/ftp (binary mode) .crt to the your PC desktop
  • Double-click the file and go to Certification Path tab
  • Double click on VeriSign/RSA Secure Server CA
  • Go to Details tab and press Copy to File…
  • Press Next and select “Base-64 encoded X.509(.CER)” and press next
  • Give the name as ca
  • Press Finish

A new ca.cer file will be present in your local PC. FTP back ca.cer file to your UNIX host.

Step 3) Converting the existing cert files

  • Source the .env file again present at location $INST_TOP/ora/10.1.3
  • Change dir to $INST_TOP/certs/Apache
  • Copy .crt, ca.crt, servername.key to the current dir.
  • Execute the following command:
    $ORACLE_HOME/Apache/Apache/bin/ssl2ossl -cert ./.crt -key ./.key -cafile ./ca.cer -wallet . -ssowallet yes

Step 4) Appstier setup
Edit the context xml file in $APPL_TOP/admin, change the SSL related variables to SSL values

SSL Related Variables in the Context File

Variable Non-SSL Value SSL Value
s_url_protocol http https
s_local_url_protocol http https
s_webentryurlprotocol http https
s_active_webport same as s_webport same as s_webssl_port
s_webssl_port not applicable default is 4443
s_https_listen_parameter not applicable same as s_webssl_port
s_help_web_agent url constructed with http protocol and s_webport for both non-SSL and SSL
s_login_page url constructed with http protocol and s_webport url constructed with https protocol and s_webssl_port
  • Execute autoconfig
  • Bounce the mid-tier services

Step 5) DB Tier Setup

Once you run autoconfig on Apps Tier, you need to do wallet setup on DB tier as well. Since R12 is autoconfig enabled, there will be a directory called appsutil in ORACLE_HOME on database side. Follow below steps to carry out the setup on database side.

  • Login to DB tier as oracle user
  • Change dir to $ORACLE_HOME/appsutil
  • Create a new dir with name as wallet
  • Start Oracle Wallet Manager (owm &)
  • Wallet -> New
  • Answer No to: “Your default wallet directory doesn’t exist. Do you wish to create it now?”
  • Click No when prompted “A new empty wallet has been created. Do you wish to create a certificate request at this time”
  • Save Wallet
  • Copy ca.crt from the appl_top to $ORACLE_HOME/appsutil/wallet
  • Navigate Operations-> Import Trusted Certificate
  • Navigate to ca.crt
  • Once import completed. Save wallet
  • Navigate wallet-> autologin (enable)
  • Save wallet

Step 6) Sanity check

  • New Appslogin url: https://(hostname):(port)/OA_HTML/AppsLogin
  • Notice the lock sign in the statusbar (bottom) of the browser. Click on the sign to verify the certificate
  • Sanity check all the components.
  • Login to db as sqlplus apps/(apps password)
  • select utl_http.request(‘https://(hostname):(port)’,null,’file:(path to ORACLE_HOME/appsutil/wallet)’, null) from dual;
  • It should display the first 2000 Chars of the html page.

 

Follow

Get every new post delivered to your Inbox.

Join 156 other followers