0% found this document useful (0 votes)
1K views

Enable AutoConfig On Applications Database Tier ORACLE EBS

The document describes the steps to enable autoconfiguration on the applications and database tiers of an Oracle RAC environment. It involves generating an appsutil file, copying files between tiers, setting environment variables, running scripts, and cleaning the configuration. The goal is to automatically configure the applications to connect to the Oracle RAC database using load balancing and failover.

Uploaded by

Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Enable AutoConfig On Applications Database Tier ORACLE EBS

The document describes the steps to enable autoconfiguration on the applications and database tiers of an Oracle RAC environment. It involves generating an appsutil file, copying files between tiers, setting environment variables, running scripts, and cleaning the configuration. The goal is to automatically configure the applications to connect to the Oracle RAC database using load balancing and failover.

Uploaded by

Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Author A.

Kishore
http:/www.appsdba.info
Enable AutoConfig on Applications Database Tier
Steps to Perform On All Oracle RAC Nodes
1> Execute $AD_TOP/bin/admkappsutil.pl on the applications tier to generate an
appsutil.zip file for the database tier.

2> Copy (e.g. via ftp) the appsutil.zip file to the database tier in the 11gR2_ORACLE_HOME
On linux1

On linux2

3> Unzip the appsutil.zip file to create the appsutil directory in the 11gR2_ORACLE_HOME
unzip appsutil (on linux1 and linux2)

Author A.Kishore
http:/www.appsdba.info
4> Copy the jre directory from SOURCE_ORACLE_HOME>/appsutil to
11gR2_ORACLE_HOME>/appsutil.
On linux1

On linux2

5. Create a <CONTEXT_NAME> directory under <11gR2_ORACLE_HOME>/network/admin. Use


the new instance name while creating the context directory. For example, if your database name
is VISRAC, and you want to use "vis" as the instance prefix, create the <CONTEXT_NAME>
directory as vis1_<hostname>.

7. Set the following environment variables:


ORACLE_HOME =<11gR2_ORACLE_HOME>
LD_LIBRARY_PATH = <11gR2_ORACLE_HOME>/lib,
<11gR2_ORACLE_HOME>/ctx/lib
ORACLE_SID = <instance name for current database node>
PATH= $PATH:$ORACLE_HOME/bin;
TNS_ADMIN = $ORACLE_HOME/network/admin/<context_name>

export ORACLE_HOME =
/d01/oracle/app/oracle/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH = $ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
ORACLE_SID = RACDB1
export PATH= $PATH:$ORACLE_HOME/bin;
export TNS_ADMIN = $ORACLE_HOME/network/admin/racdb1_linux1

Author A.Kishore
http:/www.appsdba.info
8> Copy the tnsnames.ora file from $ORACLE_HOME/network/admin to the $TNS_ADMIN
directory, and edit the aliases for SID=<new RAC instance name>.

9. As the APPS user, run the following command on the primary node to de-register the
current configuration:
SQL>exec fnd_conc_clone.setup_clean;

PL/SQL procedure successfully completed.


10. From the 11gR2 ORACLE_HOME/appsutil/bin directory, create an instance-specific XML
context file by executing the command:
cd $ORACLE_HOME/appsutil/bin
perl adbldxml.pl appsuser=apps appspass=apps

Copy tnsnames.ora and listener.ora from Source ORACLE Home

cd /d01/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/RACDB_linux1

modify listener.ora as follows

Author A.Kishore
http:/www.appsdba.info

Author A.Kishore
http:/www.appsdba.info

Perform the same on linux2

Author A.Kishore
http:/www.appsdba.info

11. Set the value of s_virtual host_name to point to the virtual hostname for the database

host, by editing the database context file $ORACLE_HOME/appsutil/<sid>_hostname.xml

grep "s_virtual"
/d01/oracle/app/oracle/product/11.2.0/dbhome_1/appsutil/RACDB1_linux1.xml
<host oa_var="s_virtual_hostname">linux1-vip</host>
From the 11gR2 ORACLE_HOME/appsutil/bin directory, execute AutoConfig on the database tier
by running the adconfig.pl script
On linux1
cd /d01/oracle/app/oracle/product/11.2.0/dbhome_1/appsutil/bin
perl adconfig.pl
/d01/oracle/app/oracle/product/11.2.0/dbhome_1/appsutil/RACDB1_linux1.xml
Problem 1
Executable : /d01/oracle/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
ERRORCODE = 1 ERRORCODE_END
Solution:

cd $ORACLE_HOME/oracore/zoneinfo
ln -s timezone_11.dat timezone.dat
ln -s timezlrg_11.dat timezlrg.dat
Problem -2
Enter value for 1: Enter value for 2: Enter value for 3: ERROR:

Author A.Kishore
http:/www.appsdba.info
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Open the logfile

Solution
SQL> show parameter control_files
NAME
TYPE
VALUE
------------------------------------ ----------- -----------------------------control_files
string
+DATA/racdb/controlfile/current.303.735182119
vi $ORACLE_HOME/dbs/RACDB1_APPS_BASE.ora
control_files=+DATA/racdb/controlfile/current.303.735182119
Solution :
1. The afdbprf.sh script fails with the following error while enabling autoconfig on database tier :

Author A.Kishore
http:/www.appsdba.info
(Solution b) :
(I) Register local_listener dynamically for each of the database tier nodes :
$ sqlplus /nolog
SQL> conn sys / as sysdba
SQL> alter system set
local_listener="(ADDRESS=(PROTOCOL=TCP)(HOST=linux1.oracle.com)(PORT=1531))"
scope=both sid='RACDB1';
SQL> alter system register;
SQL> exit;

(II) Next, reload the current listener which is LISTENER_<hostname> on each of the database
nodes :
$ lsnrctl reload RACDB1
(I) Finally, clean the existing Oracle Network Topology Model from the database by running
FND_CONC_CLONE.SETUP_CLEAN procedure as apps user :
SQL> conn apps/<apps_password>
SQL> exec fnd_conc_clone.setup_clean;
SQL> commit;
SQL> exit;
(IV) Run Autoconfig on both RAC nodes.

Author A.Kishore
http:/www.appsdba.info

On linux2
perl adconfig.pl
/d01/oracle/app/oracle/product/11.2.0/dbhome_1/appsutil/RACDB2_linux2.xml

1. Check the AutoConfig log file located in the <11gR2


ORACLE_HOME>/appsutil/log/<CONTEXT_NAME>/<MMDDhhmm

3.8 Establish Applications Environment for


Oracle RAC
3.8.1 Preparatory Steps
Carry out the following steps on all application tier nodes:
1. Source the Oracle Applications environment.
2. Edit SID=<Instance 1> and PORT=<New listener port > in $TNS_ADMIN/tnsnames.ora
file, to set up connection one of the instances in the Oracle RAC environment.

RACDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=linux1.oracle.com)(PORT=1531))
(CONNECT_DATA=
(SERVICE_NAME=RACDB)
(INSTANCE_NAME=RACDB1)
)
)
3. Confirm you are able to connect to one of the instances in the Oracle RAC environment.

Author A.Kishore
http:/www.appsdba.info
4. Edit the context variable jdbc_url, adding the instance name to the connect_data
parameter.
<jdbc_url
oa_var="s_apps_jdbc_connect_descriptor">jdbc:oracle:thin:@(DESCRIPTION=(ADDRES
S_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=ra
cerp1-vip.oracle.com)(PORT=1531))(ADDRESS=(PROTOCOL=tcp)(HOST=racerp2vip.oracle.com)(PORT=1531)))(CONNECT_DATA=(SERVICE_NAME=RACDB)))</jdbc_url
>
5. Run AutoConfig using the command:
$ $AD_TOP/bin/adconfig.sh
contextfile=$INST_TOP/appl/admin/<context_file>.
For more information on AutoConfig, see My Oracle Support Knowledge Document
387859.1, Using AutoConfig to Manage System Configurations with Oracle E-Business
Suite Release 12.
cd $ADMIN_SCRIPTS_HOME

6. Check the $INST_TOP/admin/log/<MMDDhhmm> AutoConfig log file for errors.


7. Source the environment by using the latest environment file generated.

Author A.Kishore
http:/www.appsdba.info
8. Verify the tnsnames.ora and listener.ora files. Copies of both are located in the
$INST_TOP/ora/10.1.2/network/admin directory and
$INST_TOP/ora/10.1.3/network/admin directory. In these files, ensure that the correct
TNS aliases have been generated for load balance and failover, and that all the aliases
are defined using the virtual hostnames.
9. Verify the dbc file located at $FND_SECURE. Ensure that the parameter APPS_JDBC_URL
is configured with all instances in the environment, and that load_balance is set to YES.

Start the services


cd $ADMIN_SCRIPTS_HOME
sh adstrtal.sh apps/apps

