Sunday, September 21, 2008

Step by Step - Installation & Configuration of Oracle Forms & Reports

Step by Step - Installation of a Standalone Oracle Forms & Reports (9.0.4) on Linux EL R4 Update 6 (32 bit)

The Standalone Oracle Forms & Reports (9.0.4) application maybe obsolete and no longer supported as per Oracle Corporation, but many clients are still holding onto the applications written on the Original Standalone Oracle Forms & Reports (9.0.4) environment. Nowadays, very little information can be got on the web to assist in any issues encountered during the installation of the Standalone Oracle Forms & Reports (9.0.4) application.
With this in mind, I decided to publish this document with all issues and errors encountered during an installation which I had done recently.
Good Luck with the installation and if you need any assistance don’t hesitate to send me an email.
 Verify Installation Hardware
 Source Oracle Application Server Forms and Reports Services 10g (9.0.4.0.0) software for Linux x86
 Install Oracle Enterprise Linux Release 4, Update 6, we had all our OEL installed on VM environments.
 Allocated mount points: /, /boot, /tmp, /home, /app
 Run Installer Interoperability Patch (3006854) for RHEL3 to fix install errors. This patch can be downloaded from Oracle. Even though it is meant for RHEL3 it works well for RHEL4, otherwise your install will error out.
Make sure that the following System Requirements are as stated below. Some of the RPM packages which are installed on RHEL4 U6 maybe of a higher value, retain these RPM’s even though you would get a warning at the beginning of the installation process.
 Mininum supported kernel software versions:
- kernel-smp-2.6.9-5.EL
- kernel-2.6.9-5.EL
- glibc-2.3.4-2
 Ensure following software packages or higher versions are installed:
- gcc-3.4.3-9.EL4
- gcc-c++-3.4.3-9.EL4
- setarch-1.6-1
- pdksh-5.2.14-30
- openmotif21-2.1.30-11
- gnome-libs-1.4.1.2.90-44.1
- gnome-libs-devel-1.4.1.2.90-44.1
- compat-libgcc-296-2.96-132.7.2
- compat-gcc-32-c++-3.2.3-47.3
- compat-libcwait-2.0.1
- compat-oracle-rhel4-1.0.3
- sysstat-5.0.5.1
- gnome-libs-1.4.2.90-44.1
- gnome-libs-devel-1.4.1.2.90-44.1
- ORBit2-2-2.12.0-3
- ORBit-0.5.17-14

 Apply patch 3006854 to create the /usr/lib/libcwait..so library and create an entry in the /etc/ld.so.preload file to ensure that the libcwait.so library is always preloaded. This step is mandatory to avoid Net Configuration Assistant ‘jre relocaton error’ errors during component configuration.
 Log in as root and create the dba group and the oracle user
$ groupadd dba
$ useradd –g dba oracle

 Edit the /etc/sysctl.conf file by adding the following:
Kernel.sem = 256 3200 100 128 (these are the most min settings required)
Kernel.shmmax = 2147483648 (this is the most min setting required)
Kernel.shmmni = 128
Kernel.shmall = 2097152
Kernel.msgmnb = 65536
Kernel.msgmni = 2878
Fs.file-max = 65536
Net.ipv4.ip_local_port_range = 1024 65000
 Edit the /etc/security/limits.conf file
* - nproc 16384
* - nofile 16384
 Edit the /home/oracle/.bash_profile file and add the following:
ORACLE_BASE=/app/oracle/product
ORACLE_HOME=$ORACLE_HOME/904
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_ASSUME_KERNEL=2.4.19
ORACLE_OEM_JAVARUNTIME=/opt/jre1.3.1_15 (based on version- this is only required if your JRE is of a different version, otherwise ignore this entry)
PATH=$PATH:$ORACLE_HOME/bin
Export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_ASSUME_KERNEL ORACLE_OEM_JAVARUNTIME PATH

Save the above using . .bash_profile
 Create the ORACLE_BASE, /app/oracle and grant the oracle user
$ chown oracle:dba /app/oracle

 Set the LD_ASSUME_KERNEL environment variable to 2.4.19
$ export LD_ASSUME_KERNEL=2.4.19

Prepare the Application Tier Node
Log onto the target system as root user (su – root) and run the following commands:
$ cd /usr/bin
$ mv gcc gcc.orig
$ mv g++ g++.orig
$ mv gcc32 gcc
$ mv g++32 g++
The purpose of the above renaming of the gcc compilers is to avoid oracle linking errors due to Oracle 32 bit compiler incompatibility.

Also, as root user run the following to ensure the oracle user can run Xserver GUI on the server:
$ xhost +
$ xclock (a GUI clock should appear)

Log on to the target system as the ORACLE database user (sudo su – oracle) and run the following commands:

