1. Pre-requisities of ORPXXX2 - Applciation
1) Take the Important Backup files of the – ORPXXX2 Application
tier and Database Tier
2) Create the Directory ORPXXX2_ddmonthyy as
below :
$ cd /ORPXXX2/app/Preclone
$ mkdir ORPXXX2_22apr2017
$ cd ORPXXX2_22apr2017
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017
$ mkdir DT(here we are creating the DT directory under /ORPXXX2/app/Preclone/ORPXXX2_22apr2017)
$ cd DT
$pwd - /ORPXXX2/app/Preclone/ORPXXX2_22apr2017
$ mkdir appl comn iAS 806 db (here we are creating
appl,comn,IAS,806,db directories)
$ chmod 777 *
$ cd db
$ mkdir rdbms
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/db
3) Copying the environment files related to ORPXXX2 – Applciation
as shown below
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/appl
$ echo $APPL_TOP
/ORPXXX2/app/appl
$ cp $APPL_TOP/*.env .
$ cp $APPL_TOP/admin/adovars.env .
$ cp $APPL_TOP/admin/adpltfrm.txt .
$ cp $APPL_TOP/admin/topfile.txt .
$ cp $APPL_TOP/admin/*.xml* .
$ cp $FND_TOP/resource/wf* .
$ cp $FND_TOP/resource/WF* .
$ cp -R $FND_TOP/secure/* .
$ cp $OA_HTML/US/ICXINDEX*.htm .
$ cp $OA_HTML/env.txt .
$ cp -R $MWA_TOP/secure/* .
$ cp $APPL_TOP/admin/adconfig.txt .
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/appl
$ mkdir oahtml fndtop msc (here we are creating
oahtml,fndtop,msc – directories in location - /ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/appl)
$ cp $FND_TOP/admin/template/appsweb*.cfg ./fndtop
$ cp $OA_HTML/bin/appsweb*.cfg ./oahtml
$ cp $MSC_TOP/bin/MSCSLD* ./msc
$ cd ../806
$ cp $ORACLE_HOME/*.env* .
$ cp $TNS_ADMIN/*.ora* .
$ cd ../iAS
$ cp $IAS_ORACLE_HOME/Apache/Apache/bin/apachectl .
$ cp $IAS_ORACLE_HOME/Apache/Apache/bin/apxs .
$ cp $IAS_ORACLE_HOME/Apache/Apache/bin/httpdsctl .
$ cp $IAS_ORACLE_HOME/Apache/modplsql/cfg/cache.cfg .
$ cp $IAS_ORACLE_HOME/network/agent/config/nmxw.ora .
$ cp $TNS_ADMIN/tnsnames.ora* .
$ cp $TNS_ADMIN/listener.ora* .
$ cp $IAS_ORACLE_HOME/*.env .
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/iAS
$
Here from the above step 1,2,3 - We
have completed taking
the backup of the ORPXXX2 – Application files
2) Pre-requisities of ORPXXX2 – Database
1) Login to DB – node and check the OS level
user as shown below
-bash-3.2$ id
uid=586574(oraogdt2) gid=58657(dbaogdt2)
-bash-3.2$ echo $ORACLE_HOME
/ORPXXX2/oracle/db/11.1.0
-bash-3.2$ cd /ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/db ( here
we have location already created as per Step 1,2,3- application )
-bash-3.2$ cp $ORACLE_HOME/*.env .
-bash-3.2$ cp $TNS_ADMIN/*.ora .
-bash-3.2$ cp $ORACLE_HOME/appsutil/*.xml .
-bash-3.2$ cp $ORACLE_HOME/dbs/init*.ora .
-bash-3.2$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/db
$ ls -ltr /TSG_ERP_IXDEPOT/eOps/budlink.sh
-rwxrwxrwx 1
68399 ldapuser 2631 Jun
27 2010 /TSG_ERP_IXDEPOT/eOps/budlink.sh
$ cd ../
$ pwd
/ORPXXX2/app/Preclone/ORPXXX2_16april17/DT
$ sh /TSG_ERP_IXDEPOT/eOps/budlink.sh
Purpose: To backup the dblinks from the database as a script
Done
-bash-3.2$ cp /ORPXXX2/app/Preclone/ORPXXX2_11feb16/DT/db/DBNODE_backup.ksh
.
NOTE : (here we are copying DBNODE_backup.ksh script from /ORPXXX2/app/Preclone/ORPXXX2_11feb16/DT/db/)
2) Now execute the below script DBNODE_backup.ksh
or run the below scripts from DB – node
- DBLINKS
AND DBA_DIRECTORIES BAKCUP
spool create_dump_directory.sql
select 'CREATE OR REPLACE
DIRECTORY '||DIRECTORY_NAME||' AS '||''''||DIRECTORY_PATH||''''||';'
from all_directories;
spool off;
set lines 110;
set pagesize 300;
spool dblink_backup.sql;
SELECT 'create '||DECODE(U.NAME,'PUBLIC','public ')||'database
link '||CHR(10)||DECODE(U.NAME,'PUBLIC',Null, U.NAME||'.')
||L.NAME||chr(10)||'connect to ' || L.USERID || ' identified by
values '''||U.PASSWORD||''' using ''' || L.host ||
''''||chr(10)||';'TEXT FROM sys.link$ L,sys.user$ U WHERE L.OWNER# = U.USER# ;
spool off;
###############################################################
All configuration files were taken backup under :/ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/db/ORPXXX2_BACKUP_22Apr2017
Please compare with cloning document and see carefully if anything
is missed.
###############################################################
**** ORACLE_HOME config files ****
initdw.ora
xml
nacdprd1_disvd104_ifile.ora
initnacdprd1_noaq.ora
ORPXXP2_ORPXXP2.xml
ORPXXP2_ORPXXP2.env
ORPXXP2_ORPXXP2_ifile.ora
initORPXXP2_noaq.ora
listener_ifile.ora
sqlnet_ifile.ora
ORPXXP2_ORPXX238P.env
initORPXXX2_clone.ora
initORPXXX2_14mayclone.ora
initORPXXX2_clone11June.ora
initORPXXX2_clone11July.ora
init.ora
bkp13_tnsnames.ora
initORPXXX2.ora
initORPXXX2_clone_21Jan17.ora
listener.ora
tnsnames.ora
sqlnet.ora
ORPXXX2_ORPXX238P.xml
ORPXXX2_ORPXX238P.env
initORPXXX2_noaq.ora
ORPXXX2_ORPXX238P_ifile.ora
******* Backup Scripts *******
control_trace.txt
dblink_backup.sql
create_dump_directory.sql
3) Bring down the Appliciation and
Database services of the ORPXXX2
Login
to application node of ORPXXX2
$cd /ORPXXX2/app/comn/admin/scripts/ORPXXX2_OXXXX3760dp
$sh adstpall.sh
apps/****
Here after stopping the
services we need to crosscheck the processes related to DT4 as shown in above
screenshot.
Login
to Database node of ORPXXX2
Stop the listener
services related to ORPXXX2
-bash-3.2$ lsnrctl
status ORPXXX2
-bash-3.2$ lsnrctl
stop ORPXXX2

Stop the database
related to ORPXXX2
-bash-3.2$ sqlplus / as
sysdba
SQL*Plus: Release
11.1.0.7.0 - Production on Sun Apr 23 13:33:22 2017
Copyright (c) 1982,
2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g
Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning,
OLAP, Data Mining and Real Application Testing options
SQL> select
name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
ORPXXX2 READ
WRITE
SQL> shut
immediate
4. Dropping the database of ORPXXX2
Here we are dropping the
database of ORPXXX2
SQL> startup
mount exclusive restrict;

After dropping the
database we need to check datafiles,control files, logfiles, tempfiles in below
location
/ORPXXX2/dbdata/data1
-> datafiles and control files exists in this location.
/ORPXXX2/dbdata/redo1
-> redo logfiles exists in this location.
/ORPXXX2/dbdata/redo2
-> redo logfiles exists in this location.
/ORPXXX2/dbdata/temp ->
temporary data files exists in this location.
5. Backup of Production instance – ORPXXP2
Login to database node - ORPXX238P.com (ORPXXX2 DB
node)with oraogdp2
username: oraogdp2
password: *******
Change the permissions of the datafiles,control files, redo
logfiles. Temp files with oraogdp2
cd /ORPXXP2/dbdata/data1
chmod -R 777 *
cd /ORPXXP2/dbdata/redo2
chmod -R 777 *
cd /ORPXXP2/dbdata/redo2
chmod -R 777 *
cd /ORPXXP2/dbdata/temp
chmod -R 777 *
Note
: /ORPXXP2 is the mount point already got mounted in the ORPXX238P
server
It
is recommended you need to change the above permissions using oraogdp2 only,
otherwise you will face permission issues.
6. Copying the files of production backup(ORPXXP2) to ORPXXX2
instance location
username: oraogdt4
password: *****
Prod location
: /ORPXXP2/dbdata
Non-prod Location : /ORPXXX2/dbdata
start VNC server and copy the files from prod location to non-prod location

Login to VNC
server ORPXX238P.com:89

nohup cp
/ORPXXP2/dbdata/data1/*.* /ORPXXX2/dbdata/data1 &
nohup cp
/ORPXXP2/dbdata/redo2/*.* /ORPXXX2/dbdata/redo2 &
nohup cp
/ORPXXP2/dbdata/redo1/*.* /ORPXXX2/dbdata/redo1 &
nohup cp
/ORPXXP2/dbdata/temp/*.* /ORPXXX2/dbdata/temp &
Below are the screenshot
for reference taken from VNC server ORPXX238P.com :11

Once copy completed,
crosscheck the count of files using ls –ltr *dbf |wc -l
7. Database Configuration Steps of ORPXXX2
1. Source the ORACLE_SID
with ORPXXP2
-bash-3.2$ export ORACLE_SID=ORPXXP2
-bash-3.2$ echo $ORACLE_SID
ORPXXP2
-bash-3.2$ echo $ORACLE_HOME
/ORPXXX2/oracle/db/11.1.0
2. Startup mount the
database using the pfile where db_name=ORPXXP2
- $ ls -ltr
initORPXXP2.ora
-rw-r--r-- 1 oraogdt2
dbaogdt2 20117 Apr 17 2016 initORPXXP2.ora
$ grep -i dp2 initORPXXP2.ora
db_name =
ORPXXP2
$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Sat Apr 22 09:04:30
2017
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=initORPXXX2_clone.ora;
ORACLE instance started.
Total System Global Area 3207790592 bytes
Fixed
Size 2119072
bytes
Variable
Size 842721888
bytes
Database
Buffers 2348810240 bytes
Redo
Buffers 14139392
bytes
Database mounted.
SQL> select name , log_mode , open_mode from v$database;
NAME LOG_MODE OPEN_MODE
--------- ------------ ----------
ORPXXP2 ARCHIVELOG MOUNTED
SQL> !hostname
ORPXX238P
SQL> !id
uid=586564(oraogdt2) gid=58656(dbaogdt2)

3. Prepare spool file -
"rename_datafile_23apr.sql" to rename the datafile
SQL> select 'alter
database rename file '''||name||''' to ''/ORPXXX2/dbdata/data1/'||substr(name,instr(name,'data1')+6)||''';'
from v$datafile;

Crosscheck the spool
file rename_datafile_23apr.sql in present location where you have executed.
3a. Execute the rename_datafile_23apr.sql in mount
state.

3b. Now rename the redo-logfiles related to ORPXXP2.
Below is the screenshot
where the /ORPXXP2 is pointing to production.

Here renaming the
redo-logfiles with below command
alter database rename file '/ORPXXP2/dbdata/redo2/log06.dbf' to '/ORPXXX2/dbdata/redo2/log06.dbf';
alter database rename file '/ORPXXP2/dbdata/redo1/log05.dbf' to '/ORPXXX2/dbdata/redo1/log05.dbf';
alter database rename file '/ORPXXP2/dbdata/redo2/log04.dbf' to '/ORPXXX2/dbdata/redo2/log04.dbf';
alter database rename file '/ORPXXP2/dbdata/redo1/log03.dbf' to '/ORPXXX2/dbdata/redo1/log03.dbf';
alter database rename file '/ORPXXP2/dbdata/redo2/log02.dbf' to '/ORPXXX2/dbdata/redo2/log02.dbf';
alter database rename file '/ORPXXP2/dbdata/redo1/log01.dbf' to '/ORPXXX2/dbdata/redo1/log01.dbf';
Please crosscheck the
redo-logfiles after renaming the datafiles.
Below screenshot for
reference:

4. Check the database
status and try to open the database as shown in below screenshot
SQL> select * from v$recover_file;
no rows selected
SQL> alter system check datafiles;
System altered.
SQL> alter database open;
Database altered.

8. Renaming the database from ORPXXP2 to ORPXXX2 (NO ARCHIVELOG mode)
1. Take the backup of
control file trace
SQL> alter database backup controlfile to trace as '/ORPXXX2/dbdata/data1/controlfile_22april17.sql';
Database altered.
05:56:38 SQL> shut
immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

-bash-3.2$ cat controlfile_22april17.sql
CREATE CONTROLFILE SET DATABASE
"ORPXXX2" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 5
MAXDATAFILES 1500
MAXINSTANCES 8
MAXLOGHISTORY 4674
LOGFILE
GROUP 7 '/ORPXXX2/dbdata/redo1/log07.dbf' SIZE
1536M,
GROUP 8 '/ORPXXX2/dbdata/redo2/log08.dbf' SIZE
1536M,
GROUP 9 '/ORPXXX2/dbdata/redo1/log09.dbf' SIZE
1536M
-- STANDBY LOGFILE
DATAFILE
'/ORPXXX2/dbdata/data1/system01.dbf',
'/ORPXXX2/dbdata/data1/system02.dbf',
'/ORPXXX2/dbdata/data1/system03.dbf',
'/ORPXXX2/dbdata/data1/system04.dbf',
'/ORPXXX2/dbdata/data1/system05.dbf',
'/ORPXXX2/dbdata/data1/system06.dbf',
'/ORPXXX2/dbdata/data1/system07.dbf',
'/ORPXXX2/dbdata/data1/system08.dbf',
'/ORPXXX2/dbdata/data1/system09.dbf',
'/ORPXXX2/dbdata/data1/system10.dbf',
'/ORPXXX2/dbdata/data1/system11.dbf',
'/ORPXXX2/dbdata/data1/sysaux01.dbf',
'/ORPXXX2/dbdata/data1/undots01.dbf',
'/ORPXXX2/dbdata/data1/undots02.dbf',
'/ORPXXX2/dbdata/data1/undots03.dbf',
'/ORPXXX2/dbdata/data1/undots04.dbf',
'/ORPXXX2/dbdata/data1/undots05.dbf',
'/ORPXXX2/dbdata/data1/undots06.dbf',
'/ORPXXX2/dbdata/data1/undots07.dbf',
'/ORPXXX2/dbdata/data1/undots08.dbf',
'/ORPXXX2/dbdata/data1/undots09.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_ARCHIVE01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_INTERFACE01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_MEDIA01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_MEDIA02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_NOLOGGING01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES04.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES05.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES06.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES07.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_QUEUES08.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_SEED01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_SUMMARY01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA04.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA05.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA06.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA07.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA08.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA09.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA10.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA11.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA12.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA13.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA14.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA15.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA16.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA17.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA19.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA20.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG04.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG05.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG06.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG07.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG08.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG09.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG10.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG11.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG12.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG13.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG14.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG15.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG16.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG17.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG19.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA_LG20.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX04.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX05.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX06.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX07.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX08.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX09.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX10.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX11.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX12.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX13.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG02.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG04.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG05.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_IDX_LG06.dbf',
'/ORPXXX2/dbdata/data1/ctxd01.dbf',
'/ORPXXX2/dbdata/data1/discoverer01.dbf',
'/ORPXXX2/dbdata/data1/dresd01.dbf',
'/ORPXXX2/dbdata/data1/dresd02.dbf',
'/ORPXXX2/dbdata/data1/dresrd01.dbf',
'/ORPXXX2/dbdata/data1/dresrx01.dbf',
'/ORPXXX2/dbdata/data1/apps_ts_tools01.dbf',
'/ORPXXX2/dbdata/data1/geog01.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_MEDIA03.dbf',
'/ORPXXX2/dbdata/data1/APPS_TS_TX_DATA21.dbf',
'/ORPXXX2/dbdata/data1/owad01.dbf',
'/ORPXXX2/dbdata/data1/users01.dbf'
CHARACTER SET UTF8
;
Now we have created the control file trace with database name
“ ORPXXX2 “
2. Creating control file of ORPXXX2
Source the ORACLE_SID=ORPXXX2
-bash-3.2$ export ORACLE_SID=ORPXXX2
-bash-3.2$ !env|grep ORACLE~!
ORACLE_SID=ORPXXX2
ORACLE_HOME=/ORPXXX2/oracle/db/11.1.0
Steps for creating control file as shown below
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Sun Apr 23 06:07:03
2017
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 3207790592 bytes
Fixed
Size 2119072
bytes
Variable
Size 926607968
bytes
Database
Buffers 2264924160 bytes
Redo
Buffers 14139392
bytes
SQL> @controlfile_22april17.sql
Control file created.
SQL> select name,open_mode,open_resetlogs from v$database;
NAME OPEN_MODE OPEN_RESETL
--------------------------- ---------- -----------
ORPXXX2 MOUNTED REQUIRED

SQL> alter database open resetlogs;
Database altered.
SQL> select name,open_mode,op log_mode from
v$database;
NAME OPEN_MODE LOG_MODE
--------- ---------- ------------
ORPXXX2 READ WRITE NOARCHIVELOG
3. Creating temporary tablespace TEMP1
SQL> create temporary tablespace temp1 tempfile '/ORPXXX2/dbdata/temp/temp101.dbf'
size 4G;
Tablespace created.
SQL> alter database default temporary tablespace temp1;
Database altered.
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/ORPXXX2/dbdata/temp/temp101.dbf
SQL> select FILE_NAME,TABLESPACE_NAME from dba_temp_files;
FILE_NAME TABLESPACE_NAME
------------------------------ -------------------------
/ORPXXX2/dbdata/temp/temp101.dbf TEMP1
SQL> drop tablespace temp including contents and datafiles;
Tablespace dropped.
SQL> create temporary tablespace temp tempfile '/ORPXXX2/dbdata/temp/temp01.dbf'
size 5G;
Tablespace created.
SQL> alter tablespace temp add tempfile '/ORPXXX2/dbdata/temp/temp02.dbf'
size 5G;
Tablespace altered.
SQL> alter tablespace temp add tempfile '/ORPXXX2/dbdata/temp/temp03.dbf'
size 5G;
Tablespace altered.
SQL> alter database default temporary tablespace temp;
Database altered.
SQL> drop tablespace temp1 including contents and datafiles;
Tablespace dropped.

4. Start the listener related to ORPXXX2
-bash-3.2$ lsnrctl start ORPXXX2
5. Check the FND NODES status
Connect to APPS user and clean the production node
entries in ORPXXX2
set lines 200
col host_name for a11
col node_name for a11
col database for a10
col concmgr for a9
col forms for a7
col webserver for a11
col admin for a7
select
NODE_NAME,
decode(STATUS,'Y','ACTIVE','INACTIVE') Status,
decode(SUPPORT_CP,'Y', 'YES','NO') ConcMgr,
decode(SUPPORT_FORMS,'Y','YES', 'NO') Forms,
decode(SUPPORT_WEB,'Y','YES', 'NO') WebServer,
decode(SUPPORT_ADMIN, 'Y','YES', 'NO') Admin,
decode(SUPPORT_DB, 'Y','YES', 'NO') Database
from fnd_nodes
where node_name != 'AUTHENTICATION' order by NODE_NAME;
SQL> exec fnd_conc_clone.setup_clean;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
select
NODE_NAME,
decode(STATUS,'Y','ACTIVE','INACTIVE') Status,
decode(SUPPORT_CP,'Y', 'YES','NO') ConcMgr,
decode(SUPPORT_FORMS,'Y','YES', 'NO') Forms,
decode(SUPPORT_WEB,'Y','YES', 'NO') WebServer,
decode(SUPPORT_ADMIN, 'Y','YES', 'NO') Admin,
decode(SUPPORT_DB, 'Y','YES', 'NO') Database
from fnd_nodes
where node_name != 'AUTHENTICATION' order by
NODE_NAME;
no rows selected

Strat lisnter and Run autoconfig on Database Node
-bash-3.2$ cd echo $CONTEXT_FILE
/ORPXXX2/oracle/db/11.1.0/appsutil/ORPXXX2_ORPXX238P.xml
-bash-3.2$ cd /ORPXXX2/oracle/db/11.1.0/appsutil/
-bash-3.2$ cp ORPXXX2_ORPXX238P.xml ORPXXX2_ORPXX238P.xml_23apr2017
$ lsnrctl start $ORACLE_SID
LSNRCTL for Solaris: Version 11.1.0.7.0 - Production on
22-APR-2017 10:08:29
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Starting /ORPXXX2/oracle/db/11.1.0/bin/tnslsnr: please wait...
TNSLSNR for Solaris: Version 11.1.0.7.0 - Production
System parameter file is /ORPXXX2/oracle/db/11.1.0/network/admin/ORPXXX2_ORPXX238P/listener.ora
Log messages written to /ORPXXX2/oracle/db/11.1.0/log/diag/tnslsnr/ORPXX238P/ORPXXX2/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCORPXXX2)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ORPXX238P.com)(PORT=1532)))
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCORPXXX2))
STATUS of the LISTENER
------------------------
Alias ORPXXX2
Version TNSLSNR
for Solaris: Version 11.1.0.7.0 - Production
Start
Date 22-APR-2017
10:08:29
Uptime 0
days 0 hr. 0 min. 0 sec
Trace Level off
Security ON:
Local OS Authentication
SNMP OFF
Listener Parameter File /ORPXXX2/oracle/db/11.1.0/network/admin/ORPXXX2_ORPXX238P/listener.ora
Listener Log
File /ORPXXX2/oracle/db/11.1.0/log/diag/tnslsnr/ORPXX238P/ORPXXX2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCORPXXX2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ORPXX238P.com)(PORT=1532)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1
handler(s) for this service...
Service "ORPXXX2" has 1 instance(s).
Instance "ORPXXX2", status UNKNOWN, has 1
handler(s) for this service...
The command completed successfully
RUN AUTO CONFIG
-bash-3.2$ cd /ORPXXX2/oracle/db/11.1.0/appsutil/scripts/ORPXXX2_ORPXX238P
-bash-3.2$ sh adautocfg.sh
Enter the APPS user password:

9. Application Clone Steps
1. Change the APPLSYS and SYSADMIN password.
$ echo $TWO_TASK
ORPXXX2
$ which FNDCPASS
/ORPXXX2/app/appl/fnd/11.5.0/bin/FNDCPASS
$ FNDCPASS
apps/<prod_pwd> 0 Y system/<system password> SYSTEM
APPLSYS <NEW pwd>
Log filename : L1561015.log
Report filename : O1561015.out
Known issue while changing APPS password:

$ FNDCPASS apps/<ORPXXX2_apps_pwd> 0 Y
system/<system pwd> USER SYSADMIN <NEW pwd>
Log filename : L1561016.log
Report filename : O1561016.out
$ cat L1561016.log
+---------------------------------------------------------------------------+
Application Object Library: Version : 11.5.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
module:
+---------------------------------------------------------------------------+
Current system time is 23-APR-2017 08:16:19
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 23-APR-2017 08:16:22
+---------------------------------------------------------------------------+
2. Run autoconfig on Application Tier
$ echo $TWO_TASK
ORPXXX2
$ cd /ORPXXX2/app/appl/admin/
$ cp ORPXXX2_OXXXX3760dp.xml ORPXXX2_OXXXX3760dp.xml_bkp23apr17
$ cd /ORPXXX2/app/comn/admin/scripts/ORPXXX2_OXXXX3760dp
$ sh adautocfg.sh
Enter the APPS user password :
The log file for this session is located at: /ORPXXX2/app/appl/admin/ORPXXX2_OXXXX3760dp/log/04230826/adconfig.log
AutoConfig is configuring the Applications environment...
AutoConfig will consider the custom templates if present.
Using APPL_TOP
location : /ORPXXX2/app/appl
Classpath :
/ORPXXX2/app/comn/jdk160/jre/lib/rt.jar:/ORPXXX2/app/comn/jdk160/lib/dt.jar:/ORPXXX2/app/comn/jdk160/lib/tools.jar:/ORPXXX2/app/comn/java/appsborg2.zip:/ORPXXX2/app/comn/java
Using Context
file : /ORPXXX2/app/appl/admin/ORPXXX2_OXXXX3760dp.xml
Context Value Management will now update the Context file
Updating Context
file...COMPLETED


Bring up the Application services related to ORPXXX2
$cd /ORPXXX2/app/comn/admin/scripts/ORPXXX2_OXXXX3760dp
$sh adstrtal.sh
apps/****
10. Post clone steps
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
ORPXXX2.DRESSER.COM
-bash-3.2$ cd /ORPXXX2/app/Preclone/ORPXXX2_22apr2017/DT/db/ORPXXX2_BACKUP_22Apr2017
-bash-3.2$ ls -ltr
total 34
SQL>
SQL> set heading on
col DB_LINK format a50
set linesize 150
col HOST format a20
select owner,db_link,HOST,created from dba_db_links;
please use the below postclone document for DT2

11. Sanity Checks
1. Submit Active users
and check the status

2. Create front end
users and assign System Administrator responsibility and update via mail.


password: *******
chmod -R 777 *
cd /ORPXXP2/dbdata/redo2
chmod -R 777 *
cd /ORPXXP2/dbdata/redo2
chmod -R 777 *
chmod -R 777 *
password: *****
start VNC server and copy the files from prod location to non-prod location


















