Main

October 26, 2006

Changing the Net Listener Port in Oracle Applications Server 10g

Changing the Net Listener Port in Oracle Applications Server 10g

In my previous post I discussed installing the 10g application server. The Application server installation uses the port 1521 as the default port for the application meta data repository. If you already have a listener using that port you have the option of either sharing the listener or configuring a new listener. In my case i tried to change the listener and found out it included just a little bit more than just changing the listener.ora file.

I am listing out the steps that i performed to configure a new listener and get the applications server back to shape.

System Overview

10g Application server with infrastructure and middle tier installed on the same box.

Infrastructure Tier Services  
OID
HTTP Server

Middle Tier Application
Portal

OS Users
Infrastructure OS user: asinf
Middle Tier OS user: asmid

Task
Current Listener running on port 1521.
Configuring a new listener on port 1525

Shutdown Services.

Shutdown all the infrastructure and middle tier services.

su - asmid
$opmnctl stopall
$emctl stop iasconsole

su - asinf
$opmnctl stopall
$emctl stop iasconsole


Shutdown Your Infrastructure Listener

# su - asinf
$lsnrctl stop


Change The Listener Configuration

Make the change to have the new post number in the lsitener.ora file on your infrastructure tier.

# su - asinf
$cd $ORACLE_HOME/network/admin
$vi listener.ora

SID_LIST_SAM =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u03/oracleAS/asinf/OraHome)
      (PROGRAM = extproc)
    )
  )

SAM =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST =
samlnx02.appsdbablog.com)(PORT = 1525))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )


Change Your TNSNAMES

After this you need to make the change reflecting the new port in your TNSNAMES.ora file on both the infrastructure tier and the middle tier.

$su - asinf
$ vi $ORACLE_HOME/network/admin/tnsnames.ora
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = samlnx02.appsdbablog.com)(PORT
= 1525))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PLSExtProc)
    )
  )

SAM =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = samlnx02.appsdbablog.com)(PORT =
1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = sam.appsdbablog.com)
    )
  )


Also replicate this change in middle tier tnsnames.ora.


Start Your Listener

Start your infrastructure tier listener.

# su - asinf
$lsnrctl start SAM


Set The New Listener At The Database Level.

You must execute this command in your infrastructure database to have the parameter local_listener set to your new listener.

# su - asinf
$sqlplus "/ as sysdba"
SQL*Plus: Release 10.1.0.4.2 - Production on Thu Oct 26 18:38:38 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
With the Partitioning, OLAP and Data Mining options

SQL> alter system set local_listener='SAM';
system altered

Bounce The Database.

Stop and startup your meta data repository database to have it register the new listener name.

Start Your OID On The Infrastructure Tier

# su - asinf
$opmnctl startproc ias-component=OID


Change The Port Number In OID.

Start the Oracle Directory Manager from your desktop if you have the client installed else you can use the one on the server at $ORACLE_HOME/bin/oidadmin


Under Entry Management->cn=Oracle Context->cn=SAM->orclnetdescstring chnage the value of the new port here.

Change The Other Config Files.

Based on your installation you may need to change the following files also

$ORACLE_HOME/sysman/emd/targets.xml
$ORACLE_HOME/Apache/modplsql/conf/dads.conf

October 17, 2006

Changing The Character Set In Oracle Applications

Changing The Character Set In Oracle Applications

Oracle Applications supports the installation of additional languages along with the base installed languages. In case you are doing the installation of these languages at the time of oracle applications installation rapidwiz will make sure you select a compatible character set. In case you plan to install a new language to an already installed instance of Oracle Applications you need to make sure that the database and application character set support the new language.

Changing the character set of Oracle Applications will happen at two places, firstly at the database level and then at the application file system level.

Although most of the character set conversion have a different set of process to follow which have been individually documented in various metalink notes. In this post i am will talking about the set of steps that generally hold true for most of the cases.

The main steps that would be required to perform the character set conversion in Oracle       Applications are

  • Run the Character Set Scanner utility to identify data conversion issues.
  • Export the identified objects marked for conversion.
  • Perform the Database conversion by user the alter database command.
  • Run adadmin to identify and perform the file system character set conversion.


For the sake of ease I am taking a US7ASCII instance running on (you guessed it rite ;) a Redhat Linux and converting it into a UTF8.Although US7ASCII being a binary subset of UTF8 would not really require much of the conversion.

Character Set Scanner utility

Though the change from US7ACII to UTF8 could be done with only using the 'alter database command' we will use the character set scanner utility CSSCAN to scan for any change required.