Author A.Kishore
http:/www.appsdba.info

Author A.Kishore
http:/www.appsdba.info

Hmmm Had to wait years to see this screen

Set Up Load Balancing


Implement load balancing for the Oracle Applications database connections:
1. Run the Context Editor (through the Oracle Applications Manager interface) and set the
value of "Tools OH TWO_TASK" (s_tools_two_task), "iAS OH TWO_TASK"
(s_weboh_twotask) and "Apps JDBC Connect Alias" (s_apps_jdbc_connect_alias).
2. To load balance the forms based applications database connections, set the value of
"Tools OH TWO_TASK" to point to the <database_name>_balance alias generated in the
tnsnames.ora file.
3. To load balance the self-service applications database connections, set the value of "iAS
OH TWO_TASK" and "Apps JDBC Connect Alias" to point to the
<database_name>_balance alias generated in the tnsnames.ora file.
4. Execute AutoConfig by running the command:

$ $AD_TOP/bin/adconfig.sh
contextfile=$INST_TOP/appl/admin/<context_file>

Author A.Kishore
http:/www.appsdba.info
5. Restart the Applications processes, using the new scripts generated by AutoConfig.
6. Ensure that value of the profile option "Application Database ID" is set to dbc file name
generated in $FND_SECURE.
Note: If you are adding a new node to the application tier, repeat the above steps 1-6
for setting up load balancing on the new application tier node.

Shutdown process
Shutdown applications
cd $ADMIN_SCRIPTS_HOME
sh adstpall.sh apps/apps

cd /d01/oracle/app/11.2.0/grid/bin/
[oracle@linux1 bin]$ crsctl check crs

By default, the Global Services Daemon (GSD) is not started on the cluster. To start GSD, change
directory to the <CRS_HOME> and issue the following commands:

srvctl enable nodeapps g


srvctl start nodeapps

PRKO-2421 : Network resource is already started on node(s): linux1,linux2


PRKO-2420 : VIP is already started on node(s): linux1,linux2
PRKO-2420 : VIP is already started on node(s): linux1,linux2
PRKO-2422 : ONS is already started on node(s): linux1,linux2
PRKO-2423 : eONS is already started on node(s): linux1,linux2
crs_stat -t

Author A.Kishore
http:/www.appsdba.info

srvctl stop database -d RACDB

Author A.Kishore
http:/www.appsdba.info
Using Oracle 11g Release 2 Real Application Clusters with Oracle E-Business Suite Release 12 (Doc
ID 823587.1)

crsctl status res t

Oracle 11gr2 RAC SCAN: ORA-12514: TNS:listener does


not currently know of service requested in connect

Author A.Kishore
http:/www.appsdba.info
Executable : /d01/oracle/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
ERRORCODE = 1 ERRORCODE_END
soluton

cd $ORACLE_HOME/oracore/zoneinfo
ln -s timezone_11.dat timezone.dat
ln -s timezlrg_11.dat timezlrg.dat
Hi,
Check This...on Metalink.
Setup SCAN listener and Clients to use SCAN listener to connect to 11gR2 RAC using SCAN.
How to Setup SCAN Listener and Client for TAF and Load Balancing [Video] [ID 1188736.1]
This video is fantastic.
Below Video - Setup SCAN and Configure SCAN Listener. Client Configuration for TAF and Load Balancing (29:00)
https://support.oracle.com/CSP/main/article?cmd=show&type=ATT&id=1188736.1:scan_listener&inline=1
To full support the SCAN, all clients must be 11g R2.

http://gjilevski.wordpress.com/2009/12/13/rac-enabling-ebs-12-1-1/

Author A.Kishore
http:/www.appsdba.info
Document TitleTroubleshooting Autoconfig issues with Oracle Applications RAC
Databases (Doc ID 756050.1)
Modified Date LabelModified Modified Date26-DEC-2008 Document Type LabelType Document
TypeTROUBLESHOOTING Status PUBLISHED(EXTERNAL) Priority 3
To Bottom

In this Document
Purpose
Last Review Date

Instructions for the Reader

Troubleshooting Details
Section 1 : Known Issues
Section : 2 Information required by Support
References

Applies to:
Oracle Applications Technology Stack - Version: 11.5.10.2 to 12.0.6
Information in this document applies to any platform.

