Sunday 3 December 2017

CLONE ON EBS 12.2.4 or 12.2.0


   CLONE  ON EBS 12.2.4  or 12.2.0

 

Step 1:- adpreclone.pl  dbTier & appsTier

[oracle@appsR12 PROD_appsr12]$ ./adpreclone.pl dbTier

Log file located at /u01/database/PROD/11.2.0/appsutil/log/PROD_appsr12/StageDBTier_02181217.log

  /     50% completed      

Completed Stage...

Thu Feb 18 12:17:36 2016

 

Check current file system.

[applmgr@appsR12 appl]$ echo $FILE_EDITION

run

[applmgr@appsR12 appl]$ pwd

/u01/application/PROD/fs1/EBSapps/app

 [applmgr@appsR12 appl]$ grep FILE_EDITION PROD_appsr12.env

FILE_EDITION="run"

export FILE_EDITION

if test "$FILE_EDITION" = "patch"; then

[applmgr@appsR12 appl]$ pwd

/u01/application/PROD/fs1/EBSapps/appl

 

$ . /prodapp/PROD/EBSapps.env

 

  E-Business Suite Environment Information

  ----------------------------------------

  RUN File System           : /prodapp/PROD/fs2/EBSapps/appl

  PATCH File System         : /prodapp/PROD/fs1/EBSapps/appl

  Non-Editioned File System : /prodapp/PROD/fs_ne

 

 

  DB Host: dhebsda01.modernhome.local  Service/SID: PROD

 

 

  E-Business Suite Environment Setting

  ------------------------------------

  - Enter [R/r] for sourcing Run File System Environment file, or

  - Enter [P/p] for sourcing Patch File System Environment file, or

  - Enter anything else to exit

 

  Please choose the environment file you wish to source [R/P]:R

 

[applmgr@appsR12 scripts]$ ./adpreclone.pl  appsTier

Step 2 Take Backup:-

[oracle@appsR12 PROD_appsr12]$rman  target  /

Rman>run

{

ALLOCATE  CHANNEL a1 DEVICE TYPE DISK;

ALLOCATE  CHANNEL a2 DEVICE TYPE DISK;

ALLOCATE  CHANNEL a3 DEVICE TYPE DISK;

ALLOCATE  CHANNEL a4 DEVICE TYPE DISK;

ALLOCATE  CHANNEL a5 DEVICE TYPE DISK;

ALLOCATE  CHANNEL a6 DEVICE TYPE DISK;

backup as compressed backupset database format '/u01/database/rman/fullbackup%U%S';

backup as compressed backupset archivelog all format  '/u01/database/rman/archivelog%U%S';

backup current  controlfile format  '/u01/database/rman/control%U%S';

release channel a1;

release channel a2;

release channel a3;

release channel a4;

release channel a5;

release channel a6;

}

Step 3 Down Application and Database

[applmgr@appsR12 scripts]$ ./adstpall.sh apps/apps

Enter the WebLogic Server password:

Sql>shut immediate;

Step 4  Take  application   run file system backup of source application &  Database ORACLE_HOME.

[applmgr@appsR12 scripts]$ cd /u01/application/PROD/

[applmgr@appsR12 PROD]$ ls

fs1  fs2  fs_ne

[applmgr@appsR12 PROD]$ tar cvf -  /fs1/EBSAPPS/ | gzip -c > /u01/application/18_feb_2016/RUN_fs1_EBSAPPS.tgz

TAKE ORACLE_HOME backup:-

[oracle@appsR12 PROD]$ ls

11.2.0  data

[oracle@appsR12 PROD]$ tar cvf - 11.2.0/ | gzip -c > /u01/database/18_feb_2016/11.2.0.tgz

STEP 5

Copy backup to target server:

 

$ scp –rp 18_feb_2016 rman oracle@192.168.1.4:/u01/clone_db/

$ scp –rp RUN_fs1.tgz applmgr@192.168.1.5:/u02/app/CLONE/

 

STEP 6

 

CONFIGURE ORACLE_HOME

 

[oracle@appsR12 11g-rac(soft)]$ cd $ORACLE_HOME/appsutil/ clone/bin/

