HOL 18c Migrate FTEX

In this part of the Hands-On Lab you will migrate the FTEX database directly into a PDB2 using Full Transportable Export/Import, an extension of Transportable Tablespaces where Data Pump takes over the manual work you’ve had to with plain TTS. It works cross-platform and cross-Endianness with at least an Oracle source database.

In the case of the lab, you will move an Oracle database, FTEX, directly into an 18c PDB2 which is part of CDB2.

It is important to mention that this feature works cross-platform and cross-Endianness!


1. Create a new PDB2

At first, as with every other Transportable Tablespace migration, we need to create a database – or in our case, a PDB – first.

Login to CDB2 and create a new PDB:

. cdb2
sqlplus / as sysdba

create pluggable database PDB2 admin user adm identified by adm file_name_convert=('/oradata/CDB2/pdbseed', '/oradata/CDB2/pdb2');

The admin user needs to exist when a PDB gets created. You can delete it later on if necessary.

Once the PDB2 is created you need to start it up and create some additional objects for the migration:

alter session set container=PDB2;

create directory mydir as '/u02/oradata/CDB2/mydir';
grant read, write on directory mydir to system;
create public database link SOURCEDB connect to system identified by oracle using 'FTEX';

We will use the database link to allow Data Pump pulling all information via the database link. The task can be done without the database link but then two operations are necessary, an expdp and an impdp.

2. Prepare FTEX

Before we can transport anything, we need to prepare the FTEX database.

First of all, you need to start it up. Then you will switch the one tablespace we’ll migrate to Read-Only:

. ftex
sqlplus / as sysdba

alter tablespace USERS read only;

3. Migrate FTEX into PDB2

At first of course you need to transfer the file as well to the new environment:

cp /u02/oradata/FTEX/users01.dbf /u02/oradata/CDB2/pdb2

Then you need to initiate the transport operation. In this case Data Pump will take over the usual manual steps from Transportable Tablespaces. The keywords TRANSPORTABLE=ALWAYS and FULL=Y advice Data Pump to use the Full Transportable Export/Import feature. VERSION=12 is needed as we use an 11g database as source.

. cdb2

impdp system/oracle@pdb2 network_link=sourcedb version=12 full=y transportable=always metrics=y exclude=statistics directory=mydir logfile=pdb2.log transport_datafiles='/u02/oradata/CDB2/pdb2/users01.dbf'

Once the operation is completed (it takes between 2 and 3 minutes) you can shutdown FTEX.

You’ll find some error messages. This particular one can be safely ignored as the object belongs to Advanced Replication:

ORA-39083: Object type PROCACT_SYSTEM failed to create with error:
ORA-04042: procedure, function, package, or package body does not exist

Failing sql is:

W-1      Completed 4 PROCACT_SYSTEM objects in 25 seconds

ONLY in case copy/paste does not work correctly, there’s a prepared file with all the parameters in /home/oracle/IMP. Use “impdp parfile=/home/oracle/IMP/ft.par” instead.

. ftex
sqlplus / as sysdba

shutdown immediate

You can now connect to it with:

sqlplus "system/oracle@PDB2"

4. Migration to Oracle Cloud or Cloud Machine

This feature can be used of course to migrate to the Oracle Cloud or an ExaCC or OCC machine. See a real-time video here:
How to migrate an entire database with Full Transportable Export/import to the Oracle DBCS Cloud

==> NEXT: Unplug/Plug/Upgrade


Share this: