Thursday, August 31, 2017

error: Failed to initialize NSS library when running yum in OEL 7.3

Error

[root@localhost yum.repos.d]# yum install oracle-ebs-server-R12-preinstall
error: Failed to initialize NSS library
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   cannot import name ts

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Sep  5 2016, 02:30:38)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-9)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


Solution :
download nspr-4.13.1-1.0.el7_3.x86_64.rpm
with root go to /usr/lib64 and run below command

rpm2cpio nspr-4.13.1-1.0.el7_3.x86_64.rpm | cpio -idmv
error: Failed to initialize NSS library
./usr/lib64/libnspr4.so
./usr/lib64/libplc4.so
./usr/lib64/libplds4.so
563 blocks

and then run below command

[root@localhost lib64]# LD_PRELOAD=./usr/lib64/libnspr4.so yum update nspr
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package nspr.x86_64 0:4.11.0-1.el7_2 will be updated
---> Package nspr.x86_64 0:4.13.1-1.0.el7_3 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================

==================================================================
 Package                            Arch                                 Version                      

                  Repository                                Size
======================================================================================================

==================================================================
Updating:
 nspr                               x86_64                               4.13.1-1.0.el7_3             

                  ol7_latest                               126 k

Transaction Summary
======================================================================================================

==================================================================
Upgrade  1 Package

Total size: 126 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : nspr-4.13.1-1.0.el7_3.x86_64                                                           

                                                             1/2
  Cleanup    : nspr-4.11.0-1.el7_2.x86_64                                                             

                                                             2/2
  Verifying  : nspr-4.13.1-1.0.el7_3.x86_64                                                           

                                                             1/2
  Verifying  : nspr-4.11.0-1.el7_2.x86_64                                                             

                                                             2/2

Updated:
  nspr.x86_64 0:4.13.1-1.0.el7_3

Complete!

now you can run yum install oracle-ebs-server-R12-preinstall

Friday, December 16, 2016

EBS R12.1.3 Cloning(Hot backup with RMAN)

EBS R12.1.3 Cloning(Hot backup with RMAN)


Source System


[oracle@oraapp VIS_oraapp]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.99.155 oraapp.nitin oraapp
192.168.99.127 oraapp-clone.nitin oraapp-clone
[oracle@oraapp VIS_oraapp]$

Application

Database

Target Details(after Cloning)



[oracle@rmanDEV Desktop]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.99.111 rmanDEV.nitin rmanDEV


[oracle@rmanDEV Desktop]$
















Application




Database




















Concurrent Managers






Cloning Process

on Source

DBTier

  • go to oracle home -- appsutil -- scripts--context name directory

[oracle@OraApps PROD_oraapps]$ pwd

/oracle/PROD/db/tech_st/11.1.0/appsutil/scripts/PROD_oraapps

[oracle@OraApps PROD_oraapps]$ ls
adautocfg.sh addbctl.sh adexecsql.pl adpreclone.pl adstrtdb.sql
adchknls.pl addlnctl.sh adlsnodes.sh adstopdb.sql

run " adpreclone.pl dbTier " script

[oracle@OraApps PROD_oraapps]$ perl adpreclone.pl dbTier

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adpreclone Version 120.20.12010000.2

Enter the APPS User Password:
Running:
perl /oracle/PROD/db/tech_st/11.1.0/appsutil/bin/adclone.pl java=/oracle/PROD/db/tech_st/11.1.0/appsutil/jre mode=stage stage=/oracle/PROD/db/tech_st/11.1.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_oraapps.xml showProgress
APPS Password :

Beginning database tier Stage - Fri Dec 2 10:41:32 2016

/oracle/PROD/db/tech_st/11.1.0/appsutil/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oracle/PROD/db/tech_st/11.1.0/oui -classpath /oracle/PROD/db/tech_st/11.1.0/lib/xmlparserv2.jar:/oracle/PROD/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/oracle/PROD/db/tech_st/11.1.0/appsutil/java:/oracle/PROD/db/tech_st/11.1.0/oui/jlib/OraInstaller.jar:/oracle/PROD/db/tech_st/11.1.0/oui/jlib/ewt3.jar:/oracle/PROD/db/tech_st/11.1.0/oui/jlib/share.jar:/oracle/PROD/db/tech_st/11.1.0/oui/jlib/srvm.jar:/oracle/PROD/db/tech_st/11.1.0/jlib/ojmisc.jar oracle.apps.ad.clone.StageDBTier -e /oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_oraapps.xml -stage /oracle/PROD/db/tech_st/11.1.0/appsutil/clone -tmp /tmp -method CUSTOM -showProgress
APPS Password :
Log file located at /oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_oraapps/StageDBTier_12021041.log

/ 50% completed

Completed Stage...
Fri Dec 2 10:41:46 2016

On application Tier


  • Now run similar scripts on Apps server.

[oracle@OraApps PROD_oraapps]$ cd /oracle/PROD/apps/apps_st/appl/

source Apps server env. file

[oracle@OraApps appl]$ . ./APPSPROD_oraapps.env

cd /oracle/PROD/inst/apps/PROD_oraapps/admin/scripts or CD
$ADMIN_SCRIPTS_HOME

  • and run perl " adpreclone.pl appsTier "

[oracle@OraApps scripts]$ pwd
/oracle/PROD/inst/apps/PROD_oraapps/admin/scripts
[oracle@OraApps scripts]$ ls
adalnctl.sh adautocfg.sh adexecsql.pl adformsrvctl.sh adoafmctl.sh adpreclone.pl adstrtal.sh ieo jtffmctl.sh mwactl.sh
adapcctl.sh adcmctl.sh adformsctl.sh adoacorectl.sh adopmnctl.sh adstpall.sh gsmstart.sh java.sh msc mwactlwrpr.sh
[oracle@OraApps scripts]$



[oracle@OraApps scripts]$ perl adpreclone.pl appsTier

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adpreclone Version 120.20.12010000.2

Running:
perl /oracle/PROD/apps/apps_st/appl/ad/12.0.0/bin/adclone.pl java=/oracle/PROD/apps/tech_st/10.1.3/appsutil/jdk mode=stage stage=/oracle/PROD/apps/apps_st/comn/clone component=appsTier method= appctx=/oracle/PROD/inst/apps/PROD_oraapps/appl/admin/PROD_oraapps.xml showProgress
APPS Password :
method defaulted to CUSTOM


Beginning application tier Stage - Fri Dec 2 10:47:10 2016

/oracle/PROD/apps/tech_st/10.1.3/appsutil/jdk/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath /oracle/PROD/apps/tech_st/10.1.3/lib/xmlparserv2.jar:/oracle/PROD/apps/tech_st/10.1.3/jdbc/lib/ojdbc14.jar:/oracle/PROD/apps/apps_st/comn/java/classes:/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/OraInstaller.jar:/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/ewt3.jar:/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/share.jar:/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/srvm.jar:/oracle/PROD/apps/tech_st/10.1.3/jlib/ojmisc.jar oracle.apps.ad.clone.StageAppsTier -e /oracle/PROD/inst/apps/PROD_oraapps/appl/admin/PROD_oraapps.xml -stage /oracle/PROD/apps/apps_st/comn/clone -tmp /tmp -method CUSTOM -showProgress

Log file located at /oracle/PROD/inst/apps/PROD_oraapps/admin/log/StageAppsTier_12021047.log

/ 80% completed

Completed Stage...
Fri Dec 2 10:47:26 2016
[oracle@OraApps scripts]$

  • Now go to $ORACLE_HOME/bin on DB Tier

  • and connect to RMAN with below command. In below command destination of backup can be according to your choice after format

[oracle@OraApps PROD_oraapps]$ rman target /

Recovery Manager: Release 11.1.0.7.0 - Production on Sun Dec 4 05:55:22 2016

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: PROD (DBID=341266391)

RMAN>

RUN {
configure controlfile autobackup on;
allocate channel c1 type disk;
backup AS COMPRESSED BACKUPSET full database plus archivelog format '/oracle/db_%t_%s.bkp';
}

  • once the backup is done. Issue below commands for later use.
  • go to $ORACLE_HOME/bin

[oracle@OraApps PROD_oraapps]$ sqlplsus / as sysdba

SQL> select file_id, file_name from dba_data_files ORDER by 1;

  • copy the output to excel

  • Excel Formula--change the Datafile location where you want to be in Target.

  • set newname for datafile =E5& " "&I5&" "& "to " &"'"&H5&"' ;" /oracle/DEV/db/apps_st/data/sys1.dbf

  • I made changes from VIS to DEV only, rest was same in my environment .

From

'/oracle/VIS/db/apps_st/data/sys1.dbf' ;

To

'/oracle/DEV/db/apps_st/data/sys1.dbf' ;



  • once done, put it in script as below and save it with a proper name

run
{
set newname for datafile 1 to '/oracle/DEV/db/apps_st/data/sys1.dbf' ;
set newname for datafile 2 to '/oracle/DEV/db/apps_st/data/tx_data11.dbf' ;
set newname for datafile 3 to '/oracle/DEV/db/apps_st/data/tx_idx11.dbf' ;
set newname for datafile 4 to '/oracle/DEV/db/apps_st/data/undotbs_01.dbf' ;
set newname for datafile 5 to '/oracle/DEV/db/apps_st/data/nologging3.dbf' ;
set newname for datafile 6 to '/oracle/DEV/db/apps_st/data/ctx1.dbf' ;
set newname for datafile 7 to '/oracle/DEV/db/apps_st/data/reference3.dbf' ;
set newname for datafile 8 to '/oracle/DEV/db/apps_st/data/dw_reference_tbs.dbf' ;
set newname for datafile 9 to '/oracle/DEV/db/apps_st/data/dw_reference_idx.dbf' ;
set newname for datafile 10 to '/oracle/DEV/db/apps_st/data/dw_lookup_tbs.dbf' ;
set newname for datafile 11 to '/oracle/DEV/db/apps_st/data/tx_data53.dbf' ;
set newname for datafile 12 to '/oracle/DEV/db/apps_st/data/owa1.dbf' ;
set newname for datafile 13 to '/oracle/DEV/db/apps_st/data/sys2.dbf' ;
set newname for datafile 14 to '/oracle/DEV/db/apps_st/data/sys3.dbf' ;
set newname for datafile 15 to '/oracle/DEV/db/apps_st/data/sys4.dbf' ;
set newname for datafile 16 to '/oracle/DEV/db/apps_st/data/sys5.dbf' ;
set newname for datafile 17 to '/oracle/DEV/db/apps_st/data/sys6.dbf' ;
set newname for datafile 18 to '/oracle/DEV/db/apps_st/data/disco1.dbf' ;
set newname for datafile 19 to '/oracle/DEV/db/apps_st/data/summary4.dbf' ;
set newname for datafile 20 to '/oracle/DEV/db/apps_st/data/apps_ts_interface.dbf' ;
set newname for datafile 21 to '/oracle/DEV/db/apps_st/data/summary5.dbf' ;
set newname for datafile 22 to '/oracle/DEV/db/apps_st/data/tx_data12.dbf' ;
set newname for datafile 23 to '/oracle/DEV/db/apps_st/data/summary7.dbf' ;
set newname for datafile 24 to '/oracle/DEV/db/apps_st/data/tx_idx12.dbf' ;
set newname for datafile 25 to '/oracle/DEV/db/apps_st/data/apps_ts_interface1.dbf' ;
set newname for datafile 26 to '/oracle/DEV/db/apps_st/data/tx_data13.dbf' ;
set newname for datafile 27 to '/oracle/DEV/db/apps_st/data/tx_idx13.dbf' ;
set newname for datafile 28 to '/oracle/DEV/db/apps_st/data/apps_ts_interface2.dbf' ;
set newname for datafile 29 to '/oracle/DEV/db/apps_st/data/queues2.dbf' ;
set newname for datafile 30 to '/oracle/DEV/db/apps_st/data/reference2.dbf' ;
set newname for datafile 31 to '/oracle/DEV/db/apps_st/data/cwmlite01.dbf' ;
set newname for datafile 32 to '/oracle/DEV/db/apps_st/data/sys8.dbf' ;
set newname for datafile 33 to '/oracle/DEV/db/apps_st/data/tx_idx14.dbf' ;
set newname for datafile 34 to '/oracle/DEV/db/apps_st/data/tx_data14.dbf' ;
set newname for datafile 35 to '/oracle/DEV/db/apps_st/data/tx_data15.dbf' ;
set newname for datafile 36 to '/oracle/DEV/db/apps_st/data/mobile01.dbf' ;
set newname for datafile 37 to '/oracle/DEV/db/apps_st/data/tx_data1.dbf' ;
set newname for datafile 38 to '/oracle/DEV/db/apps_st/data/odm.dbf' ;
set newname for datafile 39 to '/oracle/DEV/db/apps_st/data/tx_idx15.dbf' ;
set newname for datafile 40 to '/oracle/DEV/db/apps_st/data/tx_data16.dbf' ;
set newname for datafile 41 to '/oracle/DEV/db/apps_st/data/tx_data27.dbf' ;
set newname for datafile 42 to '/oracle/DEV/db/apps_st/data/tx_data17.dbf' ;
set newname for datafile 43 to '/oracle/DEV/db/apps_st/data/sys7.dbf' ;
set newname for datafile 44 to '/oracle/DEV/db/apps_st/data/tx_idx1.dbf' ;
set newname for datafile 45 to '/oracle/DEV/db/apps_st/data/reference1.dbf' ;
set newname for datafile 46 to '/oracle/DEV/db/apps_st/data/tx_data18.dbf' ;
set newname for datafile 47 to '/oracle/DEV/db/apps_st/data/summary1.dbf' ;
set newname for datafile 48 to '/oracle/DEV/db/apps_st/data/nologging1.dbf' ;
set newname for datafile 49 to '/oracle/DEV/db/apps_st/data/archive1.dbf' ;
set newname for datafile 50 to '/oracle/DEV/db/apps_st/data/media1.dbf' ;
set newname for datafile 51 to '/oracle/DEV/db/apps_st/data/queues1.dbf' ;
set newname for datafile 52 to '/oracle/DEV/db/apps_st/data/tx_data2.dbf' ;
set newname for datafile 53 to '/oracle/DEV/db/apps_st/data/tx_data3.dbf' ;
set newname for datafile 54 to '/oracle/DEV/db/apps_st/data/tx_data4.dbf' ;
set newname for datafile 55 to '/oracle/DEV/db/apps_st/data/tx_data5.dbf' ;
set newname for datafile 56 to '/oracle/DEV/db/apps_st/data/tx_data6.dbf' ;
set newname for datafile 57 to '/oracle/DEV/db/apps_st/data/tx_data7.dbf' ;
set newname for datafile 58 to '/oracle/DEV/db/apps_st/data/tx_data8.dbf' ;
set newname for datafile 59 to '/oracle/DEV/db/apps_st/data/tx_idx2.dbf' ;
set newname for datafile 60 to '/oracle/DEV/db/apps_st/data/tx_idx3.dbf' ;
set newname for datafile 61 to '/oracle/DEV/db/apps_st/data/tx_idx4.dbf' ;
set newname for datafile 62 to '/oracle/DEV/db/apps_st/data/tx_idx5.dbf' ;
set newname for datafile 63 to '/oracle/DEV/db/apps_st/data/tx_idx6.dbf' ;
set newname for datafile 64 to '/oracle/DEV/db/apps_st/data/summary8.dbf' ;
set newname for datafile 65 to '/oracle/DEV/db/apps_st/data/media2.dbf' ;
set newname for datafile 66 to '/oracle/DEV/db/apps_st/data/summary2.dbf' ;
set newname for datafile 67 to '/oracle/DEV/db/apps_st/data/tx_idx7.dbf' ;
set newname for datafile 68 to '/oracle/DEV/db/apps_st/data/tx_data9.dbf' ;
set newname for datafile 69 to '/oracle/DEV/db/apps_st/data/summary3.dbf' ;
set newname for datafile 70 to '/oracle/DEV/db/apps_st/data/tx_idx8.dbf' ;
set newname for datafile 71 to '/oracle/DEV/db/apps_st/data/tx_idx9.dbf' ;
set newname for datafile 72 to '/oracle/DEV/db/apps_st/data/tx_data10.dbf' ;
set newname for datafile 73 to '/oracle/DEV/db/apps_st/data/tx_idx10.dbf' ;
set newname for datafile 74 to '/oracle/DEV/db/apps_st/data/media3.dbf' ;
set newname for datafile 75 to '/oracle/DEV/db/apps_st/data/tx_data19.dbf' ;
set newname for datafile 76 to '/oracle/DEV/db/apps_st/data/summary6.dbf' ;
set newname for datafile 77 to '/oracle/DEV/db/apps_st/data/tx_data20.dbf' ;
set newname for datafile 78 to '/oracle/DEV/db/apps_st/data/tx_data21.dbf' ;
set newname for datafile 79 to '/oracle/DEV/db/apps_st/data/tx_data22.dbf' ;
set newname for datafile 80 to '/oracle/DEV/db/apps_st/data/tx_idx16.dbf' ;
set newname for datafile 81 to '/oracle/DEV/db/apps_st/data/apps_calclip3.dbf' ;
set newname for datafile 82 to '/oracle/DEV/db/apps_st/data/apps_calclip2.dbf' ;
set newname for datafile 83 to '/oracle/DEV/db/apps_st/data/apps_calclip1.dbf' ;
set newname for datafile 84 to '/oracle/DEV/db/apps_st/data/apps_calclip.dbf' ;
set newname for datafile 85 to '/oracle/DEV/db/apps_st/data/tx_idx17.dbf' ;
set newname for datafile 86 to '/oracle/DEV/db/apps_st/data/tx_data23.dbf' ;
set newname for datafile 87 to '/oracle/DEV/db/apps_st/data/apps_ts_interface3.dbf' ;
set newname for datafile 88 to '/oracle/DEV/db/apps_st/data/tx_data24.dbf' ;
set newname for datafile 89 to '/oracle/DEV/db/apps_st/data/tx_data25.dbf' ;
set newname for datafile 90 to '/oracle/DEV/db/apps_st/data/tx_data26.dbf' ;
set newname for datafile 91 to '/oracle/DEV/db/apps_st/data/htmldb.dbf' ;
set newname for datafile 92 to '/oracle/DEV/db/apps_st/data/apps_ts_interface4.dbf' ;
set newname for datafile 93 to '/oracle/DEV/db/apps_st/data/apps_ts_interface5.dbf' ;
set newname for datafile 94 to '/oracle/DEV/db/apps_st/data/apps_ts_interface10.dbf' ;
set newname for datafile 95 to '/oracle/DEV/db/apps_st/data/media7.dbf' ;
set newname for datafile 96 to '/oracle/DEV/db/apps_st/data/tx_data43.dbf' ;
set newname for datafile 97 to '/oracle/DEV/db/apps_st/data/tx_data44.dbf' ;
set newname for datafile 98 to '/oracle/DEV/db/apps_st/data/tx_data45.dbf' ;
set newname for datafile 99 to '/oracle/DEV/db/apps_st/data/summary10.dbf' ;
set newname for datafile 100 to '/oracle/DEV/db/apps_st/data/summary11.dbf' ;
set newname for datafile 101 to '/oracle/DEV/db/apps_st/data/opmor01.dbf' ;
set newname for datafile 102 to '/oracle/DEV/db/apps_st/data/apps_ts_interface6.dbf' ;
set newname for datafile 103 to '/oracle/DEV/db/apps_st/data/summary9.dbf' ;
set newname for datafile 104 to '/oracle/DEV/db/apps_st/data/apps_ts_interface7.dbf' ;
set newname for datafile 105 to '/oracle/DEV/db/apps_st/data/omo1.dbf' ;
set newname for datafile 106 to '/oracle/DEV/db/apps_st/data/apps_ts_interface8.dbf' ;
set newname for datafile 107 to '/oracle/DEV/db/apps_st/data/dcm1.dbf' ;
set newname for datafile 108 to '/oracle/DEV/db/apps_st/data/opre01.dbf' ;
set newname for datafile 109 to '/oracle/DEV/db/apps_st/data/opmtr01.dbf' ;
set newname for datafile 110 to '/oracle/DEV/db/apps_st/data/apps_ts_interface11.dbf' ;
set newname for datafile 111 to '/oracle/DEV/db/apps_st/data/tx_data30.dbf' ;
set newname for datafile 112 to '/oracle/DEV/db/apps_st/data/apps_ts_interface12.dbf' ;
set newname for datafile 113 to '/oracle/DEV/db/apps_st/data/apps_ts_interface13.dbf' ;
set newname for datafile 114 to '/oracle/DEV/db/apps_st/data/apps_ts_interface14.dbf' ;
set newname for datafile 115 to '/oracle/DEV/db/apps_st/data/tx_idx18.dbf' ;
set newname for datafile 116 to '/oracle/DEV/db/apps_st/data/apps_ts_interface15.dbf' ;
set newname for datafile 117 to '/oracle/DEV/db/apps_st/data/tx_data31.dbf' ;
set newname for datafile 118 to '/oracle/DEV/db/apps_st/data/tx_data32.dbf' ;
set newname for datafile 119 to '/oracle/DEV/db/apps_st/data/tx_data33.dbf' ;
set newname for datafile 120 to '/oracle/DEV/db/apps_st/data/tx_data34.dbf' ;
set newname for datafile 121 to '/oracle/DEV/db/apps_st/data/summary12.dbf' ;
set newname for datafile 122 to '/oracle/DEV/db/apps_st/data/tx_data35.dbf' ;
set newname for datafile 123 to '/oracle/DEV/db/apps_st/data/tx_data36.dbf' ;
set newname for datafile 124 to '/oracle/DEV/db/apps_st/data/tx_data37.dbf' ;
set newname for datafile 125 to '/oracle/DEV/db/apps_st/data/media4.dbf' ;
set newname for datafile 126 to '/oracle/DEV/db/apps_st/data/apps_ts_interface16.dbf' ;
set newname for datafile 127 to '/oracle/DEV/db/apps_st/data/media5.dbf' ;
set newname for datafile 128 to '/oracle/DEV/db/apps_st/data/tx_idx19.dbf' ;
set newname for datafile 129 to '/oracle/DEV/db/apps_st/data/apps_ts_interface17.dbf' ;
set newname for datafile 130 to '/oracle/DEV/db/apps_st/data/apps_ts_interface18.dbf' ;
set newname for datafile 131 to '/oracle/DEV/db/apps_st/data/apps_ts_interface19.dbf' ;
set newname for datafile 132 to '/oracle/DEV/db/apps_st/data/summary13.dbf' ;
set newname for datafile 133 to '/oracle/DEV/db/apps_st/data/tx_idx20.dbf' ;
set newname for datafile 134 to '/oracle/DEV/db/apps_st/data/apps_ts_interface20.dbf' ;
set newname for datafile 135 to '/oracle/DEV/db/apps_st/data/tx_data38.dbf' ;
set newname for datafile 136 to '/oracle/DEV/db/apps_st/data/tx_data39.dbf' ;
set newname for datafile 137 to '/oracle/DEV/db/apps_st/data/tx_data40.dbf' ;
set newname for datafile 138 to '/oracle/DEV/db/apps_st/data/tx_data28.dbf' ;
set newname for datafile 139 to '/oracle/DEV/db/apps_st/data/tx_data29.dbf' ;
set newname for datafile 140 to '/oracle/DEV/db/apps_st/data/tx_data41.dbf' ;
set newname for datafile 141 to '/oracle/DEV/db/apps_st/data/tx_data42.dbf' ;
set newname for datafile 142 to '/oracle/DEV/db/apps_st/data/apps_ts_interface21.dbf' ;
set newname for datafile 143 to '/oracle/DEV/db/apps_st/data/apps_ts_interface9.dbf' ;
set newname for datafile 144 to '/oracle/DEV/db/apps_st/data/apps_ts_interface22.dbf' ;
set newname for datafile 145 to '/oracle/DEV/db/apps_st/data/tx_idx21.dbf' ;
set newname for datafile 146 to '/oracle/DEV/db/apps_st/data/tx_data46.dbf' ;
set newname for datafile 147 to '/oracle/DEV/db/apps_st/data/tx_data47.dbf' ;
set newname for datafile 148 to '/oracle/DEV/db/apps_st/data/tx_data48.dbf' ;
set newname for datafile 149 to '/oracle/DEV/db/apps_st/data/tx_data49.dbf' ;
set newname for datafile 150 to '/oracle/DEV/db/apps_st/data/tx_idx22.dbf' ;
set newname for datafile 151 to '/oracle/DEV/db/apps_st/data/apps_ts_interface23.dbf' ;
set newname for datafile 152 to '/oracle/DEV/db/apps_st/data/sys9.dbf' ;
set newname for datafile 153 to '/oracle/DEV/db/apps_st/data/tx_data50.dbf' ;
set newname for datafile 154 to '/oracle/DEV/db/apps_st/data/sysaux01.dbf' ;
set newname for datafile 155 to '/oracle/DEV/db/apps_st/data/dw_base_tbs.dbf' ;
set newname for datafile 156 to '/oracle/DEV/db/apps_st/data/dw_base_idx.dbf' ;
set newname for datafile 157 to '/oracle/DEV/db/apps_st/data/dw_derived_tbs.dbf' ;
set newname for datafile 158 to '/oracle/DEV/db/apps_st/data/dw_derived_idx.dbf' ;
set newname for datafile 159 to '/oracle/DEV/db/apps_st/data/ias_meta01.dbf' ;
set newname for datafile 160 to '/oracle/DEV/db/apps_st/data/discopltm1.dbf' ;
set newname for datafile 161 to '/oracle/DEV/db/apps_st/data/discopltc1.dbf' ;
set newname for datafile 162 to '/oracle/DEV/db/apps_st/data/dcm.dbf' ;
set newname for datafile 163 to '/oracle/DEV/db/apps_st/data/oss_sys01.dbf' ;
set newname for datafile 164 to '/oracle/DEV/db/apps_st/data/wcrsys01.dbf' ;
set newname for datafile 165 to '/oracle/DEV/db/apps_st/data/b2b_rt.dbf' ;
set newname for datafile 166 to '/oracle/DEV/db/apps_st/data/b2b_dt.dbf' ;
set newname for datafile 167 to '/oracle/DEV/db/apps_st/data/b2b_idx.dbf' ;
set newname for datafile 168 to '/oracle/DEV/db/apps_st/data/b2b_lob.dbf' ;
set newname for datafile 169 to '/oracle/DEV/db/apps_st/data/orabpel.dbf' ;
set newname for datafile 170 to '/oracle/DEV/db/apps_st/data/bam.dbf' ;
set newname for datafile 171 to '/oracle/DEV/db/apps_st/data/oca.dbf' ;
set newname for datafile 172 to '/oracle/DEV/db/apps_st/data/uddisys01.dbf' ;
set newname for datafile 173 to '/oracle/DEV/db/apps_st/data/attrs1_oid.dbf' ;
set newname for datafile 174 to '/oracle/DEV/db/apps_st/data/battrs1_oid.dbf' ;
set newname for datafile 175 to '/oracle/DEV/db/apps_st/data/gcats1_oid.dbf' ;
set newname for datafile 176 to '/oracle/DEV/db/apps_st/data/gdefault1_oid.dbf' ;
set newname for datafile 177 to '/oracle/DEV/db/apps_st/data/svrmg1_oid.dbf' ;
set newname for datafile 178 to '/oracle/DEV/db/apps_st/data/sys10.dbf' ;
set newname for datafile 179 to '/oracle/DEV/db/apps_st/data/tx_idx23.dbf' ;
set newname for datafile 180 to '/oracle/DEV/db/apps_st/data/apps_ts_interface24.dbf' ;
set newname for datafile 181 to '/oracle/DEV/db/apps_st/data/tx_data51.dbf' ;
set newname for datafile 182 to '/oracle/DEV/db/apps_st/data/apps_ts_interface25.dbf' ;
set newname for datafile 183 to '/oracle/DEV/db/apps_st/data/tx_data52.dbf' ;
set newname for datafile 184 to '/oracle/DEV/db/apps_st/data/apps_ts_interface26.dbf' ;
set newname for datafile 185 to '/oracle/DEV/db/apps_st/data/media6.dbf' ;
set newname for datafile 186 to '/oracle/DEV/db/apps_st/data/apps_ts_spatial.dbf' ;
set newname for datafile 187 to '/oracle/DEV/db/apps_st/data/tx_idx24.dbf' ;
set newname for datafile 188 to '/oracle/DEV/db/apps_st/data/xdb01.dbf' ;
set newname for datafile 189 to '/oracle/DEV/db/apps_st/data/disco_drake1.dbf' ;
set newname for datafile 190 to '/oracle/DEV/db/apps_st/data/dw_aggregate_tbs.dbf' ;
set newname for datafile 191 to '/oracle/DEV/db/apps_st/data/geor_tbs02.dbf' ;
set newname for datafile 192 to '/oracle/DEV/db/apps_st/data/cwmlite02.dbf' ;
set newname for datafile 193 to '/oracle/DEV/db/apps_st/data/dw_aggregate_idx.dbf' ;
set newname for datafile 194 to '/oracle/DEV/db/apps_st/data/dw_mvlog_tbs.dbf' ;
set newname for datafile 195 to '/oracle/DEV/db/apps_st/data/dw_dm_tbs.dbf' ;
set newname for datafile 196 to '/oracle/DEV/db/apps_st/data/bia_rtl.dbf' ;
set newname for datafile 197 to '/oracle/DEV/db/apps_st/data/undotbs_02.dbf' ;
set newname for datafile 198 to '/oracle/DEV/db/apps_st/data/htmldb01.dbf' ;
set newname for datafile 199 to '/oracle/DEV/db/apps_st/data/data01.dbf' ;
set newname for datafile 200 to '/oracle/DEV/db/apps_st/data/data02.dbf' ;
set newname for datafile 201 to '/oracle/DEV/db/apps_st/data/data03.dbf' ;
set newname for datafile 202 to '/oracle/DEV/db/apps_st/data/data04.dbf' ;
set newname for datafile 203 to '/oracle/DEV/db/apps_st/data/data06.dbf' ;
set newname for datafile 204 to '/oracle/DEV/db/apps_st/data/APPS_TS_TX_DATA.dbf' ;
set newname for datafile 205 to '/oracle/DEV/db/apps_st/data/IAS_META02.dbf' ;
set newname for datafile 206 to '/oracle/DEV/db/apps_st/data/DEMANTRA02.dbf' ;
set newname for datafile 207 to '/oracle/DEV/db/apps_st/data/olap_baad01.dbf' ;
set newname for datafile 208 to '/oracle/DEV/db/apps_st/data/olap_baad02.dbf' ;
set newname for datafile 209 to '/oracle/DEV/db/apps_st/data/olap_baad03.dbf' ;
set newname for datafile 210 to '/oracle/DEV/db/apps_st/data/demantra01.dbf' ;
set newname for datafile 211 to '/oracle/DEV/db/apps_st/data/ts_dp.dbf' ;
set newname for datafile 212 to '/oracle/DEV/db/apps_st/data/ts_sales_data.dbf' ;
set newname for datafile 213 to '/oracle/DEV/db/apps_st/data/ts_sales_data_x.dbf' ;
set newname for datafile 214 to '/oracle/DEV/db/apps_st/data/ts_sim.dbf' ;
set newname for datafile 215 to '/oracle/DEV/db/apps_st/data/ts_sim_x.dbf' ;
set newname for datafile 216 to '/oracle/DEV/db/apps_st/data/ts_sales_data_engine.dbf' ;
set newname for datafile 217 to '/oracle/DEV/db/apps_st/data/ts_sales_data_engine_x.dbf' ;
set newname for datafile 218 to '/oracle/DEV/db/apps_st/data/demantra02.dbf' ;
set newname for datafile 219 to '/oracle/DEV/db/apps_st/data/APPS_TS_TX_DATA02.dbf' ;
set newname for datafile 220 to '/oracle/DEV/db/apps_st/data/APPS_OMO02.dbf' ;
set newname for datafile 221 to '/oracle/DEV/db/apps_st/data/demantra03.dbf' ;
set newname for datafile 222 to '/oracle/DEV/db/apps_st/data/SYSTEM02.dbf' ;
set newname for datafile 223 to '/oracle/DEV/db/apps_st/data/summary14.dbf' ;
set newname for datafile 224 to '/oracle/DEV/db/apps_st/data/APPS_TS_QUEUES02.dbf' ;
set newname for datafile 225 to '/oracle/DEV/db/apps_st/data/APPS_TS_TX_IDX02.dbf' ;
set newname for datafile 226 to '/oracle/DEV/db/apps_st/data/APPS_TS_SUMMARY02.dbf' ;
set newname for datafile 227 to '/oracle/DEV/db/apps_st/data/APPS_TS_TX_DATA03.dbf' ;
set newname for datafile 228 to '/oracle/DEV/db/apps_st/data/SYSTEM01.dbf' ;
set newname for datafile 229 to '/oracle/DEV/db/apps_st/data/APPS_TS_TX_IDX01.dbf' ;
set newname for datafile 230 to '/oracle/DEV/db/apps_st/data/xdb03.dbf' ;
set newname for datafile 231 to '/oracle/DEV/db/apps_st/data/htmldb03.dbf' ;
set newname for datafile 292 to '/oracle/DEV/db/apps_st/data/nologging2.dbf' ;
set newname for datafile 294 to '/oracle/DEV/db/apps_st/data/rbs_mig01.dbf' ;
set newname for datafile 295 to '/oracle/DEV/db/apps_st/data/archive2.dbf' ;
set newname for datafile 296 to '/oracle/DEV/db/apps_st/data/archive3.dbf' ;
restore database;
switch datafile all;
}

  • My instance is VISION, so contains many datafiles.

  • Then on RMAN, issue below commands . Make note of below highlighted parts.