$ mkdir /app/oracle/product/904
$ chmod 775 /app/oracle/product/904
$ export ORACLE_HOME=/app/oracle/product/904
$ export LD_ASSUME_KERNEL = 2.4.19

Insert the Oracle Application Server Forms and Reports Services 10g(9.0.4) CD into the CD tray on the server and make sure drive is mounted. The standard CD mount points are /media/cdrom or /media/cdrecorder.

$ /media/cdrom/runInstaller

This command will start the Oracle Universal Installer for the installation process to begin. If it errors out prior to the start of the GUI, then re-run the export LD_ASSUME_KERNEL command.

Start the Installation Process
Ensure that all the system requirements, inclusive of the patch 3006854 have been implemented.
This installation is based on a fresh install of Oracle Application Server on a Linux x86 server with no prior Oracle Application server installs already on it. If there are any Oracle Application Server installs already, they will need to be shut down prior to running the installation.

Installation Process
• The initial screen displayed in the runInstallation, installation process will error out as shown below:


Enter y, and continue. The version of Oracle Application Server startup tries to verify the exact version of the packages installed. The packages listed in the system requirements is the valid packages.

• After the Welcome screen, the following screen enters the Oracle Home name and path:


• A warning about memory will pop up, continue the installation by selecting OK:

• The following screen allows the selection of the Language and follows up with the ias_admin instance name and password as shown below:


• Ignore the outgoing mail server entry GUI, and the next screen presents the Installation Summary:

• The Install GUI is as shown below. The install process will run to successful completion:

• Any errors encountered during the Install process will need to be rectified prior to progressing on, to completion.
• Upon successful completion, install Service Patch #4948949 (9.0.4.3) for Linux.
Customizing your Oracle Forms environment:
The formsweb.cfg file will locate your customized Oracle forms and load them into the Forms OC4J containers. The parameters as shown below will outline the setup for each application. You may use the template located at /forms90/sever/formsweb.cfg for you to customize. I have shown only the sections which needs to be customized.
Create a new /forms90/server/your_app_name.env for each application using the default.env as a template.

Testfrm.env
# $Id: solaris_os_default.env,v 1.8 2003/05/29 23:54:27 rsadeghi Exp $
# default.env - default Forms environment file, Solaris version
#
# This file is used to set the Forms runtime environment parameters.
# If a parameter is not defined here, the value used will be that defined
# in the environment in which the servlet engine (OC4J or JServ) was started.
#
# NOTES
# 1/ The Forms installation process should replace all occurrences of
# FORMS_ORACLE_HOME with the correct ORACLE_HOME
# setting, and all occurrences of O_JDK_HOME with
# the location of the JDK (usually $ORACLE_HOME/jdk).
# Please make these changes manually if not.
# 2/ Some of the variables below may need to be changed to suite your needs.
# Please refer to the Forms documentation for details.
#
ORACLE_HOME=/app/oracle/product/904
export ORACLE_HOME
#
# Search path for Forms applications (.fmx files, PL/SQL libraries)
#
# FORMS90_PATH=/app/oracle/product/904/forms90

# Java class path
# This is required for the Forms debugger
# You can append your own Java code here)
# f90srv.jar, repository.jar and ldapjclnt9.jar are required for
# the password expiry feature to work(#2213140).
#
CLASSPATH=/app/oracle/product/904/j2ee/OC4J_BI_Forms/applications/forms90app/forms90web/WEB-INF/lib/f90srv.jar:/app/oracle/product/904/jlib/repository.jar:/app/oracle/product/904/jlib/ldapjclnt9.jar:/app/oracle/product/904/jlib/debugger.jar:/app/oracle/product/904/jlib/ewt3.jar:/app/oracle/product/904/jlib/share.jar:/app/oracle/product/904/jlib/utj90.jar:/app/oracle/product/904/jlib/zrclient.jar:/app/oracle/product/904/reports/jlib/rwrun.jar:/app/formsapps/webutil/lib/webutil.jar:/app/oracle/product/904/jdk/jre/lib/rt.jar
export CLASSPATH

#
# The PATH setting is not required for Forms if the Forms executables are
# in /bin. However, it is required if Graphics applications
# are called from Forms applications.
#
PATH=/app/oracle/product/904/bin:/app/oracle/product/904/jdk/jre/bin:/bin:$PATH
export PATH
#
# Settings for Reports
# -------------------------------
# NOTE: This setting is only needed if Reports applications
# are called from Forms applications
# However, because of bug 2336698 where a report is started from
# a forms debugger session with an already running JVM, then
# the report's class path should also be included in the forms
# class path.
# We no longer need to set REPORTS_CLASSPATH as forms will
# always start the JVM before calling reports.
#
# Settings for Graphics
# -------------------------------
# NOTE: These settings are only needed if Graphics applications
# are called from Forms applications
#
#
# Please uncomment the following and put the correct 6i
# oracle_home value to use Graphics applications.
#
#ORACLE_GRAPHICS6I_HOME=