Installing the CSSCAN schema
.

Before using the cssan you must install the schema as a user with DBA privilages.This is done by executing the csminst.sql script located at $ORACLE_HOME/rdbms/admin

cd $ORACLE_HOME/rdbms/admin
$sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.6.0 - Production on Tue Oct 17 16:00:16 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
SQL> START csminst.sql


Executing CSSCAN

The CSSCAN executable is located at the $ORACLE_HOME/bin. After executing the script you must connect to the Database as a user with DBA privileges. The CSSCAN utility prompts you with options to scan a table, schema or the enter database. We choose to scan the entire database in our case.

The CSSCAN displays your current character set version and prompts you to enter the new character set version.


$ csscan
Character Set Scanner v1.1 : Release 9.2.0.1.0 - Production on Tue Oct
17 16:03:15 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Username: system
Password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production

(1)Full database, (2)User, (3)Table: 1 > 1
Enter new database character set name: > UTF8
Enter number of scan processes to utilize(1..32): 1 >



After the successful completion of the scan three report files will be created scan.txt,scan.out and scan.err.

In my case I have exported the database objects with exceptions as specified in the scan.out and plan to import it back after the database conversion is done.

Changing the Character Set At Database Level

Shutdown all application services and the database and listener.You must do a clean shutdown of your database and start it up in restricted mode before changing the character set.Also you must not have any active sessions before issuing the alter database command.

SQL> alter database character set internal_use UTF8;
alter database character set internal_use UTF8


Import Back Database Objects.

After a successful character set conversion at the database level now you can import back the objects and rebuild the indexes specified the in scan.out report.

Changing the Character Set Application Level


Run adadmin and choose  Maintain Applications Files menu. Under this choose the convert character set conversion option.

Here you will be presented with three choices.

 1. Scan the APPLTOP for exceptions
 2. Scan a CUSTOM directory for exceptions
 3. Convert character set
 4. Return to previous menu


You must choose the first option and after that in case of Custom directory you could choose the second option. This will scan the APPL_TOP and make a list of application files which would require conversion.

After the scan is complete you can choose to convert the character set.

Repeat the above steps on all your APPL_TOPs in case of a multi node instance.

October 11, 2006

Adding an Additional Node to an existing Oracle Applications Instance

Adding an Additional Node to an existing Oracle Applications Instance.

Coming to the advanced configurations in ebusiness suite, today my current post will talk about introducing a new node to an already existing ebusiness suite.

Current configuration
A single node instance of 11.5.10.2 on Linux This is referred as Node A in the rest of the post.

Task
Plan to introduce a new Linux node (referred as Node B) for the web and the forms server and split the instance into a two node configuration.

Node A Configuration

Application User: applsam
Home Dir: /u02/sam/applsam
Oracle User: orasam
Home Dir: /u02/sam/orasam
Instance SID: SAM

The task can be accomplished either by implementing a SHARED APPL_TOP concept or by using rapidclone. I am using rapidclone in my current post here.

The brief outline of steps to be performed to accomplish this task are.

  • Running Pre Clone on Node A.
  • Copying the Application Tier Files to Node B.
  • Running Post Clone on Node A DB Tier and Apps Tier.
  • Running post clone on Node B Apps Tier.
  • Adding the additional node script on Node A.

Running Rapid Clone on Node A Database Tier and Applications Tier.

Pre-Clone on database Tier Of Node A

Login to Node A as the database owner and set the environment

# su - orasam
$ cd samdb
$ cd 9.2.0/
$ . ./Sam_Node_A.env
$cd $ORACLE_HOME/appsutil/scripts/Sam
$ perl adpreclone.pl dbTier

Pre-clone on Node A application tier

Login to to Node A which is also our source system as the applications user and set the environment.

# su - applsam
$ cd samappl
$ . ./APPSORA.env
$ cd $COMMON_TOP/admin/scripts/sam
$ perl adpreclone.pl appsTier

Disable security option

In Oracle Applications 11.5.10 the SQL*NET restricted security option is enabled by default. As a result your new node Node_B  will not be able to connect to the database. You must either disable this security option or the better way is to add Node_B  is the list of trusted nodes through OAM.

Oracle Applications Manager -> Security ->Disable Restricted Sectrity Option.

After this you must run Autoconfig on the database Tier and restart your listener.

# su - orasam
$ cd $ORACLE_HOME/appsutil/scripts/SAM_NOde_A
$ ./adautocfg.sh

Restart your listener.

$ ./addlnctl.sh stop sam

$ ./addlnctl.sh start sam