[oracle@oraapp 11.2.4]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Sat Dec 10 08:00:51 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: VIS (DBID=460664008)

RMAN> list backup of controlfile;

using target database control file instead of recovery catalog

List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 16.36M DISK 00:00:00 05-DEC-16
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20161205T074724
Piece Name: /oracle/VIS/db/tech_st/11.2.4/dbs/c-460664008-20161205-00
Control File Included: Ckp SCN: 10132141025206 Ckp time: 05-DEC-16

RMAN> list backup of archivelog all;

List of Backup Sets
===================

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
6 51.06M DISK 00:00:02 10-DEC-16
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20161210T102105
Piece Name: /oracle/VIS/db/tech_st/11.2.4/dbs/0arn41kh_1_1

List of Archived Logs in backup set 6
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 218 10132140978740 16-JUL-16 10132141021502 05-DEC-16
1 219 10132141021502 05-DEC-16 10132141021510 05-DEC-16
1 220 10132141021510 05-DEC-16 10132141021517 05-DEC-16
1 221 10132141021517 05-DEC-16 10132141054955 09-DEC-16
1 222 10132141054955 09-DEC-16 10132141062218 10-DEC-16

  • Now copy all the backups to the Target or a shared storage where Target have access.
  • In RMAN, we did a compressed backup. You can even tar it with below command and then copy it to target. But On Target don't forget to untar it.
  • Change the file name according to your environment.
  • Do a Database Home & Application file system backup

  • Db Home backup