#
# Search path for Graphics applications
#
GRAPHICS60_PATH=
#
# Settings for forms9i tracing and logging
# -----------------------------------------------
# Note: This entry has to be uncommented to enable tracing and
# logging.

FORMS90_TRACE_PATH=/app/oracle/product/904/forms90/trace
export FORMS90_TRACE_PATH
#
# System settings
# ---------------
# You should not normally need to modify these settings
#
#
# Path for shared library objects
# This is highly platform (if not machine) specific ! At install time
# LD_LIBRARY_PATH should be replaced with the
# actual value of the LD_LIBRARY_PATH environment variable (at install
# time). That should ensure we have the paths for such necessities as
# the motif and X11 libraries.
# Explanations:
# - Reports needs the path for libjava.so
# (.../jre/lib/sparc)
# - Forms needs two paths to the jre, for libjvm.so and libhpi.so
# - In JDK 1.4.1 the location of libjvm.so is lib/sparc (there is no
# classic directory) so we do not include the .../classic directory
# below. There are other versions of libjvm.so (in directories server,
# client and hotspot) but we will use the version in lib/sparc for now.
#
LD_LIBRARY_PATH=/app/oracle/product/904/lib:/app/oracle/product/904/jdk/jre/lib/i386:/app/oracle/product/904/jdk/jre/lib/i386/server:/app/oracle/product/904/jdk/jre/lib/i386/native_threads:/usr/lib
export LD_LIBRARY_PATH
## settings fro Forms Runtime
## You may edit me
FORMS90_PATH=/app/formsapps/tstfrm/forms:/app/formsapps/webutil/forms
export FORMS90_PATH
FORMS90_OUTPUT_DATE_FORMAT=DD-MON-RRRR
#export FORMS90_OUTPUT_DATE_FORMAT
FORMS90_OUTPUT_DATETIME_FORMAT=DD-MON-RRRR HH24:MI:SS
#export FORMS90_OUTPUT_DATETIME_FORMAT
FORMS90_USER_DATE_FORMAT=DD-MON-RRRR|DD/MM/RRRR|DDMMRRRR
#export FORMS90_USER_DATE_FORMAT
FORMS90_USER_DATETIME_FORMAT=DD-MON-RRRR HH24:MI:SS|DD/MM/RRRR HH24:MI:SS
#export FORMS90_USER_DATETIME_FORMAT
##Webtuil setup
WEBUTIL_CONFIG=/app/formsapps/webutil/server/webutil.cfg
export WEBUTIL_CONFIG
##Settings for Reports Runtime
REPORTS90_PATH=/app/formsapps/tstfrm/reports:$REPORTS90_PATH
export REPORTS90_PATH
REPORTS90_REPORTS_SERVER=tstfrm_rep
export REPORTS90_REPORTS_SERVER
REPORTS90_TMP=/app/formsapps/tstfrm/temp
export REPORTS90_TMP
FORMS90_OUTPUT=/app/formsapps/tstfrm/temp
export FORMS90_OUTPUT
FORMS90_MAPPING=http://$HOSTNAME:$OWSPORT/tstrep_temp/
export FORMS90_MAPPING
TSTREP.env
# $Id: solaris_os_default.env,v 1.8 2003/05/29 23:54:27 rsadeghi Exp $
# default.env - default Forms environment file, Solaris version
#
# This file is used to set the Forms runtime environment parameters.
# If a parameter is not defined here, the value used will be that defined
# in the environment in which the servlet engine (OC4J or JServ) was started.
#
# NOTES
# 1/ The Forms installation process should replace all occurrences of
# FORMS_ORACLE_HOME with the correct ORACLE_HOME
# setting, and all occurrences of O_JDK_HOME with
# the location of the JDK (usually $ORACLE_HOME/jdk).
# Please make these changes manually if not.
# 2/ Some of the variables below may need to be changed to suite your needs.
# Please refer to the Forms documentation for details.
#
ORACLE_HOME=/app/oracle/product/904
export ORACLE_HOME
#
# Search path for Forms applications (.fmx files, PL/SQL libraries)
#
# FORMS90_PATH=/app/oracle/product/904/forms90
# Java class path
# This is required for the Forms debugger
# You can append your own Java code here)
# f90srv.jar, repository.jar and ldapjclnt9.jar are required for
# the password expiry feature to work(#2213140).
#
CLASSPATH=/app/oracle/product/904/j2ee/OC4J_BI_Forms/applications/forms90app/forms90web/WEB-INF/lib/f90srv.jar:/app/oracle/product/904/jlib/repository.jar:/app/oracle/product/904/jlib/ldapjclnt9.jar:/app/oracle/product/904/jlib/debugger.jar:/app/oracle/product/904/jlib/ewt3.jar:/app/oracle/product/904/jlib/share.jar:/app/oracle/product/904/jlib/utj90.jar:/app/oracle/product/904/jlib/zrclient.jar:/app/oracle/product/904/reports/jlib/rwrun.jar:/app/formsapps/webutil/lib/webutil.jar:/app/oracle/product/904/jdk/jre/lib/rt.jar
export CLASSPATH
#
# The PATH setting is not required for Forms if the Forms executables are
# in /bin. However, it is required if Graphics applications
# are called from Forms applications.
#
PATH=/app/oracle/product/904/bin:/app/oracle/product/904/jdk/jre/bin:/bin:$PATH
export PATH
#
# Settings for Reports
# -------------------------------
# NOTE: This setting is only needed if Reports applications
# are called from Forms applications
# However, because of bug 2336698 where a report is started from
# a forms debugger session with an already running JVM, then
# the report's class path should also be included in the forms
# class path.
# We no longer need to set REPORTS_CLASSPATH as forms will
# always start the JVM before calling reports.
#
#
# Settings for Graphics
# -------------------------------
# NOTE: These settings are only needed if Graphics applications
# are called from Forms applications
#
#
# Please uncomment the following and put the correct 6i
# oracle_home value to use Graphics applications.
#
#ORACLE_GRAPHICS6I_HOME=