Preparing the new node (Node B) to copy the application tier file system.

On Node B make the following dir structure

# cd /u02
# mkdir sam
# chmod -R 777 sam

Copy the files across to Node B

Shutdown on Application and Database services on Node A
tar -cf - applsam | ssh Node_B tar -xf - -C /u02/sam/

Post Clone on Node A Database Tier 

Now you must run your post clone (adcfgclone.pl) on the database tier of Node A preserving the original values

# su - orasam
$ cd samdb/9.2.0/appsutil/clone/bin
$ perl adcfgclone.pl dbTier

Post Clone on Node A Applications Tier

Now you run your post clone (adcfgclone.pl) on Node A applications Tier. you must remember to configure the services you require on tiis node in our case the CM and the Admin Node.

$ perl adcfgclone.pl appsTier

Once completed sucessfully this will start the specified services only in our source Node Node A.

Running Post clone On Node B

Next you run your post clone on the Node B again specifying the services you like to configure which in our case were forms server and the web server.

$ perl adcfgclone.pl appsTier

Execute the Add Node script on Node A

After sourcing your environment file you must run the adaddnode.pl script on node A

#su - applsam
$ cd $COMMON_TOP/clone/bin
$ perl adaddnode.pl

The script will promt you for your APPS user and password and do the required new node entries to the database FND tables.

You can check the details of this new node and status through Oracle Applications Manager.

References.
Advanced Configurations and Topologies for Enterprise Deployments of E-Business Suite 11i Note Id 217368.1
Cloning Oracle Applications Release 11i with Rapid Clone Note Id 230672.1

September 25, 2006

Upgrading JDK to 1.5 and configuring Jconsole

Upgrading JDK to 1.5 and configuring Jconsole

In my earlier post i had talked about JVMs in Oracle Applications. Also i had mentioned about the jconsole tool that could be used for real time monitoring of your middle tier JVM usage.

The latest certified version of JDK supported with Oracle Applications is JDK 1.5. The version of JDK that is shipped with 11.5.10.2 is JDK 1.4.

Oracle recommends you to upgrade your JDK to 1.5 and one of the advantages of going for this upgrade is the ability to use Jconsole.

In my current i am detailing out step by step instructions for upgrading your middle tier JDK from 1.4 to 1.5 and the configuring jconsole for a real time monitoring of your JVM.


Upgrading JDK to 1.5

Downloading JDK 1.5

At the start you would require to get the J2SE1.5 software from the sun site

http://java.sun.com/j2se/1.5.0/download.jsp

Choose the J2SE 1.5 update 8 rpm file for Linux the file would be in the form of *.rpm.bin

Installing JDK 1.5

You must install the J2SE1.5 software on all the application middle tier nodes.

After you have FTPed the file to you application server change the permissions and execute the .bin file as the root user

# chmod 755 jdk-1_5_0_08-linux-i586-rpm.bin
# ./jdk-1_5_0_08-linux-i586-rpm.bin


This will present you with a binary license agreement agreeing to which will do the rpm installation for you.

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-1_5_0_08-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]

Done.


Make a note of the J2SE installation directory which i refer as JDK50_TOP, in my case it was /usr/java/jdk1.5.0_08.

Verify the java version

Verify the version of java installed

# ./java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)

The following steps are to be performed as the applications user.

Apply Inter operability patches

Apply the following Oracle Applications 11.5.10.2 J2SE1.5 inter operability patches using adpatch.

Patch 4372996
Patch 5372210


I did a shutdown of my application tier process before applying these.

$ adstpall.sh apps/apps
$ cd 4372996
$ adpatch options=hotpatch

Note: In case you have not applied the CU2 that is you are not on 11.5.10.2 you must apply TXK AutoConfig Template Rollup patch 4367673.


Execute the J2SE 5.0 Upgrade Script to Update Configuration Files

$ txkrun.pl -script=SetJDKCfg -contextfile=$CONTEXT_FILE -runautoconfig=Yes -appspass=apps -jdktop=/usr/java/jdk1.5.0_08

This will update you configuration files and run autoconfig at the end.

Verifying java on the application tiers

Execute the applications environment script again and check the JAVA in path

$ . ./APPSORA.env
$ which java
/usr/java/jdk1.5.0_08/bin/java


Testing Applications

Navigate to the following page

http://[yourhost.domain]:[port]/OA_HTML/jsp/fnd/aoljtest.jsp



 this will prompt you for your apps user, password, hostname and port. After the test is complete verify the following files are in the new JDK1.5 home.

