Tuesday, May 22, 2012

EBS R12 Cloning on Sun Solaris Environment



Introduction

This document provides steps required to clone Oracle EBS R 12.1.2 in Sun Solaris environment. This document has been designed to perform EBS Cloning in multi user environment.Before the startup of Clone Process on Target System it must be ensured that Pre Clone steps have been performed on the Source System.The process of cloning is expected to take around twelve hours including the preparation of OS.
Preclone Steps on Database Tier
bash-3.00$ pwd
/u1/oradev/DEV/db/tech_st/11.1.0/appsutil/scripts/rvf_crprvf
bash-3.00$ perl adcfgclone.pl dbTier

Preclone Steps on Application Tier
bash-3.00$ pwd
/u1/appdev/DEV/inst/apps/DEV_crpamc/admin/scripts
bash-3.00$ perl adpreclone.pl appsTier

After these two PreClonesteps and shutdown of Application and Database Tier, TAR files should be generated and moved to Target System

Operating System Prerequisites before Cloning Process Startup

OS Properties Verification

hostname                                           -              Command to verify hostname of target machine
You might need to update /etc/hosts file to include hostname if it is not already set
cat /etc/hosts
127.0.0.1              localhost
::1                           localhost
10.10.0.161     CRPAMC.mydomain.com    CRPAMC

cat /etc/netmasks                           -              Command to verify net masks settings
uname –a                                            -              Command to verify OS version
df –lh                                                    -              Command to verify available space

 



OS Patches Verification

showrev–p | sort  >>patchList                   -              This command will generate a file named patchList in which you need to search and confirm that following four packages are available in OS environment.
125100
120473
127111
137111

OS Packages Setup

Confirm following OS packages are installed.
pkginfo SUNWarc
pkginfo SUNWbtool
pkginfo SUNWhea
pkginfo SUNWlibm
pkginfo SUNWlibms
pkginfo SUNWsprot
pkginfo SUNWtoo
pkginfo SUNWi1of
pkginfo SUNWi1cs
pkginfo SUNWi15cs
pkginfo SUNWxwfnt
pkginfo SUNWuiu8
pkginfo SUNWulcf
pkginfo SUNWlibC

ROOT user profile settings

Insert line below in .profile file of root user so that software installed could be confirmed,
PATH=$PATH:/usr/sbin:/usr/bin:/usr/X11/bin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/sfw/bin
export PATH

OS Kernel Settings

Insert following line in /etc/system file
Set noexec_user_stack=1



OS Project Initiation

projadd -U oraamc user.oraamc
projmod -s -K "project.max-sem-ids=(priv,100,deny)" user.oraamc
projmod -s -K "process.max-sem-nsems=(priv,256,deny)" user.oraamc
projmod -s -K "project.max-shm-memory=(priv,23622320128,deny)" user.oraamc
projmod -s -K "project.max-shm-ids=(priv,100,deny)" user.oraamc
projmod -s -K "process.max-file-descriptor=(priv,65536,deny)" user.oraamc

Update /etc/user_attr file to include following line
oraamc::::project=user.oraamc

Verify that project has been added,
cat /etc/project

 

Prerequisite s Software

which ar
which ld
which make
which X

 

Home Directories Creation

mkdir /export/home
mkdir /export/home/oraamc
mkdir /export/home/appamc

 

mkdir /var/tmp/.oracle
chmod 777 /var/tmp/.oracle

OS Groups Settings

groupadd oinstall
groupadd dba

OS Users Setups

useradd -g oinstall -G dba -d /export/home/oraamc/ oraamc
useradd -g oinstall -G dba -d /export/home/appamc/ appamc

cp .profile /export/home/oraamc/
cp .profile /export/home/appamc/
chown oraamc:oinstall /export/home/oraamc/.profile
chown appamc:oinstall /export/home/appamc/.profile




Cloning Process

EBS Movement to Target Machine

Accessing EBS TAR File by mounting it
mkdir /mnt/EBS
mount 10.10.0.89:/test/ /mnt/EBS

EBSs TAR File Extraction

cd /u1
tar -xvf /mnt/EBS/devbackup/DEV_BK_ORADEV_140411_23_00.tar
tar -xvf /mnt/EBS/devbackup/DEV_BK_APPDEV_140411_23_00.tar

Folders Rights Setup

chown -Rh oraamc:oinstall oradev/
chown -Rh appamc:oinstall appdev/
chmod -fR 775 oradev/
chmod -fR 775 appdev/

Database Tier Clone

su - oraamc
Verify .profile has run and paths has been set

Run db environmental file to set the environmental variables

cd /u1/oradev/DEV/db/tech_st/11.1.0/appsutil/clone/bin
perl adcfgclone.pl dbTier

In case above script has not run successfully then,
Source the environment,
. /u1/oradev/DEV/db/tech_st/11.1.0/DEV_crpamc.env
Re-execute adcfclone

