Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 6

*.

db_file_name_convert='/oradb/app/oracle/PROD/data','/oradata_dev/dev','/oradb/
app/oracle/PROD/prodcdb','/oradata_dev/devcdb','/oradb/app/oracle/PROD/prodcdb/
pdbseed','/oradata_dev/devcdb/pdbseed'
*.log_file_name_convert='/oradb/app/oracle/PROD/data','/oradata_dev/dev','/oradb/
app/oracle/PROD/prodcdb','/oradata_dev/devcdb'

============================================================================
In SOURCE
============================================================================
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
BACKUP as compressed backupset FULL FILESPERSET 10 FORMAT
'/oradb/app/oracle/RMAN_backup/PROD_D_%s_%p_%t.bak' DATABASE;
BACKUP as compressed backupset filesperset 10 FORMAT
'/oradb/app/oracle/RMAN_backup/PROD_A_%s_%p_%t.bak' ARCHIVELOG ALL skip
inaccessible;
BACKUP FORMAT '/oradb/app/oracle/RMAN_backup/PROD_C_%s_%p_%t.bak' CURRENT
CONTROLFILE;
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
}

============================================================================
In TARGET
============================================================================
rman auxiliary /

run
{
allocate auxiliary channel c1 device type disk;
allocate auxiliary channel c2 device type disk;
duplicate database to 'DEVCDB' backup location '/oradb_dev/rman_backup/'
nofilenamecheck;
release channel c1;
release channel c2;
}

select count(*) from cdb_services c, service$ s where upper(s.name) = upper('DEV')


and s.deletion_date is null and s.name = c.name;

c) Run the following steps to rename the PDB.

export ORACLE_SID=DEVCDB

$ sqlplus / as sysdba

SQL> alter pluggable database "PROD" close;


SQL> alter pluggable database "PROD" unplug into
'/oradb_dev/oracle/product/19c/dbs/PROD.xml';
SQL> drop pluggable database "PROD";
SQL>create pluggable database "DEV" using
'/oradb_dev/oracle/product/19c/dbs/PROD.xml' NOCOPY
SERVICE_NAME_CONVERT=('ebs_PROD','ebs_DEV','PROD_ebs_patch','DEV_ebs_patch');
SQL> alter pluggable database "DEV" open read write;
========================
SQL> create pluggable database "DEV" using
'/oradb_dev/oracle/product/19c/dbs/PROD.xml' NOCOPY
SERVICE_NAME_CONVERT=('ebs_PROD','ebs_DEV','PROD_ebs_patch','DEV_ebs_patch');
create pluggable database "DEV" using '/oradb_dev/oracle/product/19c/dbs/PROD.xml'
NOCOPY SERVICE_NAME_CONVERT=('ebs_PROD','ebs_DEV','PROD_ebs_patch','DEV_ebs_patch')
*
ERROR at line 1:
ORA-65149: PDB name conflicts with existing service name in the CDB or the PDB

-- to clear above PDB name conflict follow below action plan.

SQL> select name from dba_services;

NAME
----------------------------------------------------------------
SYS$BACKGROUND
SYS$USERS
PRODCDB
DEV_ebs_patch
PRODCDBXDB
PRODCDB.tcil-india.com
DEV
DEVCDB

BEGIN
DBMS_SERVICE.stop_service(service_name => 'DEV');
END;
/

BEGIN
DBMS_SERVICE.stop_service(service_name => 'DEV_ebs_patch');
END;
/

BEGIN
DBMS_SERVICE.start_service(service_name => 'ebs_DEV');
END;
/

BEGIN
DBMS_SERVICE.start_service(service_name => 'DEV_ebs_patch');
END;
/

SQL> SELECT UTL_RAW.CAST_TO_RAW(NAME) FROM CDB_SERVICES WHERE NAME LIKE 'DEV';

UTL_RAW.CAST_TO_RAW(NAME)
--------------------------------------------------------------------------------
444556

SQL> SELECT UTL_RAW.CAST_TO_RAW(NAME) FROM CDB_SERVICES WHERE NAME LIKE


'DEV_ebs_patch';

UTL_RAW.CAST_TO_RAW(NAME)
--------------------------------------------------------------------------------
4445565F6562735F7061746368

EXEC DBMS_SERVICE.DELETE_SERVICE(UTL_RAW.CAST_TO_VARCHAR2('444556'));

EXEC
DBMS_SERVICE.DELETE_SERVICE(UTL_RAW.CAST_TO_VARCHAR2('4445565F6562735F7061746368'))
;

perl txkCfgUtlfileDir.pl
-contextfile=/oradb_dev/oracle/product/19c/appsutil/DEV_r5r10-nprd-db.xml -
oraclehome=/oradb_dev/oracle/product/19c/
-outdir=/oradb_dev/oracle/product/19c/appsutil/log -mode=getUtlFileDir

export ORACLE_HOME=/oradb_dev/oracle/product/19c
export PATH=$ORACLE_HOME/perl/bin:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME:$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.28.1:$ORACLE_HOME/perl/site_perl/
5.28.1:$ORACLE_HOME/appsutil/perl
export PATH=$ORACLE_HOME/perl:$ORACLE_HOME/perl/lib:$ORACLE_HOME/perl/bin:$PATH

=============================
/orautl_file/prod
/oradb/app/oracle/PROD/19.0.0/appsutil/outbound/PROD_r6r21-prd-app1
/oradb/app/oracle/PROD/temp/PROD

