A.Kishore 1> How to do Single Node cloning on Single machine ...

Transcription

A.Kishore 1> How to do Single Node cloning on Single machine ...
Author – A.Kishore
http://appsdba.info
Contents
1> How to do Single Node cloning on Single machine
2> Single Node Cloning Steps
3> Profile Option Name Changes at Site Level after Cloning
4> Issues and solutions while cloning in Solaris Environment for R12 env.
Thanks to Ashok for sharing his experiences
-2
-3
-6
-7
Author – A.Kishore
http://appsdba.info
How to practice cloning on one machine?
You have a single machine and want to practice cloning, right?
Here is the solution:
a> Install Single node
b> Run the pre-cloning steps
c> Shutdown the application and database – cool shutdown
d> Re-install the Operating System with new hostname and without disturbing
the Oracle Applications data – just remove the root partition and swap
partition
e> Run the necessary packages for Operating System
f> Run the post cloning the system
Note: The bottom line is, your source and target are the same machine, it is very bit
difficult to understand but just think, you are simulating Single node cloning
without actually having the one more machine.
The second solution is having VMWARE, you can have two operating system on the
same machine and practice cloning
Author – A.Kishore
http://appsdba.info
Cloning is the process of creating an identical copy of an existing Oracle Applications
system. There are various reasons for cloning an Oracle Applications system such as:
•
Creating a copy of the production system for testing updates.
•
Migrating an existing system to new hardware.
•
Creating a stage area to reduce patching downtime.
Note:135792.1 - Cloning Oracle Applications Release 11i
Note:230672.1 - Cloning Oracle Applications Release 11i with Rapid Clone
The Basic Steps for Cloning
After installing the Rapid Clone and AutoConfig patches, you are ready to clone an
instance.
Use Rapid Clone to create template files for cloning on the source system. After the
source system is copied to the target, Rapid Clone updates these templates to contain the
new target system configuration settings. Rapid Clone will not change the source system
configuration.
There are three phases to the cloning process:
1. Prepare the Source System
Execute the following commands to prepare the source system for cloning.
a. Prepare the source system database tier for cloning
Log on to the source system as the ORACLE user and run the following
commands:
cd <RDBMS ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>
perl adpreclone.pl dbTier
b. Prepare the source system application tier for cloning
Log on to the source system as the APPLMGR user and run the following
commands on each node that contains an APPL_TOP:
cd <COMMON_TOP>/admin/scripts/<CONTEXT_NAME>
perl adpreclone.pl appsTier
Note: Here you shutdown the database (normal or immediate) and the application, most
of the times I faced issues, guys will miss this step, if you don’t shutdown your database
in normal or immediate, you can never recover your database. Now, you re-install the
operating system
2. Copy the Source System to the Target System
Copy the application tier file system from the source Applications system to the
Author – A.Kishore
http://appsdba.info
target node by executing the following steps in the order listed. Ensure the
application tier files copied to the target system are owned by the target
APPLMGR user, and that the database tier files are owned by the ORACLE user.
a. Copy the application tier file system
Log on to the source system application tier nodes as the APPLMGR user.
 Shut down the application tier server processes
 Copy the following application tier directories from the source
node to the target application tier node:

<APPL_TOP>

<OA_HTML>

<OA_JAVA>

<OA_JRE_TOP>

<COMMON_TOP>/util

<COMMON_TOP>/clone

<COMMON_TOP>/_pages

<806 ORACLE_HOME>

<iAS ORACLE_HOME>
(when this directory exists)
b. Copy the database tier file system
Log on to the source system database node as the ORACLE user.
 Perform a normal shutdown of the source system database
 Copy the database (DBF) files from the source to the target system
 Copy the source database ORACLE_HOME to the target system
 Start up the source Applications system database and application