adcfgclone.pl Prompts Values
Target System Base Directory:                                   /u1/oradev/DEV/
utl_file_dir                                                                          /usr/tmp/
DATA_TOP                                                                          /u1/oradev/DEV/db/apps_st/data
ORACLE_HOME                                                                                /u1/oradev/DEV/db/tech_st/11.1.0/



Application Tier Clone

su – appamc
Make sure .profile has run and path has been set

cd /u1/appdev/DEV/apps/apps_st/comn/clone/bin
perl adcfgclone.pl appsTier

adcfgclone.pl Prompts Values
System Base Direcotory /u1/appdev/DEV
(Rest of the values can be accepted as default)


Post Clone Steps

Path Setting:

Put env path <context-filename>.env into .profile for oraamc
Put env path <context-filename>.env into .profile for appamc

SPFile Enabling

Check if spfile is being used or not using following commands
slqplus / as sysdba
show parameter spfile
If it is not being used you can create it using following command,
Create spfile from pfile;

Then you can remove pfile
rm $ORACLE_HOME/dbs/initAMC.ora

Automatic Memory Management Configuration

Shut down all services
Startup
Create spfile from pfile;
Startup nomount;
alter system set sga_max_size=0 scope=spfile;
alter system set sga_target=0 scope=spfile;
alter system set memory_max_target=16G scope=spfile;
alter system set memory_target=14G scope=spfile;
alter system set pga_aggregate_target=0 scope=spfile;
shutdown immediate

With root user:
cd $ORACLE_HOME/bin
chmod 4550 oradism
chmod g+s oradism
chown root:dba oradism
Bounce the database

With oracle user:
cd $ORACLE_HOME/appsutil/scripts/<context dir>

Update adstrtdb.sql
vi adstrtdb.sql
Remarks the startup entry
Just write startup
Save and exit

sql> startup

Users Passwords Setup FNDCPASS

Application Services should be down

Syntax
cd $FND_TOP/bin

FNDCPASS logon 0 y system/passwd mode username newpasswd
logon = username/passwd for connect
system/passwd = system account of the db
mode = SYSTEM/USER/ORACLE
username = is the username where u want to change passwd

To change the apps password
FNDCPASS apps/xxxx 0 Y system/xxxxx SYSTEM APPLSYS newpass
[Change the applsys passwd automatically, change apps passwd]

FNDCPASS apps/appsdevadmin098 0 Y system/systemdev SYSTEM APPLSYS apps

To change product schema password
FNDCPASS apps/xxxx 0 Y system/xxxxx ORACLE GL newpass

To change all schemas password
FNDCPASS apps/xxxx 0 Y system/xxxxx ALLORACLE newpass

FNDCPASS apps/appsdevadmin098 0 Y system/systemdev ALLORACLE apps


To change application level password
FNDCPASS apps/xxxx 0 Y system/xxxxx USER sysadmin newpass

FNDCPASS apps/apps 0 Y system/systemdev USER sysadmin sysadmin

 Best Practice
Before changed always take backup of fnd_user and fnd_oracle_userid (create table fnd_user_bak as select


Workflows Updating


As apps user
1.       select text_value from wf_notification_attributes where upper(text_value) like upper('%http://ERP%');
updatewf_notification_attributes set text_value=replace(text_value,'http://erp.mydomain.com:8000','http://crpamc.mydomain.com:8000') where upper(text_value) like upper('%http://erp.mydomain.com:8000%');
2.       select text_value from wf_item_attribute_values where upper(text_value) like upper('%http://ERP%');
updatewf_item_attribute_values set text_value=replace(text_value,'http://erp.mydomain.com:8000','http://crpamc.mydomain.com:8000') where upper(text_value) like upper('%http://erp.mydomain.com:8000%');

3.       Do not do this not required
selectguid from wf_systems --define new usering workflow administrator web appl responsibility

4.       (NOT REQUIRED AS DB NAME HAS NOT BEEN CHANGED)
select name from wf_systems --replace with dbglobale name, if not
updatewf_systems set name='DEV.mydomain.com';

5.       (NOT REQUIRED AS DB NAME HAS NOT BEEN CHANGED)
select address from wf_agents where upper(address) like upper('%DEV%') --update db link with new database global name
updatewf_agents set address=replace(address,'DEV','NEW SID NAME TYPE HERE') where upper(address) like upper('%DEV.mydomain.com%')

6.       No need
selectweb_host_name from fnd_form_functions where web_host_name is not null -- update with new web host name

7.       No need
selectweb_agent_name from fnd_form_functions where web_agent_name is not null --update point to new listener, no need to change

8.       select logfile_name from fnd_concurrent_requests -- change the path for correct location
updatefnd_concurrent_requests set logfile_name = replace(logfile_name,'/development','/u1') where logfile_name like '%/development%';

9.       select outfile_name from fnd_concurrent_requests -- change the path for correct location
updatefnd_concurrent_requests set outfile_name = replace(outfile_name,'/development','/u1') where outfile_name like '%/development%';

No comments:

Post a Comment