/usr/java/jdk1.5.0_08/lib/dt.jar
/usr/java/jdk1.5.0_08/lib/tools.jar
/usr/java/jdk1.5.0_08/jre/lib/rt.jar
/usr/java/jdk1.5.0_08/jre/lib/charsets.jar


Verify adovars.env file on your application tier.

$APPL_TOP/admin/adovars.env

Check the new JDK1.5 home has been updated.

OA_JRE_TOP="/usr/java/jdk1.5.0_08"
export OA_JRE_TOP

AF_JRE_TOP="/usr/java/jdk1.5.0_08"
export AF_JRE_TOP

CLASSPATH="/usr/java/jdk1.5.0_08/jre/lib/rt.jar:/usr/java/jdk1.5.0_08/lib/dt.jar:/usr/java/jdk1.5.0_08/lib/tools.jar:/usr/jav
a/jdk1.5.0_08/jre/lib/charsets.jar:/u05/sam/applsam/samcomn/java/appsborg2.zip:/u05/sam/applsam/samora/8.0.6/forms60/java:/u0
5/sam/applsam/samcomn/java"
export CLASSPATH

AF_CLASSPATH="/usr/java/jdk1.5.0_08/jre/lib/rt.jar:/usr/java/jdk1.5.0_08/lib/dt.jar:/usr/java/jdk1.5.0_08/lib/tools.jar:/usr/
java/jdk1.5.0_08/jre/lib/charsets.jar:/u05/sam/applsam/samcomn/java/appsborg2.zip:/u05/sam/applsam/samora/8.0.6/forms60/java:
/u05/sam/applsam/samcomn/java"
export AF_CLASSPATH


Additional Check.

You can log into Oracle Applications as the sysadmin user and run a concurrent request and view the output to check the working of applications.


Configuring JCONSOLE


The jconsole executable comes within your jdk 1.5 software.You can either run it from the application middle tier server itself or connect remotely. In our case we will configure jconsole to run from the application tier server itself.

You would need to have the following two parameters in your jserv.properties file

wrapper.bin.parameters=-Dcom.sun.management.jmxremote
wrapper.bin.parameters=-Dcom.sun.management.jmxremote.ssl=false


Adding Parameters To The Custom Template File
Since the seeded autoconfig template files do not have these parameters you have to create a custom template file to intoduce these additional parameters

First you have to find out the template file corresponding to the jserv.properties file.


You could do this by running the adtmplreport.sh script at $AD_TOP/bin

$AD_TOP/bin/adtmplreport.sh contextfile=$CONTEXT_FILE target=/u05/sam/applsam/samora/iAS/Apache/Jserv/etc/jserv.properties

TEMPLATE FILE : /u05/sam/applsam/samappl/fnd/11.5.0/admin/template/jserv_ux_ias1022.properties
TARGET FILE : /u05/sam/applsam/samora/iAS/Apache/Jserv/etc/jserv.properties


Create a directory for your template file.

mkdir $FND_TOP/admin/template/custom

Copy the existing template file here

cd $FND_TOP/admin/template/custom
cp - i /u05/sam/applsam/samappl/fnd/11.5.0/admin/template/jserv_ux_ias1022.properties
.


edit this template file and introduce the following line here

wrapper.bin.parameters=-Dcom.sun.management.jmxremote
wrapper.bin.parameters=-Dcom.sun.management.jmxremote.ssl=false


Check the custom template file


Check that the custom template file is OK by running the
$AD_TOP/bin
adchkcfg.sh contextfile= appspass=
adchkcfg.sh contextfile=$CONTEXT_FILE appspass=apps

Run autoconfig and verify in the values have been written into the jserv.properties.

Restart you Oracle application tier services

$ cd $COMMON_TOP/admin/scripts/[context_name]/adstpall.sh apps/apps
$ cd $COMMON_TOP/admin/scripts/[context_name]/adstrtal.sh apps/apps

You can now launch jconsole from JDK50_TOP/bin

$ ./jconsole


As you see the configuration take place automatically when you launch jconsole from the application server itself.You just need to click on connect.

 

 

The first screen shows you a sumary of the JVM usage and garbage collection.

 

The next screen is more fun, this show you the real time JVM usage in a graphical format.

 

References
Using J2SE Version 5.0 with Oracle E-Business Suite 11i Note:304099.1Using AutoConfig to Manage System Configurations with Oracle Applications 11i Note:165195.1
Using Jconsole with Apps 11i by Steven Chan

Version Information
Oracle Applications:11.5.10.2
JDK:1.5
OS: Redhat Linux AS 4