tar -czvf db_home.tar /oracle/VIS/db/tech_st

  • application server backup

tar -czvf apps.tar /oracle/VIS/apps

  • RMAN backup is stored at

/oracle/ ----DB Backup
/oracle/VIS/db/tech_st/11.2.4/dbs ---Archive logs
/oracle/VIS/db/tech_st/11.2.4/dbs/c-460664008-20161205-00 ---Control file



  • all above files should be accessible on Targets

on Target System


untar db_home.tar

tar -xhzf db_home.tar -C /oracle/

  • after untar, make sure you've proper directory structure
  • For Database

[oracle@rmanDEV DEV_rmandev]$ ls -al /oracle/DEV/db/
total 16
drwxr-xr-x. 4 oracle dba 4096 Dec 10 06:48 .
drwxrwxr-x. 4 oracle dba 4096 Dec 10 06:41 ..
drwxr-xr-x. 3 oracle dba 4096 Dec 10 06:43 apps_st
drwxr-xr-x. 3 oracle dba 4096 May 19 2016 tech_st

  • for application

[oracle@rmanDEV DEV_rmandev]$ ls -al /oracle/DEV/apps/
total 16
drwxr-xr-x. 4 oracle dba 4096 Mar 19 2016 .
drwxrwxr-x. 4 oracle dba 4096 Dec 10 06:41 ..
drwxr-xr-x. 4 oracle dba 4096 Mar 19 2016 apps_st
drwxr-xr-x. 4 oracle dba 4096 Mar 19 2016 tech_st

  • On database Tier
  • open terminal and set below variables