Purpose
This troubleshooting note is intended as a guide to determine the cause of autoconfig problems
encountered during enabling autoconfig on database and application tiers after converting
single instance EBS database to RAC.
This Note is NOT a replacement for Note 388577.1 for R12 and from Note 362135.1 for 11i..
Rather this document tries to provide detailed explanation about some of the configuration
steps which in turn helps determine the actual cause of the Autoconfig errors encountered after
RAC conversion.

Last Review Date


December 15, 2008

Instructions for the Reader


A Troubleshooting Guide is provided to assist in debugging a specific issue. When possible,
diagnostic tools are included in the document to assist in troubleshooting.

Troubleshooting Details

Author A.Kishore
http:/www.appsdba.info

Section 1 : Known Issues


1. The afdbprf.sh script fails with the following error while enabling autoconfig on
database tier :
ORA-12154: TNS:could not resolve service name
Solution 1
The solution (a) or (b) can be followed to overcome this error.
(Solution a) :
Ensure that local listener and remote listener alias are created correctly as per step 10 of
"Section 3.8 Convert Database 10g to Oracle RAC using rconfig" from Note. 388577.1 for R12
and from Note. 362135.1 for 11i. The following example explains how should init<SID>.ora file
look like assuming for two node RAC.

initPROD1.ora (from RAC node 1, say icmtest8 having virtual host name icmtest8-vip, having
SID PROD1)
local_listener = PROD1_LOCAL
remote_listener = PROD_REMOTE

initPROD2.ora (from RAC node 2, say icmtest4 having virtual host name icmtest4-vip, having
SID PROD2)
local_listener = PROD2_LOCAL
remote_listener = PROD_REMOTE
The tnsnames.ora on database tier must have following three entries for local and remote
listeners on all RAC nodes. The following example assumes, a two node RAC having virtual host
names icmtest8-vip, icmtest4-vip and SIDs PROD1, PROD2 :
PROD1_LOCAL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=icmtest8-vip.idc.oracle.com)(PORT=1521))
)
PROD2_LOCAL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=icmtest4-vip.idc.oracle.com)(PORT=1521))
)
PROD_REMOTE=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=icmtest8-vip.idc.oracle.com)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=icmtest4-vip.idc.oracle.com)(PORT=1521))

Author A.Kishore
http:/www.appsdba.info
)
)
(Solution b) :
(I) Register local_listener dynamically for each of the database tier nodes :

$ sqlplus /nolog
SQL> conn sys / as sysdba
SQL> alter system set local_listener="(ADDRESS=(PROTOCOL=TC
P)(HOST=<host>)(PORT=<port))" scope=both sid='<sid>';
SQL> alter system register;
SQL> exit;
(II) Next, reload the current listener which is LISTENER_<hostname> on each of the database
nodes :

$ lsnrctl reload <listener name>


(I) Finally, clean the existing Oracle Network Topology Model from the database by running
FND_CONC_CLONE.SETUP_CLEAN procedure as apps user :

SQL>
SQL>
SQL>
SQL>

conn apps/<apps_password>
exec fnd_conc_clone.setup_clean;
commit;
exit;

(IV) Run Autoconfig on both RAC nodes.


2. The newly created listener runs into following error while starting:
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol
Solution 2 :
One of the cause for this error is that the hostname being used for the listener is the physical
hostname. Hence the listener has startup problems i.e error "TNS-12542: TNS:address already
in use". The following steps were performed to correct this error :
(I) Rectify the listener.ora file located under $TNS_ADMIN folder to use the virtual hostname
rather than the physical hostname. Please note that this is just to ensure that autoconfig works
correctly for time being as anyway autoconfig will update the listener.ora file.

Author A.Kishore
http:/www.appsdba.info
(II) Start the listener.
(III) Edit the database tier context file (<SID_Hostname>.xml) located under
$RDBMS_ORACLE_HOME/appsutil via Oracle Application Manager. Modify the following context
variable to set the virtual host name for the database tier nodes :
Context Variable
s_virtual_host_name

Context Variable Value


Virtual Host name of Database
tier

(IV) Run autoconfig.


(V) Restart the listener.
3. Running adbldxml.pl script while creating context file for database tier before
enabling autoconfig errors out with the following error :
perl adbldxml.pl tier=db appsuser=apps appspasswd=<apps password>
Starting context file generation for db tier..
Using JVM from .... to execute java programs..
The log file for this adbldxml session is located at:
<RDBMS $ORACLE_HOME>/appsutil/log/adbldxml_xxxxxx.log
Could not Connect to the Database : Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
<virtual host name>:<listener port>:<service name>
Solution 3:
If adbldxml could not connect to database, that is fine. It is anyway prompting you to provide
the inforamation. The same has been mentioned in 11i RAC document Note 362135.1 :
NOTE
In case this execution could not connect to database, this will prompt for hostname, SID and
port values. Supply the instance details running on the current node for these.
Thus, the error can be ignored and provide correct database connection details.
4. Autoconfig incorrectly updates listener names as SID rather than
LISTENER_<hostname>.
Incorrect listener entry (assuming virtual host name of database tier as icmtest8-vip and SID as
PROD1)
PROD1 =