[oracle@appsR12 bin]$ perl adcfgclone.pl dbTechStack

Target System Hostname (virtual or normal) [appsr12] :

Target Instance is RAC (y/n) [n] :

Target System Database SID : TEST

Target System Base Directory : /u01/database

Target System utl_file_dir Directory List : /usr/tmp

Number of DATA_TOP's on the Target System [1] :

 

Target System DATA_TOP Directory 1 [/u01/database/PROD/data] :

et System RDBMS ORACLE_HOME Directory [/u01/database/11.2.0] : /u01/database/PROD

 

Do you want to preserve the Display [null] (y/n)  :n

Target System Display [appsr12:0.0] :

 

Target System Port Pool [0-99] : 10

 

RESTORE DATABASE :-

SQL> startup nomount;

 

SQL> show parameter db_file_name_

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert                 string      /u01/PROD/data/, /u02/apps

                                                 /CLONE/data/

SQL> sho parameter log_file

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

log_file_name_convert                string      /u01/PROD/data/,/u02/apps

                                                   /CLONE/data/

---------------------------------------------------------------------------------

STEP 7:

 

Connect to RMAN prompt as auxiliary database and restore target database.

 

$ rman auxiliary /

connected to auxiliary database: TEST (not mounted)

 

RMAN> duplicate target database to ‘TEST' backup location '/u01/database/rman' nofilenamecheck;

 

SQL> select name, status from v$database, v$instance;

NAME      STATUS

--------- ------------

TEST     OPEN

 

 

STEP 8:

 

Perform post-cloning steps on Target database:

 

Clean FND_NODES:

SQL> UPDATE applsys.fnd_profile_option_values SET profile_option_value='TEST clone 21-FEB-2016' WHERE profile_option_id=125;

1 row updated.

SQL> commit;

Commit complete.

SQL> UPDATE applsys.FND_CONCURRENT_QUEUES SET NODE_NAME=NULL, NODE_NAME2=NULL;

53 rows updated.

SQL> commit;

Commit complete.

SQL> update applsys.fnd_concurrent_queues set node_name='HOSTNAME';

53 rows updated.

SQL> TRUNCATE TABLE applsys.FND_CONCURRENT_REQUESTS;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_RUN_REQUESTS;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_CONC_REQUEST_ARGUMENTS;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_CONCURRENT_PROCESSES;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_CONC_STAT_LIST;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_CONC_STAT_SUMMARY;

Table truncated.

SQL> TRUNCATE TABLE applsys.FND_RUN_REQ_PP_ACTIONS;

Table truncated.

 

SQL> TRUNCATE TABLE applsys.WF_NOTIFICATIONS;

Table truncated.

SQL> UPDATE applsys.fnd_profile_option_values f SET f.profile_option_value = 'BLUE' WHERE f.profile_option_id = 5785;

6 rows updated.

SQL> commit;

Commit complete.

SQL> UPDATE  applsys.ALR_ALERTS SET  enabled_flag = 'N' WHERE application_id = 20003 AND  enabled_flag = 'Y';

0 rows updated.

SQL> commit;

Commit complete.

 

SQL> EXEC apps.FND_CONC_CLONE.SETUP_CLEAN;  (imp command)

 

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.s

 

SQL> @cmclean.sql

dual

SQL> commit;

Commit complete

 

Start target listener:

 

$ lsnrctl status CLONE

 

$ cd $ORACLE__HOME/appsutil/ scripts/ TEST_erptest/

 

Run autoconfig.sh on Target database node

 

$ ./adautocfg.sh

Enter the APPS user password:

 

AutoConfig completed successfully.

 

APPLICATION FS 1 CONFIGURATION:-

 

Untar the run file system backup.

 

$ mkdir fs1    

$ cd fs1

$ tar –xvcf RUN_fs1_EBSAPPS.tar

$ tar –xvf RUN_fs2_EBSAPPS.tar

 

(FMW_Home(No need)  inst(No Need))

 

STEP 10:

 

Navigate to $comn_top/clone/bin

 

$ cd /u02/apps/CLONE/fs1/EBSapps/comn/clone/bin

 