tier processes
3. Configure the Target System
Execute the following commands to configure the target system. You will be
prompted for the target system specific values (SID, Paths, Ports, etc)
a. Configure the target system database server
Log on to the target system as the ORACLE user and type the following
commands to configure and start the database:
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbTier
b. Configure the target system application tier server nodes
Log on to the target system as the APPLMGR user and type the following
commands:
cd <COMMON_TOP>/clone/bin
perl adcfgclone.pl appsTier
Author – A.Kishore
http://appsdba.info
Finishing Tasks
This section lists tasks that may be necessary depending on your implementation and the
intended use of the cloned system.
1. Update profile options
Rapid Clone updates only site level profile options. If any other profile options
are set to instance specific values, you must update them manually.
2. Update printer settings
If the new cloned system needs to utilize different printers, update the target
system with the new printer settings now.
3. Update workflow configuration settings
Cloning an Oracle Applications instance will not update the host and instance
specific information used by Oracle Workflow. Review the following tables and
columns to verify there is no instance specific data in the Workflow configuration
on the target system.
Table Name
Column Name
Column Value Details
Value starts with http://<old web
host> : Update to new web host
Value starts with "http://<old web
TEXT_VALUE
host> : Update to new web host
Create a new system defined as
the new global database name
GUID
using the Workflow
Administrator Web Applications
responsibility.
Value needs to be replaced with
NAME
the database global name
Update database link with the
ADDRESS
new database global name.
Update with the new web host
WEB_HOST_NAME
name
Update to point at the new
WEB_AGENT_NAME
PLSQL listener name
Update with the correct path to
LOGFILE_NAME
the logfile directory
Update with the new directory
OUTFILE_NAME
path on the target system
WF_NOTIFICATION_ATTRIBUTES TEXT_VALUE
WF_ITEM_ATTRIBUTE_VALUES
WF_SYSTEMS
WF_SYSTEMS
WF_AGENTS
FND_FORM_FUNCTIONS
FND_FORM_FUNCTIONS
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_REQUESTS
4. Verify the APPLCSF variable setting
Source the APPS environment and review that the variable APPLCSF (identifying
the top-level directory for concurrent manager log and output files) points to an
acceptable directory. To modify it, change the value of s_applcsf in the contextfile
and run AutoConfig.
Author – A.Kishore
http://appsdba.info
5. Update the SESSION_COOKIE_DOMAIN value in ICX_PARAMETERS
If the target system is in a different domain name than the source system and
SESSION_COOKIE_DOMAIN was not null in the source system, update that value to
reflect the new domain name.
Author – A.Kishore
http://appsdba.info
Profile Option Name Changes at Site Level after Cloning
BIS: Environment Type -> PROD, Change it to DEMO
CZ: Publication Lookup Mode-> PROD, Change it to TEST
ICX: Forms Launcher-> http://prod.com:8000/forms/frmservlet (PROD)
Change it to
http://test.com:8050/forms/frmservlet (TEST)
ICX: Oracle Payment Server URL->
http://prod.com:8000/OA_HTML/ibyecapp (PROD)
Change it to
http://test.com:8050/OA_HTML/ibyecapp (TEST)
ICX: Report Cache-> http://prod.com:8000/CACHE (PROD)
Change it to
http://test.com:8050/CACHE (TEST)
ICX: Report Images-> http://prod.com:8000/OA_MEDIA (PROD)
Change it to
http://test.com:8050/OA_MEDIA (TEST)
ICX: Report Launcher->
http://prod.com:8000/dev60cgi/rwcgi60 (PROD)
Change it to
http://test.com:8050/dev60cgi/rwcgi60 (TEST)
ICX: Report Link-> http://prod.com:8000/pls/PROD/ (PROD)
Change it to
http://test.com:8050/pls/DEV2/ (TEST)
ICX: Report Server-> PROD_APPS (PROD), Change it to DEV2_APPS (TEST)
Site Name-> PROD, Change it to “<the name you wanted>”
I gave “DEV2 Cloned From Prod on <DATE>” so that from Core
Apps we can know from the display as to when this is cloned from
PROD.
Author – A.Kishore
http://appsdba.info
Issues and solutions while cloning in Solaris Environment for R12 environment
DEV2 CLONE from PROD
Here is RMAN is used for cloning the Database
DEV2 Database Duplication using RMAN with NO CATALOG was started and
completed successfully the next day morning.
Database was up and running after the archive logs were applied at the end of the
Duplication Process. Made the LOG File Switch and opened the database. Added a
TEMP DataFile to the Temporary tablespace. Since it is a Test Instance, made the
database to NO Archive Log Mode.
Now that the Database is up and running fine, the APPLICATION Cloning was kicked
off. Deleted the APPS file system and copied the Production File System to the
corresponding location. Once done, followed the Metalink DOC : Cloning Oracle
Applications Release 12 with Rapid Clone -- Note:406982.1.
Started off with the adcfgclone.pl from $COMMON_TOP/clone/bin dir. There are couple
of errors which came in the following order :
1) [AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution. Errors are grouped by directory and phase.
The report format is:
<filename> <phase> <return code where appropriate>
[PROFILE PHASE]
AutoConfig could not successfully execute the following scripts:
Directory: /ORCLL1/oracle/dev2/inst/apps/DEV2_stride01s-prod/admin/install
afcpctx.sh
INSTE8_PRF
137
The afcpctx.sh failed because of missing lib files in 10.1.2 OH/lib and 10.1.2 OH/lib32
directories. Also due to the wrong path pointed by these variables (like ldflags pointing to
the Prod instance). Once these are taken care of, run adcfgclone.pl again.
Some times following errors might come in spite of the adcfgclone.pl ran successfully.
This results in the apps services not getting started. Like the OPMN process do not start
and end with status 2 (error). This happens due to the missing file in the 10.1.2 OH/bin32
directory.
The error is:
Author – A.Kishore
http://appsdba.info
libopmnoraclenls.so:
unable
to
load
\377\277\245V\377\277\245Y\377\277\245\
main: NLS initialization failed!!
libopmnoraclenls.so: unable to load \377\277\245(\377\277\245^
main: NLS initialization failed!!
libopmnoraclenls.so:
unable
to
\377\277\245^X\377\277\245N\377\277\245Q\377\277\245T
main: NLS initialization failed!!
opmnctl: opmn start failed.
\377\277\245
load
This issue is due to the libclntsh.so.10.1 library not being present under the lib32 folder.
Setting
the oracle home to
10.1.3 then running that ./bin/genclntsh
helps:
If you run with the -32 option it updates the ./lib32 version of libclntsh.so.10.1
if you run without the -32 option it updates the ./lib version of libclntsh.so.10.1
( and similarly if it was set to 10.1.2,libclntsh.so.10.1 will be created in 10.1.2/lib )
So it is very important to set the Oracle Home to 10.1.3.
03/02/08-01:17:36 :: adopmnctl.sh: exiting with status 2
So,
Simply
copy
the
file
libclntsh.so.10.1
environment to non-working environment into the lib32 directory.
But,
this
is
applicable
only
to
the
OR
You can generate libclntsh.so.10.1 by executing the following command
file
same
from a
version
working
of
OS.
$10.1.3_OH/bin/genclntsh -32
Setting
the
correct
oracle
home
to
10.1.3
then
running
If
you
run
with
the
-32
option
it
updates
the
./lib32
If
you run
without
the -32
option
it
updates the
./lib
( and similarly if it was set to 10.1.2, libclntsh.so.10.1 will
that
./bin/genclntsh
helps:
version
of
libclntsh.so.10.1
version of
libclntsh.so.10.1
be created in 10.1.2/lib )
So it is very important to set OH to 10.1.3.
Reference : 413109.1
Now, The services started and running fine.
Some time, if we observe the ICM is not started at all and hence the concurrent
processing is not run on the the node. For this, it is a common problem for single node to
single node cloning because there is a bug. There is indeed a work around for this to
make the ICM to come up.
Shut down the services and make sure that no FND processes are running.
Author – A.Kishore
http://appsdba.info
And follow the note: 434613.1
Make FNDSM trigger and clean FND_NODES table and run autoconfig in apps tier. This
should take care of the ICM problem.
Now, if we observe the following error is observed in the log file of adcfgclone.
To overcome this run AutoConfig on DB tier and then on Apps tier. This should take care
of this problem. This happens because we did not run autoconfig on DB tier after the
RMAN Duplication.
SCRIPT RETURNED:
########################################################################
##
Generate Tns Names
########################################################################
##
Logfile:
/ORCLL1/oracle/dev2/inst/apps/DEV2_stride01sprod/admin/log/NetServiceHandler.log
Classpath
:
/ORCLL1/oracle/dev2/apps/apps_st/comn/java/lib/appsborg2.zip:/ORCLL1/oracle/dev2/
apps/apps_st/comn/java/classes
Updating s_tnsmode to 'generateTNS'
UpdateContext exited with status: 0
AC-50480: Internal error occurred: java.lang.Exception: Error while generating
listener.ora.
Error generating tnsnames.ora from the database, temporary tnsnames.ora will be
generated using templates
Instantiating Tools tnsnames.ora
Tools tnsnames.ora instantiated
Web tnsnames.ora instantiated
adgentns.pl exiting with status 512
ERRORCODE = 512 ERRORCODE_END
.end std out.
.end err out.
Result
: FAILED
Now, all seem to be fine and the all running at APPS Tier and DB Tier.
With this, the single node cloning comes to an end successfully.
Author – A.Kishore
http://appsdba.info