#
# Search path for Graphics applications
#
GRAPHICS60_PATH=
#
# Settings for forms9i tracing and logging
# -----------------------------------------------
# Note: This entry has to be uncommented to enable tracing and
# logging.
FORMS90_TRACE_PATH=/app/oracle/product/904/forms90/trace
export FORMS90_TRACE_PATH
#
# System settings
# ---------------
# You should not normally need to modify these settings
#
#
# Path for shared library objects
# This is highly platform (if not machine) specific ! At install time
# LD_LIBRARY_PATH should be replaced with the
# actual value of the LD_LIBRARY_PATH environment variable (at install
# time). That should ensure we have the paths for such necessities as
# the motif and X11 libraries.
# Explanations:
# - Reports needs the path for libjava.so
# (.../jre/lib/sparc)
# - Forms needs two paths to the jre, for libjvm.so and libhpi.so
# - In JDK 1.4.1 the location of libjvm.so is lib/sparc (there is no
# classic directory) so we do not include the .../classic directory
# below. There are other versions of libjvm.so (in directories server,
# client and hotspot) but we will use the version in lib/sparc for now.
#
LD_LIBRARY_PATH=/app/oracle/product/904/lib:/app/oracle/product/904/jdk/jre/lib/i386:/app/oracle/product/904/jdk/jre/lib/i386/server:/app/oracle/product/904/jdk/jre/lib/i386/native_threads:/tmp/OraInstall2008-07-24_11-30-15PM/jre/lib/i386/client:/tmp/OraInstall2008-07-24_11-30-15PM/jre/lib/i386:/tmp/OraInstall2008-07-24_11-30-15PM/jre/../lib/i386:/usr/lib
export LD_LIBRARY_PATH
## settings fro Forms Runtime
## You may edit me
FORMS90_PATH=/app/formsapps/tstrep/forms:/app/formsapps/tstrep/lib:/app/formsapps/common/lib:/app/formsapps/common/forms:/app/formsapps/webutil/forms
export FORMS90_PATH
FORMS90_OUTPUT_DATE_FORMAT=DD-MON-RRRR
export FORMS90_OUTPUT_DATE_FORMAT
FORMS90_OUTPUT_DATETIME_FORMAT=DD-MON-RRRR HH24:MI:SS
export FORMS90_OUTPUT_DATETIME_FORMAT
FORMS90_USER_DATE_FORMAT=DD-MON-RRRR|DD/MM/RRRR|DDMMRRRR
export FORMS90_USER_DATE_FORMAT
FORMS90_USER_DATETIME_FORMAT=DD-MON-RRRR HH24:MI:SS|DD/MM/RRRR HH24:MI:SS
export FORMS90_USER_DATETIME_FORMAT
##Webtuil setup
WEBUTIL_CONFIG=/app/formsapps/webutil/server/webutil.cfg
export WEBUTIL_CONFIG
##Settings for Reports Runtime
REPORTS90_PATH=/app/formsapps/tstrep/reports:/app/formsapps/tstrep/lib:/app/formsapps/webutil/forms:$REPORTS90_PATH
export REPORTS90_PATH
REPORTS90_REPORTS_SERVER=tstreprep_dias04
export REPORTS90_REPORTS_SERVER
REPORTS90_TMP=/app/formsapps/tstrep/temp
export REPORTS90_TMP
FORMS90_OUTPUT=/app/formsapps/tstrep/temp
export FORMS90_OUTPUT
FORMS90_MAPPING=http://$HOSTNAME:$OWSPORT/tstrep_temp/
export FORMS90_MAPPING
Amend the /forms90/server/forms90.conf file
# Virtual path mapping for Forms Java jar and class files (codebase)
AliasMatch ^/forms90/java/(..*) "/app/oracle/product/904/forms90/java/$1"
# Virtual path for JInitiator downloadable executable and download page
AliasMatch ^/forms90/jinitiator/(..*) "/app/oracle/product/904/jinit/$1"
# Virtual path for runform.htm (used to run a form for testing purposes)
AliasMatch ^/forms90/html/(..*) "/app/oracle/product/904/tools/web90/html/$1"
# WebUtils alias
AliasMatch ^/forms90/webutil/(..*) "/app/formsapps/webutil/lib/$1"
# Your Business Organisations customized locations
Alias /common/ "/app/formsapps/common/"
Alias /common/help "/app/formsapps/common/help/"
# Configuration for JServ (if mod_jserv.c is available and not mod_oc4j.c)