Author A.Kishore
http:/www.appsdba.info
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = icmtest8-vip.idc.oracle.com)(PORT = 1521)(IP =
FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = icmtest8)(PORT = 1521)(IP = FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROCPROD1)))
)
)
Correct listener entry (assuming virtual host name of database tier as icmtest8-vip and SID as
PROD1)
LISTENER_icmtest8 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = icmtest8-vip.idc.oracle.com)(PORT = 1521)(IP =
FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = icmtest8)(PORT = 1521)(IP = FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROCPROD1)))
)
)
Solution 4:
The cause of this issue is identified as autoconfig uses template ad8ilsnr.ora and not template
adlsnr10RAC.ora. It is because the following two context variables are not correctly set :
s_dbCluster
s_database_type
These context variables must be set as follows :
<cluster_database oa_var="s_dbCluster">TRUE</cluster_database>
<config_option type="database" oa_var="s_database_type">RAC</config_option>

Section : 2 Information required by Support


For any errors / issues encountered during enabling autoconfig on either database tier or
application tier after converting to RAC, the following information would be required by
support. Hence please upload the same while creating Service Request with Oracle Support.
Release 12

Author A.Kishore
http:/www.appsdba.info
Database Tier Configuration Files
<RDBMS
<RDBMS
<RDBMS
<RDBMS

$ORACLE_HOME>/network/admin/$CONTEXT_NAME/listener.ora
$ORACLE_HOME>/network/admin/$CONTEXT_NAME/tnsnames.ora
$ORACLE_HOME>/appsutil/<$CONTEXT_NAME>.xml
$ORACLE_HOME>/dbs/init<sid>.ora

Application Tier Configuration Files

<$INST_TOP>/ora/10.1.2/network/admin/listener.ora
<$INST_TOP>/ora/10.1.2/network/admin/tnsnames.ora
<$INST_TOP>/appl/admin/<$CONTEXT_NAME>.xml
<$FND_SECURE>/<sid>.dbc

Database Tier Log Files

<RDBMS $ORACLE_HOME>/appsutil/log/<$CONTEXT_NAME>/<timestamp>/autoconfig.log
<RDBMS
$ORACLE_HOME>/appsutil/log/<$CONTEXT_NAME>/<timestamp>/NetServiceHandler.log

Application Tier Log Files

<$INST_TOP>/admin/log/<timestamp>/autoconfig.log
<$INST_TOP>/admin/log/<timestamp>/NetServiceHandler.log
R12 generates autoconfig.log and NetServiceHandler.log under same <timestamp> folder
under <$INST_TOP>/admin/log .
Release 11i

Database Tier Configuration Files


<RDBMS
<RDBMS
<RDBMS
<RDBMS

$ORACLE_HOME>/network/admin/$CONTEXT_NAME/listener.ora
$ORACLE_HOME>/network/admin/$CONTEXT_NAME/tnsnames.ora
$ORACLE_HOME>/appsutil/<$CONTEXT_NAME>.xml
$ORACLE_HOME>/dbs/init<sid>.ora

Application Tier Configuration Files

<$TNS_ADMIN>/listener.ora
<$TNS_ADMIN>/tnsnames.ora
<$APPL_TOP>/admin/<$CONTEXT_NAME>.xml
<$FND_SECURE>/<sid>.dbc

Database Tier Log Files

<RDBMS $ORACLE_HOME>/appsutil/log/<$CONTEXT_NAME>/<timestamp>/autoconfig.log
<RDBMS
$ORACLE_HOME>/appsutil/log/<$CONTEXT_NAME>/<timestamp>/NetServiceHandler.log

Application Tier Log Files

<$APPL_TOP>/admin/log/<timestamp>/autoconfig.log
<$APPL_TOP>/admin/log/<timestamp>/NetServiceHandler.log
11i generates autoconfig.log and NetServiceHandler.log in two different <timestamp> folders
under <$APPL_TOP>/admin/log.

You might also like