export ORACLE_SID=DEV
export ORACLE_BASE=/oracle/
export ORACLE_HOME=/oracle/DEV/db/tech_st/11.2.4/
export PERL5LIB=$ORACLE_HOME/perl/lib/5.10.0:$ORACLE_HOME/perl/lib/site_perl/5.10.0
export PATH=$ORACLE_HOME/perl/bin:$PATH

  • then go to $ORACLE_HOME/appsutil/clone/bin directory and run adcfgclone.pl

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

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adcfgclone Version 120.31.12010000.8

Enter the APPS password :

Running:
/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/java:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/xmlparserv2.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_9671.lst -stage /oracle/DEV/db/tech_st/11.2.4/appsutil/clone -dbTechStack 2> /tmp/adcfgclone_9671.err; echo $? > /tmp/adcfgclone_9671.res

Log file located at /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/CloneContext_1210071712.log

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

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

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

Target System Database SID : DEV

Target System Base Directory : /oracle

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 [/oracle/VIS/db/apps_st/data] : /oracle/DEV/db/apps_st/data/

Target System RDBMS ORACLE_HOME Directory [/oracle/db/tech_st/11.1.0] : /oracle/DEV/db/tech_st/11.2.4/

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

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

Target System Port Pool [0-99] : 10

Checking the port pool 10
done: Port Pool 10 is free
Report file located at /oracle/DEV/db/tech_st/11.2.4//appsutil/temp/portpool.lst
Complete port information available at /oracle/DEV/db/tech_st/11.2.4//appsutil/temp/portpool.lst

Backing up /oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml to /oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml2.bak

Creating the new Database Context file from :
/oracle/DEV/db/tech_st/11.2.4/appsutil/template/adxdbctx.tmp

The new database context file has been created :
/oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml

Log file located at /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/CloneContext_1210071712.log
Check Clone Context logfile /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/CloneContext_1210071712.log for details.

Running Rapid Clone with command:
perl /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/adclone.pl java=/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/../jre mode=apply stage=/oracle/DEV/db/tech_st/11.2.4/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml showProgress contextValidated=true
Running:
perl /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/adclone.pl java=/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/../jre mode=apply stage=/oracle/DEV/db/tech_st/11.2.4/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml showProgress contextValidated=true
APPS Password :

Beginning rdbms home Apply - Sat Dec 10 07:18:19 2016

/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oracle/DEV/db/tech_st/11.2.4//oui -classpath /oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/xmlparserv2.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/ojdbc5.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/java:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/oui/OraInstaller.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/oui/ewt3.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/oui/share.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/oui/srvm.jar:/oracle/DEV/db/tech_st/11.2.4/appsutil/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyDBTechStack -e /oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml -stage /oracle/DEV/db/tech_st/11.2.4/appsutil/clone -showProgress
APPS Password : Log file located at /oracle/DEV/db/tech_st/11.2.4/appsutil/log/DEV_rmandev/ApplyDBTechStack_12100718.log
- 0% completed

Completed Apply...
Sat Dec 10 07:20:08 2016

Starting database listener for DEV:
Running:
/oracle/DEV/db/tech_st/11.2.4//appsutil/scripts/DEV_rmandev/addlnctl.sh start DEV
Logfile: /oracle/DEV/db/tech_st/11.2.4//appsutil/log/DEV_rmandev/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Starting listener process DEV ...


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 10-DEC-2016 07:20:08

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Starting /oracle/DEV/db/tech_st/11.2.4//bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /oracle/DEV/db/tech_st/11.2.4//network/admin/DEV_rmandev/listener.ora
Log messages written to /oracle/DEV/db/tech_st/11.2.4/admin/DEV_rmandev/diag/tnslsnr/rmanDEV/dev/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rmanDEV.nitin)(PORT=1531)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rmandev.nitin)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias DEV
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 10-DEC-2016 07:20:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/DEV/db/tech_st/11.2.4//network/admin/DEV_rmandev/listener.ora
Listener Log File /oracle/DEV/db/tech_st/11.2.4/admin/DEV_rmandev/diag/tnslsnr/rmanDEV/dev/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rmanDEV.nitin)(PORT=1531)))
Services Summary...
Service "DEV" has 1 instance(s).
Instance "DEV", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /oracle/DEV/db/tech_st/11.2.4//appsutil/log/DEV_rmandev/addlnctl.txt for more information ...