# Only configure for JServ if mod_oc4j is NOT available:

# Virtual path mapping for FormsServlet and ListenerServlet.
# Purpose: paths to invoke the servlets should be /forms90/f90servlet
# and /forms90/l90servlet respectively.
# We map f90servlet to servlet.if90, and l90servlet to servlet.ifl90.
# The apJServAction directives (below) will then remap those.
AliasMatch ^/forms90/f90servlet(.*) "/servlet.if90"
AliasMatch ^/forms90/l90servlet(.*) "/servlet.ifl90"
ApJServMount /forms90/servlet /forms90
#
# Let the servlets be called by file extension (e.g /servlet.if90)
#
ApJServAction .if90 /forms90/servlet/f90servlet
ApJServAction .ifl90 /forms90/servlet/l90servlet
# Prevent access to the Forms Servlets by paths other than
# /forms90/f90servlet and /forms90/l90servlet.
# 1. Prevent access via the .if90 and .ifl90 file extensions:

order deny,allow
deny from all

# 2. Stop access by class (by paths like
# /forms90/servlet/oracle.forms.servlet.FormsServlet)

order deny,allow
deny from all



# Config. for OC4J

Oc4jMount /forms90 OC4J_BI_Forms
Oc4jMount /forms90/f90servlet OC4J_BI_Forms
Oc4jMount /forms90/f90servlet/* OC4J_BI_Forms
Oc4jMount /forms90/l90servlet OC4J_BI_Forms
Oc4jMount /forms90/l90servlet/* OC4J_BI_Forms

Create a new /reports/conf/tstfrm_rep.conf for your Reports Application. You may use the default_rep.conf file as a template.

















































xmlpds.conf
jdbcpds.conf
textpds.conf

As shown above, comment out all the security entries including the encrypted password.
At the $ORACLE_HOME/forms90 folder there are a number of folders which are required for the proper functioning of FORMS.
One of the folders that require attention is the SERVER folder and the WEBUTIL folder.
The SERVER folder contains most of the configuration files that need to be customised for YOUR BUSINESS requirements.
This folder contains the forms90.conf, forms90.properties, formsweb.cfg and a customized forms_app.env file for each application.
Customised copies and their required amendments are given in the Configure Forms90 Parameter section. The sections in the relevant forms which are highlighted in yellow.
Ensure that all the applications have their entries added to the FORMSWEB.cfg file, also, the startup FORM, TEST_FORM_LOGIN.fmx entry and the database logon credentials to connect to the database must be specified in this file.
The forms90.properties file need not be edited, as the default settings are sufficient.
The forms90.conf file will need to be customised with entries for the #WebUtils alias and the #YOUR BUSINESS alias. Samples are shown in the Configure Forms90 Parameter section, which are highlighted.
The {app}.env files, which is a customized copy of the default.env file, is edited to reflect the location of the {app}.env file forms, reports and webutil file locations. Samples for these types of files are shown in the Configure Forms90 Parameter section.
WEBUTIL is mainly used to integrate the FORMS application with folders, so that files and folders can be uploaded onto the application using WEBUTIL through the FORMS application. WEBUTIL install is a basic unzip of the WEBUTIL file downloaded from Oracle Download. Additionally, the separate Jacob download will hold the 3 *.jar files which is required by WEBUTIL.
Reports files customizations:
At the $ORACLE_HOME/reports folder there are quite a few folders belonging to the REPORTS environment. Of these folders, only the CONF, CONFIG and SERVER folders are of utmost importance.
The CONF folder contains all the reports configuration files. The rep_domain_servername.conf file is the default report file. For each report server to be created, take a copy of the rep_domain_servername.conf file and rename it to reflect the name of the application, for example rename the file to testapp_rep.conf or just plain testapp.conf.
Edit this file to remove all entries that are pertaining to security (OID) as shown:

……..



………


Edit this file to update the location of the REPORTS files and TEMP files etc:



















……..
A complete sample of a reports file has been included in the section: Create a new /reports/conf/tstfrmrep.conf file for whatever application
To add a customized reports server to the Oracle Container for Java (OC4J) using the app_rep.conf, reports configuration file, run the addNewServerTarget.sh shell script from the location of the app_rep.conf file using the following command:
$ORACLE_HOME/bin/addNewServerTarget.sh app_rep
This will create the Report Server in the Reports Container and create the relevant *.dat file in the $ORACLE_HOME/reports/server folder.
Once completed, restart opmn and emctl to resynchronize the new Reports Server.
In case the newly created Report Server did not get created properly, it is deleted from the container using the following method:
Remove the entry for the Report Server from: $ORACLE_HOME/opmn/conf/opmn/xml and $ORACLE_HOME/sysman/emd/targets.xml
The run: $ORACLE_HOME/dcm/bin/dcmctl updateconfig –ct opmn –v –d
And
$ORACLE_HOME/dmc/dcmctl resyncinstance –v –d
Once done, stop and start opmn and emctl.
If your TNS_ADMIN location is different to the default location, you need to do the following:
The TNS_ADMIN location which holds the tnsnames.ora and the sqlnet.ora Net Configuration files for the Oracle Forms and Reports to talk to Oracle databases are located at /var/opt/oracle.
This TNS_ADMIN entry should be defaulted in the oracle users .bash_profile login profile script.
The two files that require the TNS_ADMIN variable assigned are:
$ORACLE_HOME/bin/f90genm.sh
# You may need to set one or more of TNS_ADMIN, TWO_TASK or ORACLE_SID
# to connect to database
#
TNS_ADMIN=$ORACLE_HOME/network/admin or /var/opt/oracle
export TNS_ADMIN
#TWO_TASK=; export TWO_TASK
#ORACLE_SID=< ORACLE SID >; export ORACLE_SID
$ORACLE_HOME/bin/reports.sh
## You need to set TNS_ADMIN and TWO_TASK or ORACLE_SID to connect to database
## Some default values have been set below
TNS_ADMIN=$ORACLE_HOME/network/admin or /opt/app/oracle; export TNS_ADMIN
## TWO_TASK=< two task name >; export TWO_TASK
## ORACLE_SID=< ORACLE SID >; export ORACLE_SID
Additionally, add the $REPORTS90_PATH value to the REPORTS_PATH variable in $ORACLE_HOME/bin/reports.sh:
## setting for Reports Runtime
RW=$ORACLE_HOME/reports; export RW
REPORTS_PATH=$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo:$ORACLE_HOME/reports/integ:$ORACLE_HOME/reports/printers; export REPORTS_PATH
REPORTS_TMP=/tmp; export REPORTS_TMP
REPORTS_NO_DUMMY_PRINTER=TRUE; export REPORTS_NO_DUMMY_PRINTER
REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar; export REPORTS_TAGLIB_URI
REPORTS_CLASSPATH=$ORACLE_HOME/reports/jlib/rwbuilder.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/j2ee/home/oc4j.jar:$ORACLE_HOME/j2ee/home/lib/ojsp.jar; export REPORTS_CLASSPATH
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
Errors Encountered during Oracle Application Server Installs:
One of the main errors encountered when trying to run compile REPORTS against the application reports, an error ‘REP:0004 warning unable to open user preference file’ keep coming up. This error was attributed to the paths within the .bash_profile environment, whereby the ORACLE user home path was set at /home/oracle instead of $ORACLE_HOME.
To fix this issue, do the following:
Copy the $ORACLE_HOME/tools/admin/prefs.ora file to the /home/oracle location.
Log back in as oracle to re-run the profile, and then compile the REPORTS.
------------------------------------------------------
Another error which was encountered was in the Development Virtual machines. When trying to run the compile reports using the genallreports executable, the following error was encountered: ‘line 1, segmentation fault’
This was a known fix in metalink, Note:387248.1
The fix is as follows: as root, backup and then edit /boot/grub/grub.conf
For all the kernel option links add noexec=off in the following lines:
Kernel /boot/vmlinux-2.4.21-15.ELsmp ro root=LABEL=/ noexec=off …………
Add this to every option (there were two options in this linux version)
Restart the Linux server and compile the reports.
-------------------------------------------------------
Ensure that an entry in the hosts file for 127.0.0.1 localhost.domain localhost is available,otherwise the Standalone Oracle Forms & Reports Install will fail when trying to start OPMN.
-------------------------------------------------------
One very strange error that I encounterd when installing the Standalone Oracle Forms & Reports Service Patch (9.0.4.3), on a Virtual Machine that was only local to my computer, was during the oracle executable recompilation process.
The error I got was: error in invoking target “webm_install” of makefile ~/forms90/lib/ins_forms.mk”
Apparently, this error can happen on any platform. This a forms re-linking issue.
To fix the problem, I did the following:
- backup the file /usr/X11R6/lib/libXm.so.3
- create a new symbolic link: ln –s $ORACLE_HOME/lib/stubs/libXm.so libXm.so.3_SAV
- relink forms: cd $ORACLE_HOME/forms90/lib make –f ins_forms.mk desm_install, make –f ins_forms.mk genm_install, make –f ins_forms.mk webm_install
- Continue the install by clicking on retry.
-------------------------------------------------------
The above errors were the only errors I encountered during the installation process.
Good Luck……….

STEP BY STEP - Using DBMS_Scheduler to Run Hot Backups

STEP BY STEP – USING DBMS_SCHEDULER TO RUN HOT BACKUPS


With Oracle 10g onwards, you can create a dbms_scheduler task to run your nightly exports and hot backups, without the need for using cron jobs, in Linux and Solaris environments. Please note that this also applies to Windows environments as well.

To start off create the Scheduler Program:






You don’t need to add any arguments to the Scheduler Program, as the shell script hot_backup.sh will contain all the required arguments.

Next, create the Job:




Note, in the Command Type you specifiy Executable, and indicate the type of shell you would be using. In my case it was the /bin/bash shell.
For the Arguments, you indicate the location of the shell script to be run in the bash shell.

Then create the Job Schedule:



Create the Job options, if any:




This completes the setup of the scheduler task in Oracle. Now you need to create the shell script for the hot_backup.sh, which is called as an external program.

I used the following script:



You may customise it based on your requirements. I added the .bash_profile since I had problems executing the sqlplus, executable. I also added the LD_LIBRARY_PATH as it refused to execute with errors of missing ld libraries.

Next create a hot_backup.sql script to backup all the tablespaces, similar to this:

ALTER TABLESPACE TEST BEGIN BACKUP;
HOST cp /app/oracle/oradata/test01.dbf /app/oracle/backup/.
ALTER TABLESPACE TEST END BACKUP;

Add these entries to all your tablespaces. At the end of the file backup the archive logs:

ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM ARCHIVE LOG STOP;
HOST cp /app/oracle/archive/*.dbf /app/oracle/backup/. {set this based on the archive log location}

Let me know if you have any issues.

Export an Oracle Database using DBMS_Scheduler

STEP BY STEP - EXPORTING AN ORACLE DATABASE USING DBMS_SCHEDULER ON


With Oracle 10g onwards, you can create a dbms_scheduler task to run your nightly exports and hot backups, without the need for using cron jobs, in Linux and Solaris environments. Please note that this also applies to Windows environments as well.

To start off create the Scheduler Program:




You don’t need to add any arguments to the Scheduler Program, as the shell script full_exp_script.sh will contain all the required arguments.

Next, create the Job:




Then create the Job Schedule:



Create the Job options, if any:



This completes the setup of the scheduler task in Oracle. Now you need to create the shell script for the export, which is called as an external program.

Use the following script:





You may customise it based on your requirements. I added the .bash_profile since I had problems executing the exp, executable. I also added the LD_LIBRARY_PATH as it refused to execute with errors of missing ld libraries.

Let me know if you have any issues.

Thursday, June 12, 2008

EBS R12 Install on a 2-Tier Environment(App Tier & Db Tier)


The 2 Tier EBS R12 install has not been widely documented, therefore I decided to document this step by step process for the installation of Oracle E-Business Suite R12 on a 2 Tier seprate Apps Tier and a separate Database Tier.


Prepare the Servers:
I installed EBS R12 on two Linux (32-bit) servers. The versions of Linux was Enterprise Linux R4 Update 6 (/etc/redhat-release).
The kernel version was 2.6.9-67.0.0.0.1.ELsmp (uname -r).
Both versions were supported by Oracle for EBS R12 installs.
Oracle EBS R12 installation requires a set of required RPM packages with the following minimum Versions:

glibc-2.3.4-2.25
glibc-common-2.3.4-2.25
binutils-2.15.92.0.2-21
compat-libstdc++-296-2.96-132.7.2
gcc-3.4.6-3
gcc-c++-3.4.6-3
libgcc-3.4.6-3
libstdc++-3.4.6-3
libstdc++-devel-3.4.6-3
openmotif21-2.1.30-11.RHEL4.6**
pdksh-5.2.14-30.3
setarch-1.6-1
make-3.80-6.EL4
gnome-libs-1.4.1.2.90-44.1
sysstat-5.0.5-11.rhel4
compat-db-4.1.25-9
control-center-2.8.0-12.rhel4.5
xscreensaver-4.18-5.rhel4.11
libaio-0.3.105-2
libaio-devel-0.3.105
GCC Compilers: With regards to the GCC compilers, change the installed gcc compiler which was installed by the gcc packages, to use the 32 bit compilers. If not changed, the database install will error out during the executable relink stages. Both GCC and G++ need to be using the 32 bit compilers.
Go to /usr/bin/mv gcc gcc.orig
/usr/bin/mv gcc32 gcc
and /usr/bin/mv g++ g++.orig
/usr/bin/mv g++32 g++
All other RPM package versions should be as per list above.

JDK 5.0 Requirements: R12 requires at least JRE5.0 update 10. Go to
http://java.sun.com.products/archive/j2se/5.0_10/index.html download jre-1_5_0_10-linux-i586-rpm.bin. Once done run CHMOD 755 against this bin file.
Execute the *.bin script as root to the /usr/java folder by default.


Kernel Settings: Edit the /etc/sysctl.conf file to configure the kernel setting as required by Oracle EBS R12:
kernel.sem = 25 3200 100 142
kernel.shmmni = 4096
kernel.msgmax = 8192
kernel.msgmnb = 65535
kernel.msgmni = 2878
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Open File Descriptors: If you change the limits in the /etc/security/limits.conf file, as a result of their limits being lower than those mentioned below, then you must restart the system after making the changes:

* hard nofile 65532
* soft nofile 4096
* hard nproc 16384
* soft nproc 2047

Host Names: On ech server (AppSrv and DBSrv, edit the /etc/hosts file with the following entries:
ip_address node_name.domain_name node_name
---------- --------------------- ---------
192.168.0.10 appsrv.gid.com.au appsrv
192.168.0.11 dbsrv.gid.com.au dbsrv
127.0.0.1 localhost.localdomain localhost

Finally, ensure both the appsrv and the dbsrv servers can ping each other and their host names are resolved successfully.

You are now ready to install Oracle E-Business Suite R12 on a 2-Tier environment.

Installing Oracle E-Business Suite R12
Firstly, stage the install CD's into a suitable location accessible by both servers. I staged the software on an external Hard Disk and swapped between servers. Staging of Oracle software can be carried out using the adautostg.pl file located at /startCD/Disk1/rapidwiz folder on the Start Here CD.
I used identical user ID's for both servers for the 2 Tier EBS R12 install. That is, both servers had oracle:dba with identical user ID and group ID.
For my instance I created a user 'oracle'
$ /usr/sbin/groupadd -g 502 dba
$ /usr/sbin/useradd -c 'Oracle Software Owner' -d /home/oracle -g dba -u 500 oracle

If you query /etc/passwd you will notice the following entry:
oracle:x:500:502:Oracle Software Owner:/home/oracle:/bin/bash
Ensure that the password files on both servers have identical entries.

Now create your mount points on both servers. For convenience I created /u01/app as the mount points on both servers.

First Install the Database Tier:
Ensure that the Stage Area is mounted on DBSRV. Login to a Terminal Server as user 'oracle' and run the rapidwiz installer from /stage area/startCD/Disk1/rapidwiz/rapidwiz
- select the standard install option
- In the Oracle Configuration Manager I selected to Decline Oracle Connection Tools Agreement, since my installation was on a Lab environment.
- At the next screen, I selected a 'new configuration'
the next screen shows the port list pool. I selected 0 pool (default pool) whereby my database port defaults to 1521.

Database Node Configuration Screen: I entered the following:
Database Type : Vision Demo Database
Database SID : VIS
Host Name : DBSRV
Domain Name : gid.com.au
Operating System : Linux (32-bit)
Database OS User : oracle
Database OS Group: dba
Base Directory : /u01/app

Primary Applications Node configuration Screen: I entered the following:
Host Name : APPSRV
Domain Name : gid.com.au
Apps OS User : oracle
Apps OS Group : dba
Base Directory: /u01/app
Instance Directory : /u01/app/inst

The Services were not edited as all database executables were expected to be installed on the DB tier and the App executables on the Apps tier. There was no sharing of the file system between servers.

Node Information: no changes were made as both servers were visible.

The installation process goes through until its completion. Ensure that no errors are encountered as you will need to attend to them prior to going to the next step. Also, ensure that the database is up and running and the listener is up.

Now Install the Applications Tier:
The applications Tier is to be installed on APPSRV. Ensure that the Stage Area is mounted on this server. Login to a Terminal Server as user 'oracle' and run the rapidwiz installer from the stage area.
Proceed as for the Database Install steps.

At the Configuration Choice Screen, select and load the following saved configuraton:
dbsrv.gid.com.au:VIS:1521

This is the path to the application Tier configuration file.

The installation process extracts all the relevant Apps install attributes and kick starts the Apps Tier installation.

Ensure that the whole installation process completes successfully.
You can now connect to Oracle E-Business Suite using:
http://appsrv.gid.com.au:8000

This completes a 2 Tier EBS R12 install.