s_undo_tablespace=<Source (PDB) system undo tablespace name>
s_db_oh=<Location of new ORACLE_HOME>
s_dbhost=<Target hostname>
s_dbSid=<Target PDB name>
s_pdb_name=<Target PDB name>
s_cdb_name=<Target CDB SID>
s_base=<Base directory for DB Oracle Home>
s_dbuser=<DB User>
s_dbgroup=<DB group> (Not applicable to Windows)
s_dbhome1=<Data directory>
s_display=<Display>
s_dbCluster=false
s_isDBCluster=n
s_dbport=<DB port>
s_port_pool=<Port pool number>
egrep -i 's_undo_tablespace|s_db_oh|s_dbhost|s_dbSid|s_pdb_name|s_cdb_name|s_base|s_dbuser|s_dbgroup|s_dbhome1|s_display|s_dbCluster|s_isDBCluster|s_dbport|s_port_pool'
$ cd <NEW ORACLE_HOME>/appsutil/clone/bin
$ perl adclonectx.pl \
contextfile=<Source database context file> \
template=<NEW ORACLE_HOME>/appsutil/template/adxdbctx.tmp \
[pairsfile=<Pairs file generated in Section 4.1.2>]
If the pairsfile.txt file is not passed, you will be presented with the following questions:
Provide the values required for creation of the new Database Context file.
Target System Hostname (virtual or normal) [<Current hostname] :
Do you want the inputs to be validated (y/n) [n] ? :
Target Instance is RAC (y/n) [n] : n
Target System CDB Name : <Name of the Container database>
Target System PDB Name : <Name of the EBS PDB database>
Target System Base Directory : <Complete path to the base directory for the target system>
Oracle OS User [<Current OS User>]] :
Oracle OS Group [<Current OS User group] :
Role separation is supported y/n [n] ? : <If the answer to this prompt is 'y', enter values for the next two prompts also>
Specify value for OSOPER group [<Oracle OS Group>] :
Specify value for OSASM group [ ] :
Number of DATA_TOP's on the Target System [<Number of data tops on the source database>] : <Number of data tops for the target database>
Target System DATA_TOP Directory 1 [<data top directory>] : <If there is more than one data top, there will be additional prompts for the remaining data tops>
Specify value for OSBACKUPDBA group [<Oracle OS group>] :
Specify value for OSDGDBA group [<Oracle OS group>] :
Specify value for OSKMDBA group [<Oracle OS group>] :
Specify value for OSRACDBA group [<Oracle OS group>] :
Target System RDBMS ORACLE_HOME Directory[]:
Do you want to preserve the Display [localhost:10.0] (y/n) : n
Target System Display [<Target hostname>:0.0] :
Do you want the target system to have the same port values as the source system (y/n) [y] ? : <If the answer to this prompt is 'n' or if the source port pool is not free on the current node, enter the value for the next prompt>
Target System Port Pool [0-99] : <Port pool>
New context path and file name [<ORACLE_HOME>/appsutil/<CONTEXT_NAME>.xml] :
4.1.4 Configure the Database Technology Stack
Configure the database technology stack copied by running the following steps:
Navigate to <ORACLE_HOME>/appsutil/clone/bin and run Rapid Clone (adcfgclone.pl utility) with the following parameters to configure the database technology stack:
$ perl adcfgclone.pl dbTechStack <Complete path to the target context file>
4.1.5 Create the listener.ora and tnsnames.ora for the Target Database
Create the listener.ora and tnsnames.ora files for the target CDB by running the following commands:
Set the environment.
On UNIX:
$ cd <ORACLE_HOME>/appsutil
$ source ./txkSetCfgCDB.env -dboraclehome=<ORACLE_HOME>
On Windows:
C:\> cd <ORACLE_HOME>\appsutil
C:\> txkSetCfgCDB.cmd dboraclehome=<ORACLE_HOME>
Generate the listener.ora and tnsnames.ora.
$ cd <ORACLE_HOME>/appsutil/bin
$ perl txkGenCDBTnsAdmin.pl -dboraclehome=<ORACLE_HOME> -cdbname=<Name of the target container database> \
-cdbsid=<SID of the target container database> -dbport=<Target DB port> -outdir=$ORACLE_HOME/appsutil/log \
-israc=<yes/no> [-virtualhostname=<virtual hostname>]
where:
Parameter Description
cdbname Name of the target container database.
cdbsid
Oracle SID of the target container database instance.
For single-node database, the value is same as the cdbname.
For Oracle RAC database, it is the Instance name of the target database. israc Provide the value 'yes' for an Oracle RAC database.
Provide the value 'no' for a single-node database. virtualhostname Virtual hostname for the Oracle RAC database. For a single-node database, this parameter should not be used.
Start the listener for the target container database as follows:
On UNIX:
$ cd <ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>
$ ./adcdblnctl.sh start <CDB SID>