[oracle@rmanDEV bin]$



  • Now go to $ORACLE_HOM/dbs directory and make below changes to initDEV.ora filename
  • change db_name to VIS from DEV and change control_files to your Target location

[oracle@rmanDEV dbs]$ cp initDEV.ora initDEV.ora-original
[oracle@rmanDEV dbs]$ vi initDEV.ora

[oracle@rmanDEV bin]$


#########

#db_name = DEV
db_name = VIS
control_files = /oracle/DEV/db/apps_st/data//cntrl01.dbf,/oracle/DEV/db/apps_st/data//cntrl02.dbf,/oracle/DEV/db/apps_st/data//cntrl03.dbf

#########

  • Now start Database in nomount mode

oracle@rmanDEV Desktop]$ cd /oracle/DEV/db/tech_st/
[oracle@rmanDEV tech_st]$ ls
11.2.4
[oracle@rmanDEV tech_st]$ cd 11.2.4/
[oracle@rmanDEV 11.2.4]$ ls
adctxprv.sql cv jdbc oracore slax
adgrants.sql dbs jdev oraInst.loc sqldeveloper
admin dc_ocm jdk ord sqlj
apex deinstall jlib oui sqlpatch
appsutil demo jpub owb sqlplus
appsutil.zip DEV_rmandev.env ldap owm srvm
assistants diagnostics lib patches suptools
bin dv log perl sysman
ccr emcli md plsql timingframework
cdata EMStage mesg precomp ucp
cfgtoollogs has mgw racg uix
checkpoints hs network rdbms usm
clone ide nls relnotes utl
config install oc4j root.sh VIS_oraapp.env
crs instantclient odbc root.sh.old wwg
csmig inventory olap root.sh.old.1 xdk
css j2ee OPatch root.sh.ouibak
ctx javavm opmn scheduler
[oracle@rmanDEV 11.2.4]$ . ./DEV_rmandev.env
[oracle@rmanDEV 11.2.4]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 07:53:56 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount











  • now connect to rman
  • First Restore the controlfile from the backup we made from RMAN at source.
  • I kept all the backups at one location /media/sf_EBS_R12.1.3_DB_Rman_Backup/ “


[oracle@rmanDEV 11.2.4]$ rman target / nocatalog

Recovery Manager: Release 11.2.0.4.0 - Production on Sat Dec 10 07:55:22 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: VIS (not mounted)
using target database control file instead of recovery catalog

MAN> restore controlfile from '/media/sf_EBS_R12.1.3_DB_Rman_Backup/c-460664008-20161205-00';
Starting restore at 10-DEC-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oracle/DEV/db/apps_st/data/cntrl01.dbf
output file name=/oracle/DEV/db/apps_st/data/cntrl02.dbf
output file name=/oracle/DEV/db/apps_st/data/cntrl03.dbf
Finished restore at 10-DEC-16

  • Mount the database

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

  • now Catalog all the backups location

RMAN> catalog start with '/media/sf_EBS_R12.1.3_DB_Rman_Backup/';


Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /media/sf_EBS_R12.1.3_DB_Rman_Backup/c-460664008-20161205-00
File Name: /media/sf_EBS_R12.1.3_DB_Rman_Backup/db_929771189_5.bkp
File Name: /media/sf_EBS_R12.1.3_DB_Rman_Backup/db_929772647_6.bkp
File Name: /media/sf_EBS_R12.1.3_DB_Rman_Backup/db_929774252_7.bkp
File Name: /media/sf_EBS_R12.1.3_DB_Rman_Backup/db_929776368_8.bkps


  • Also do a catalog for your archivelog files.. In my case they were at $ORACLE_HOME/dbs Directory

RMAN> catalog start with '/oracle/DEV/db/tech_st/11.2.4/dbs/';

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/c-460664008-20161205-00
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/snapcf_VIS.f
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/arch1_220_906883592.dbf
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/arch1_219_906883592.dbf
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/arch1_221_906883592.dbf
File Name: /oracle/DEV/db/tech_st/11.2.4/dbs/arch1_218_906883592.dbf

  • Now continue with RMAN and execute the script we created above in excel with all the datafile names from source like below

run
{
set newname for datafile 1 to '/oracle/DEV/db/apps_st/data/sys1.dbf' ;
set newname for datafile 2 to '/oracle/DEV/db/apps_st/data/tx_data11.dbf' ;
set newname for datafile 3 to '/oracle/DEV/db/apps_st/data/tx_idx11.dbf' ;

  • and run the script in RMAN

RMAN>@/home/oracle/Desktop/dbfiles_rman_script.sql

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

.
.
.
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /oracle/DEV/db/apps_st/data/nologging3.dbf
channel ORA_DISK_1: restoring datafile 00008 to /oracle/DEV/db/apps_st/data/dw_reference_tbs.dbf
channel ORA_DISK_1: restoring datafile 00010 to /oracle/DEV/db/apps_st/data/dw_lookup_tbs.dbf
channel ORA_DISK_1: restoring datafile 00013 to /oracle/DEV/db/apps_st/data/sys2.dbf
channel ORA_DISK_1: restoring datafile 00019 to /oracle/DEV/db/apps_st/data/summary4.dbf
channel ORA_DISK_1: restoring datafile 00020 to /oracle/DEV/db/apps_st/data/apps_ts_interface.dbf
channel ORA_DISK_1: restoring datafile 00022 to /oracle/DEV/db/apps_st/data/tx_data12.dbf
channel ORA_DISK_1: restoring datafile 00026 to /oracle/DEV/db/apps_st/data/tx_data13.dbf
channel ORA_DISK_1: restoring datafile 00033 to /oracle/DEV/db/apps_st/data/tx_idx14.dbf
channel ORA_DISK_1: restoring datafile 00034 to /oracle/DEV/db/apps_st/data/tx_data14.dbf
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:18:16
Finished restore at 10-DEC-16
.
.
.
.
.
.
.
.
input datafile copy RECID=468 STAMP=930218467 file name=/oracle/DEV/db/apps_st/data/rbs_mig01.dbf
datafile 295 switched to datafile copy
input datafile copy RECID=469 STAMP=930218467 file name=/oracle/DEV/db/apps_st/data/archive2.dbf
datafile 296 switched to datafile copy
input datafile copy RECID=470 STAMP=930218467 file name=/oracle/DEV/db/apps_st/data/archive3.dbf

RMAN> **end-of-file**


  • Once the script is finished, run below script in RMAN
  • before running the script, Find the last Sequence No. from source .
  • See steps on Source system we did at the beginning and run below command.
  • you need to give last+1 sequnece no. in below script.
  • The command we did on source at the beginning was


RMAN> list backup of archivelog all;

List of Archived Logs in backup set 6
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 218 10132140978740 16-JUL-16 10132141021502 05-DEC-16
1 219 10132141021502 05-DEC-16 10132141021510 05-DEC-16
1 220 10132141021510 05-DEC-16 10132141021517 05-DEC-16
1 221 10132141021517 05-DEC-16 10132141054955 09-DEC-16
1 222 10132141054955 09-DEC-16 10132141062218 10-DEC-16

  • I found last sequence no. 222 in my case. It could be anything on yours.









  • Now runt the script as below

RMAN> RUN {
set until sequence 223 thread 1;
recover database;
};

executing command: SET until clause

Starting recover at 10-DEC-16
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 221 is already on disk as file /oracle/DEV/db/tech_st/11.2.4/dbs/arch1_221_906883592.dbf
archived log file name=/oracle/DEV/db/tech_st/11.2.4/dbs/arch1_221_906883592.dbf thread=1 sequence=221
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=222
channel ORA_DISK_1: reading from backup piece /media/sf_EBS_R12.1.3_DB_Rman_Backup/0arn41kh_1_1
channel ORA_DISK_1: piece handle=/media/sf_EBS_R12.1.3_DB_Rman_Backup/0arn41kh_1_1 tag=TAG20161210T102105
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/oracle/DEV/db/apps_st/data/archive/1_222_906883592.dbf thread=1 sequence=222
media recovery complete, elapsed time: 00:00:04
Finished recover at 10-DEC-16

  • The above script will take some time depending upon recovery needed to database.
  • Once the recovery is successfully finished, rename online redolog files

  • Rename online LOGFILES:

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/oracle/VIS/db/apps_st/data/log1.dbf
/oracle/VIS/db/apps_st/data/log2.dbf
/oracle/VIS/db/apps_st/data/log3.dbf

SQL> alter database rename file '/oracle/VIS/db/apps_st/data/log1.dbf' to '/oracle/DEV/db/apps_st/data/log1.dbf';

Database altered.

SQL> alter database rename file '/oracle/VIS/db/apps_st/data/log2.dbf' to '/oracle/DEV/db/apps_st/data/log2.dbf';

Database altered.

SQL> alter database rename file '/oracle/VIS/db/apps_st/data/log3.dbf' to '/oracle/DEV/db/apps_st/data/log3.dbf';

Database altered.

  • Now Open database using resetlogs:

SQL> alter database open resetlogs;

Database altered.

SQL>

  • Create New TEMP tablespace and drop old TEMP tablespace

SQL> create TEMPORARY TABLESPACE TEMP3 TEMPFILE '/oracle/DEV/db/apps_st/data/temp001.dbf' size 2048M;

Tablespace created.

SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp3;

Database altered.

SQL> drop tablespace temp1 including contents and datafiles;

Tablespace dropped.

SQL> drop tablespace temp2 including contents and datafiles;

Tablespace dropped.


  • Now shutdown the Database and mount it again, this is step is required to change Oracle db_name to DEV.
  • Remember we still using old DB_NAME VIS as made changes in initDEV.ora file
  • Now use nid tool to change DB_NAME to DEV to all controlfiles and Datafiles

oracle@rmanDEV appsutil]$ nid TARGET=SYS/indorama DBNAME=DEV