/orautl_file/dev
/oradb_dev/oracle/product/19c/appsutil/outbound/DEV_r5r10-nprd-db
/oradb_dev/oracle/product/temp/DEV

======================================================
perl txkCfgUtlfileDir.pl
-contextfile=/oradb_dev/oracle/product/19c/appsutil/DEV_r5r10-nprd-db.xml -
oraclehome=/oradb_dev/oracle/product/19c
-outdir=/oradb_dev/oracle/product/19c/appsutil/log -mode=setUtlFileDir

perl txkCfgUtlfileDir.pl
-contextfile=/oradb_dev/oracle/product/19c/appsutil/DEV_r5r10-nprd-db.xml -
oraclehome=/oradb_dev/oracle/product/19c
-outdir=/oradb_dev/oracle/product/19c/appsutil/log -mode=createDirObject

perl txkCfgUtlfileDir.pl
-contextfile=/oradb_dev/oracle/product/19c/appsutil/DEV_r5r10-nprd-db.xml -
oraclehome=/oradb_dev/oracle/product/19c
-outdir=/oradb_dev/oracle/product/19c/appsutil/log -mode=syncUtlFileDir -
skipautoconfig=yes

perl adcfgclone.pl dbconfig /oradb_dev/oracle/product/19c/appsutil/DEV_r5r10-nprd-


db.xml

=======================================================================
apps clone
============
Error:
Below Oracle Homes are already registered in the global inventory:
/u01/oracle/R122/fs1/FMW_Home/oracle_common
/u01/oracle/R122/fs1/FMW_Home/webtier
/u01/oracle/R122/fs1/FMW_Home/Oracle_EBS-app1
***************************************************************************
cd /oraapp_dev/dev/fs1/EBSapps/10.1.2/oui/bin
./runInstaller -silent -deinstall
REMOVE_HOMES={"/oraapp_dev/dev/fs1/FMW_Home/Oracle_EBS-app1"}
./runInstaller -silent -deinstall
REMOVE_HOMES={"/oraapp_dev/dev/fs1/FMW_Home/webtier"}
./runInstaller -silent -deinstall
REMOVE_HOMES={"/oraapp_dev/dev/fs1/FMW_Home/oracle_common"}

****************************************************************************
[appldev@r5r21-nprd-app bin]$ perl ./adcfgclone.pl appsTier dualfs

Copyright (c) 2002, 2015 Oracle Corporation


Redwood Shores, California, USA

Oracle E-Business Suite Rapid Clone

Version 12.2

adcfgclone Version 120.63.12020000.83

Enter the APPS password :

Enter the Weblogic AdminServer password :

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

Running: Context clone...

Log file located at


/oraapp_dev/dev/fs1/EBSapps/comn/clone/bin/CloneContext_1013005745.log

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

Target System Hostname (virtual or normal) [r5r21-nprd-app] :

Target System Database SID : DEV

Target System Database Server Node [r5r21-nprd-app] : r5r10-nprd-db

Target System Database Domain Name [tcil-india.com] :

Target System Base Directory : /oraapp_dev/dev/

Target System Base Directory set to /oraapp_dev/dev


Target System Current File System Base set to /oraapp_dev/dev/fs1

Target System Other File System Base set to /oraapp_dev/dev/fs2

Target System Fusion Middleware Home set to /oraapp_dev/dev/fs1/FMW_Home


Target System Other File System Fusion Middleware Home set to
/oraapp_dev/dev/fs2/FMW_Home

Target System Web Oracle Home set to /oraapp_dev/dev/fs1/FMW_Home/webtier


Target System Other File System Web Oracle Home set to
/oraapp_dev/dev/fs2/FMW_Home/webtier

Target System Appl TOP set to /oraapp_dev/dev/fs1/EBSapps/appl


Target System Other File System Appl TOP set to /oraapp_dev/dev/fs2/EBSapps/appl

Target System COMMON TOP set to /oraapp_dev/dev/fs1/EBSapps/comn


Target System Other File System COMMON TOP set to /oraapp_dev/dev/fs2/EBSapps/comn

Target System Instance Home Directory [/oraapp_dev/dev] :

Target System Current File System Instance Top set to


/oraapp_dev/dev/fs1/inst/apps/DEV_r5r21-nprd-app

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

Target System Display [r5r21-nprd-app:0.0] :

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 the target system to have the same port values as the source system
(y/n) [y] ? : n

Target System Port Pool [0-99] : 0

Checking the port pool 0


done: Port Pool 0 is free
Report file located at
/oraapp_dev/dev/fs1/inst/apps/DEV_r5r21-nprd-app/admin/out/portpool.lst

Target System proxy port [80] :

EBS_APPLPTMP consists of below directory.


1. /orautl_file/dev
Choose a value which will be set as APPLPTMP on the target node [1] :
The new APPL_TOP context file has been created :
/oraapp_dev/dev/fs1/inst/apps/DEV_r5r21-nprd-app/appl/admin/DEV_r5r21-nprd-
app.xml
Check Clone Context logfile
/oraapp_dev/dev/fs1/EBSapps/comn/clone/bin/CloneContext_1013005745.log for details.

Creating Patch file system context file.....


Log file located at
/oraapp_dev/dev/fs1/EBSapps/comn/clone/bin/CloneContextPatch_1013010029.log

Target System Other File System Instance Top set to


/oraapp_dev/dev/fs2/inst/apps/DEV_r5r21-nprd-app

Target System Port Pool [0-99] : 0

Patch file system should have different port pool than Run file system..

Target System Port Pool [0-99] : 1

You might also like