Run adcfgclone.pl appsTier

 

$ perl adcfgclone appsTier

 

Enter the APPS password :

 

Enter the Weblogic AdminServer password : 

 

Do you want to add a node (yes/no) [no] : NO

 

Target System File Edition type [run] : run

 

Provide the values required for creation of the new APPL_TOP Context file.

 

Target System Hostname (virtual or normal) [appsR12] : 

 

Target System Database SID : TEST

 

Target System Database Server Node [appsR12] : 

 

Target System Database Domain Name [mustak.com] : 

 

Target System Base Directory : /u02/apps/CLONE

 

Target System Base Directory set to /u02/apps/CLONE

 

Target System Current File System Base set to /u02/apps/CLONE/fs1

 

Target System Other File System Base set to /u02/apps/CLONE/fs2

 

Target System Fusion Middleware Home set to /u02/apps/CLONE/fs1/FMW_Home

 

Target System Web Oracle Home set to /u02/apps/CLONE/fs1/FMW_Home/webtier

 

Target System Appl TOP set to /u02/apps/CLONE/fs1/EBSapps/appl

 

Target System COMMON TOP set to /u02/apps/CLONE/fs1  /EBSapps/comn

 

Target System Instance Home Directory [/u02/apps/CLONE] : 

 

Target System Instance Top set to /u02/apps/CLONE/fs2/inst/apps/CLONE_erpclone

 

Do you want to preserve the Display [erpprod:0.0] (y/n)  : n

 

Target System Display [erpclone:0.0] : 

 

Target System Root Service [enabled] : 

 

Target System Web Administration [enabled] : 

 

Target System Web Entry Point Services [enabled] : 

 

Target System Web Application Services [enabled] : 

 

Target System Batch Processing Services [enabled] : 

 

Target System Other Services [enabled] : 

 

Do you want the target system to have the same port values as the source system (y/n) [y] ? : n

 

Target System Port Pool [0-99] : 40

 

UTL_FILE_DIR on database tier consists of the following directories.

 

1. /usr/tmp

2. /usr/tmp

3. /u02/apps/CLONE/11.2.0./appsutil/outbound/CLONE_mrpclone

4. /usr/tmp

Choose a value which will be set as APPLPTMP value on the target node [1]

AT THE END OF adcfgclone.pl SCRIPT IT WILL ASK, IF YOU WANT TO ENABLE APPLICATION SERVICES

INPUT YES.

START APPLICATION

STEP 11:

 

Run adpreclne.pl script on TARGET run file system.

 

$ cd $ADMIN_SCRIPT_HOME

$ perl adpreclone.pl appsTier

 

Down APPLICATION

 

STEP 12:

 

Create a new directory for PATCH file system at system base directory.

 

$ cd /u02/apps/CLONE

$ mkdir fs2

 

STEP 13:

 

Copy EBSapps (ONLY) folder to newly created PATCH file system folder.

 

$ cd /u02/apps/CLONE/fs1

$ ls

$ EBSapps  FMW_Home  inst

$ cp –rp EBSapps /u02/apps/CLONE/fs2

 

STEP 14:

 

Start adminserver

/u01/application/PROD/fs1/inst/apps/PROD_appsr12/admin/scripts

 

[applmgr@appsR12 scripts]$ perl adadminsrvctl.shn start

 

STEP 15:

 

Run adcfgclone.pl script from fs1(PATCH FILE SYSTEM)

 

$ cd /u02/apps/CLONE/fs2/EBSapps/comn/clone/bin.

$ perl adcfgclone.pl

 

 

  • Make sure port number of RUN file system and PATCH file system must not be same.
    (I have given port no 40 for Run file system, so I’ll give port no 41 for PATCH file system.)

  • Target System File Edition type [run] :  PATCH
  • Give the location of context file.
     
    ---------------------------------------------------------------
    STEP 15:
     
    Perform Post cloning activity.
     
     
    CHANGE THE SYSADMIN PASSWORD
     
    $ FNDCPASS apps/apps 0 Y system/manager USER SYSADMIN welcome123
     
    -----------------------------------------------------