DBNEWID: Release 11.2.0.4.0 - Production on Sat Dec 10 11:26:00 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connected to database VIS (DBID=460664008)

Connected to server version 11.2.0

Control Files in database:
/oracle/DEV/db/apps_st/data/cntrl01.dbf
/oracle/DEV/db/apps_st/data/cntrl02.dbf
/oracle/DEV/db/apps_st/data/cntrl03.dbf

Change database ID and database name VIS to DEV? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 460664008 to 4008579785
Changing database name from VIS to DEV
Control File /oracle/DEV/db/apps_st/data/cntrl01.dbf - modified
Control File /oracle/DEV/db/apps_st/data/cntrl02.dbf - modified
Control File /oracle/DEV/db/apps_st/data/cntrl03.dbf - modified
Datafile /oracle/DEV/db/apps_st/data/sys1.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/tx_data11.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/tx_idx11.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/undotbs_01.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/nologging3.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/ctx1.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/reference3.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/dw_reference_tbs.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/dw_reference_idx.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/dw_lookup_tbs.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/tx_data53.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/owa1.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/sys2.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/sys3.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/sys4.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/sys5.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/sys6.db - dbid changed, wrote new name
Datafile /oracle/DEV/db/apps_st/data/disco1.db - dbid changed, wrote new name
.
.
.
Database name changed to DEV.
Modify parameter file and generate a new password file before restarting.
Database ID for database DEV changed to 4008579785.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.

[oracle@rmanDEV appsutil]$






  • Now change back DB_NAME parameter in initDEV.ora back to DEV from VIS

#
# There should be at least two control files, preferably three,
# located on different disks. The control files can dynamically grow,
# so allow at least 20M per file for growth.
#
#########

db_name = DEV
#db_name = VIS
control_files = /oracle/DEV/db/apps_st/data//cntrl01.dbf,/oracle/DEV/db/apps_st/data//cntrl02.dbf,/oracle/DEV/db/apps_st/data//cntrl03.dbf

#########


  • shutdown Database if not and mount again

SQL> shutdown immediate;
ORACLE instance shut down.
SQL> exit
Disconnected
[oracle@rmanDEV DEV_rmandev]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 11:30:32 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 427819912 bytes
Database Buffers 624951296 bytes
Redo Buffers 13905920 bytes
Database mounted.











  • Open database resetlogs again
  • see the Database DB_NAME and mode


SQL> alter database open resetlogs;

Database altered.

SQL> select open_mode, name from v$database;

OPEN_MODE NAME
-------------------- ---------
READ WRITE DEV

SQL> exit;

  • Now run autoconfig on DB Tier

go to $ORACLE_HOME/appsutil/scripts/DEV_rmandev/


[oracle@rmanDEV Desktop]$ cd /oracle/DEV/db/tech_st/11.2.4/appsutil/scripts/DEV_rmandev/
[oracle@rmanDEV DEV_rmandev]$ ls
adautocfg.sh addbctl.sh adexecsql.pl adpreclone.pl adstrtdb.sql
adchknls.pl addlnctl.sh adlsnodes.sh adstopdb.sql


[oracle@rmanDEV DEV_rmandev]$ adautocfg.sh
Enter the APPS user password:
The log file for this session is located at: /oracle/DEV/db/tech_st/11.2.4//appsutil/log/DEV_rmandev/12101134/adconfig.log

AutoConfig is configuring the Database environment...

AutoConfig will consider the custom templates if present.
Using ORACLE_HOME location : /oracle/DEV/db/tech_st/11.2.4/
Classpath : :/oracle/DEV/db/tech_st/11.2.4//jdbc/lib/ojdbc5.jar:/oracle/DEV/db/tech_st/11.2.4//appsutil/java/xmlparserv2.jar:/oracle/DEV/db/tech_st/11.2.4//appsutil/java:/oracle/DEV/db/tech_st/11.2.4//jlib/netcfg.jar:/oracle/DEV/db/tech_st/11.2.4//jlib/ldapjclnt11.jar

Using Context file : /oracle/DEV/db/tech_st/11.2.4/appsutil/DEV_rmandev.xml

Context Value Management will now update the Context file

Updating Context file...COMPLETED

Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.
[oracle@rmanDEV DEV_rmandev]$


=============Apps Tier Cloning============

  • Go to $COMMON_TOP/clone/bin directory and run perl adcfgclone.pl appsTier
  • Provide answers according to your environment
  • once the below script finishes successfully, it will ask to startup application


[oracle@rmanDEV bin]$ ls
adaddnode.pl adcfgclone.pl adchkutl.sh adclonectx.pl adclone.pl
[oracle@rmanDEV bin]$ pwd
/oracle/DEV/apps/apps_st/comn/clone/bin

[oracle@rmanDEV bin]$ perl adcfgclone.pl appsTier

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adcfgclone Version 120.31.12010000.8

Enter the APPS password :

Running:
/oracle/DEV/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /oracle/DEV/apps/apps_st/comn/clone/jlib/java:/oracle/DEV/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /oracle/DEV/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_7310.lst -stage /oracle/DEV/apps/apps_st/comn/clone 2> /tmp/adcfgclone_7310.err; echo $? > /tmp/adcfgclone_7310.res

Log file located at /oracle/DEV/apps/apps_st/comn/clone/bin/CloneContext_1210113757.log

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

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

Target System Database SID : DEV

Target System Database Server Node [rmandev] : rmandev

Target System Database Domain Name [nitin] : nitin

Target System Base Directory : /oracle

Target System Tools ORACLE_HOME Directory [/oracle/apps/tech_st/10.1.2] : /oracle/DEV/apps/tech_st/10.1.2

Target System Web ORACLE_HOME Directory [/oracle/apps/tech_st/10.1.3] : /oracle/DEV/apps/tech_st/10.1.3

Target System APPL_TOP Directory [/oracle/apps/apps_st/appl] : /oracle/DEV/apps/apps_st/appl

Target System COMMON_TOP Directory [/oracle/apps/apps_st/comn] : /oracle/DEV/apps/apps_st/comn

Target System Instance Home Directory [/oracle/inst] :

Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] :

Target System Other Services [disabled] :

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

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

Target System Port Pool [0-99] : 10

Checking the port pool 10
done: Port Pool 10 is free
Report file located at /oracle/inst/apps/DEV_rmandev/admin/out/portpool.lst
Complete port information available at /oracle/inst/apps/DEV_rmandev/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /oracle/DEV/db/tech_st/11.2.4//appsutil/outbound/DEV_rmandev
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 1

Creating the new APPL_TOP Context file from :
/oracle/DEV/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
/oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml

Log file located at /oracle/DEV/apps/apps_st/comn/clone/bin/CloneContext_1210113757.log
Check Clone Context logfile /oracle/DEV/apps/apps_st/comn/clone/bin/CloneContext_1210113757.log for details.

Running Rapid Clone with command:
perl /oracle/DEV/apps/apps_st/comn/clone/bin/adclone.pl java=/oracle/DEV/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/oracle/DEV/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml showProgress contextValidated=true
Running:
perl /oracle/DEV/apps/apps_st/comn/clone/bin/adclone.pl java=/oracle/DEV/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/oracle/DEV/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml showProgress contextValidated=true
APPS Password :

Beginning application tier Apply - Sat Dec 10 11:40:24 2016

/oracle/DEV/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /oracle/DEV/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/java:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/share.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyAppsTier -e /oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml -stage /oracle/DEV/apps/apps_st/comn/clone -showProgress
APPS Password : Log file located at /oracle/inst/apps/DEV_rmandev/admin/log/ApplyAppsTier_12101140.log
\ 0% completed
.
.
.
/oracle/DEV/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /oracle/DEV/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/java:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/share.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyAppsTier -e /oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml -stage /oracle/DEV/apps/apps_st/comn/clone -showProgress
APPS Password : Log file located at /oracle/inst/apps/DEV_rmandev/admin/log/ApplyAppsTier_12101140.log
/ 50% completed

.
.
.

oracle/DEV/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /oracle/DEV/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/java:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/share.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyAppsTier -e /oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml -stage /oracle/DEV/apps/apps_st/comn/clone -showProgress
APPS Password : Log file located at /oracle/inst/apps/DEV_rmandev/admin/log/ApplyAppsTier_12101140.log
| 53% completed

.
.
.

/oracle/DEV/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /oracle/DEV/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/java:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/share.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/oracle/DEV/apps/apps_st/comn/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyAppsTier -e /oracle/inst/apps/DEV_rmandev/appl/admin/DEV_rmandev.xml -stage /oracle/DEV/apps/apps_st/comn/clone -showProgress
APPS Password : Log file located at /oracle/inst/apps/DEV_rmandev/admin/log/ApplyAppsTier_12101140.log
- 88% completed

Completed Apply...
Sat Dec 10 11:48:09 2016

Do you want to startup the Application Services for DEV? (y/n) [y] : y

Starting application Services for DEV:
Running:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adstrtal.sh -nopromptmsg

You are running adstrtal.sh version 120.15.12010000.3

The logfile for this session is located at /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adstrtal.log
Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adopmnctl.sh start
script returned:
****************************************************

You are running adopmnctl.sh version 120.6.12010000.4

Starting Oracle Process Manager (OPMN) ...
opmnctl: opmn started.

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adopmnctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adalnctl.sh start
script returned:
****************************************************

adalnctl.sh version 120.3

Checking for FNDFS executable.
Starting listener process APPS_DEV.

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adalnctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adapcctl.sh start
script returned:
****************************************************

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: opmn is already running.
opmnctl: starting opmn managed processes...

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adapcctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adoacorectl.sh start
script returned:
****************************************************

You are running adoacorectl.sh version 120.13

Starting OPMN managed OACORE OC4J instance ...

adoacorectl.sh: exiting with status 0

adoacorectl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adoacorectl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adformsctl.sh start
script returned:
****************************************************

You are running adformsctl.sh version 120.16.12010000.3

Starting OPMN managed FORMS OC4J instance ...
Calling txkChkFormsDeployment.pl to check whether latest FORMSAPP.EAR is deployed...
Program : /oracle/DEV/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl started @ Sat Dec 10 11:48:54 2016

*** Log File = /oracle/inst/apps/DEV_rmandev/logs/appl/rgf/TXK/txkChkFormsDeployment_Sat_Dec_10_11_48_54_2016/txkChkFormsDeployment_Sat_Dec_10_11_48_54_2016.log

File "/oracle/DEV/apps/tech_st/10.1.3/j2ee/forms/applications/forms/formsweb/WEB-INF/lib/frmsrv.jar" exists. Proceeding to check the size...

=============================================
*** Latest formsapp.ear has been deployed ***
=============================================


Program : /oracle/DEV/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl completed @ Sat Dec 10 11:48:54 2016

Perl script txkChkFormsDeployment.pl got executed successfully



adformsctl.sh: exiting with status 0

adformsctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adformsctl.txt for more information ...


.end std out.
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /oracle/inst/apps/DEV_rmandev/logs/appl/rgf/TXK/txkChkFormsDeployment_Sat_Dec_10_11_48_54_2016/txkChkFormsDeployment_Sat_Dec_10_11_48_54_2016.log

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adoafmctl.sh start
script returned:
****************************************************

You are running adoafmctl.sh version 120.8

Starting OPMN managed OAFM OC4J instance ...

adoafmctl.sh: exiting with status 0

adoafmctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adoafmctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/adcmctl.sh start
script returned:
****************************************************

You are running adcmctl.sh version 120.17.12010000.5

Starting concurrent manager for DEV ...
Starting DEV_1210@DEV Internal Concurrent Manager
Default printer is noprint

adcmctl.sh: exiting with status 0


adcmctl.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adcmctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/oracle/inst/apps/DEV_rmandev/admin/scripts/jtffmctl.sh start
script returned:
****************************************************

You are running jtffmctl.sh version 120.3

Validating Fulfillment patch level via /oracle/DEV/apps/apps_st/comn/java/classes
Fulfillment patch level validated.
Starting Fulfillment Server for DEV on port 9310 ...

jtffmctl.sh: exiting with status 0


.end std out.

.end err out.

****************************************************


All enabled services for this node are started.

adstrtal.sh: Exiting with status 0

adstrtal.sh: check the logfile /oracle/inst/apps/DEV_rmandev/logs/appl/admin/log/adstrtal.log for more information ...











  • go to APPL_TOP and execute environment file
  • check the all the service are up and running

[oracle@rmanDEV appl]$ cd /oracle/DEV/apps/apps_st/appl

[oracle@rmanDEV appl]$ . ./DEV_rmandev.env
[oracle@rmanDEV appl]$ cd $INST_TOP
[oracle@rmanDEV DEV_rmandev]$ adopmnctl.sh status

You are running adopmnctl.sh version 120.6.12010000.4

Checking status of OPMN managed processes...

Processes in Instance: DEV_rmandev.rmandev.nitin
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 16513 | Alive
OC4JGroup:default_group | OC4J:forms | 16444 | Alive
OC4JGroup:default_group | OC4J:oacore | 16295 | Alive
HTTP_Server | HTTP_Server | 16239 | Alive


This Finishes RMAN Hot backup cloning.




























Errors Received.


  • On Database Tier while executing perl adcfgclone.pl dbTechStack
  • This error normally occurs when your doing a clone on fresh/new system

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>

[APPLY PHASE]
AutoConfig could not successfully execute the following scripts:
Directory: /oracle/DEV/db/tech_st/11.2.4/perl/bin/perl -I /oracle/DEV/db/tech_st/11.2.4/perl/lib/5.8.3 -I /oracle/DEV/db/tech_st/11.2.4/perl/lib/site_perl/5.8.3 -I /oracle/DEV/db/tech_st/11.2.4/appsutil/perl /oracle/DEV/db/tech_st/11.2.4/appsutil/clone
ouicli.pl INSTE8_APPLY 255


AutoConfig is exiting with status 1

RC-50013: Fatal: Instantiate driver did not complete successfully.
/oracle/DEV/db/tech_st/11.2.4//appsutil/driver/regclone.drv


======Solution

1) Copy OraInventory directory from oracle base directory (/oracle) from source to Target oracle base directory (/oracle) and remove the contents(subdirectories and files from it) from it

Set the environment before starting the process.

2) First as a root

[root@rmanDEV Desktop]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@rmanDEV Desktop]# xhost +
access control disabled, clients can connect from any host
[root@rmanDEV Desktop]# su - oracle
[oracle@rmanDEV ~]$ DISPLAY=:0.0; export DISPLAY

export ORACLE_SID=DEV
export ORACLE_BASE=/oracle/
export ORACLE_HOME=oracle/DEV/db/tech_st/11.2.4/
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/oracle/DEV/db/tech_st/11.2.4/lib



2)

Post apps Tier cloning, oracle kept old reference in FND_NODES tables. See below image.







===Solution

  • Shut down application server.
  • on DB tier connect as apps user and execute fnd_conc_clone.setup_clean and then enter commit;
  • Then run autoconfig on DB Tier
  • and run autoconfig on apps Tier




Ref :
http://appsdbaworkshop.blogspot.co.id/2013/02/oracle-apps-r12-cloning-online.html