Skip to Main Content
  • Questions
  • Cross Platform migration of 11.2.0.4 RAC DB with TDE using RMAN convert transportable tablespace & Data Pump

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.

Question and Answer

Connor McDonald

Thanks for the question, Ash.

Asked: July 28, 2020 - 5:48 am UTC

Last updated: July 28, 2020 - 8:59 am UTC

Version: 11.2.0.4

Viewed 1000+ times

You Asked

Hello All,

I need to migrate an 11g RAC DB with TDE on to another 11g RAC DB with TDE using RMAN convert transportable tablespace & Data Pump


Source On-Premise: 11.2.0.4 RAC Database with TDE on SunSParc 64 bit Solaris OS 10 (Big Endian) on a 2-node RAC cluster.

Target Exadata: 11.2.0.4 RAC Database on 1/8th Rack Exadata Machine XM8 with RHEL7.7 64 bit (Little Endian), again on a 2-node RAC cluster.

Here are the steps I used in this pursuit:

1. Created the target RAC database with dbca using a pre-created DB template from source database.
2. Tried 2 methods: A) Configured & setup brand new TDE(tablespace level) using the wallet password of source. B)Copyied of the ewallet from source to target nodes, used same encryption password as source to create and open the target wallet. WIth both these methods, target wallet created fine.
3.Created a test tablespace with 2 datafiles & a user on source
4.Put the tablespace in read only mode on source.
5.Took an export dump of the tablespace metadata on source: expdp system TRANSPORT_TABLESPACES=xtt_tst TRANSPORT_FULL_CHECK=YES DIRECTORY=mig2exa dumpfile=xtt_tst_metadata.dmp logfile= xtt_tst_metadata.log
6.Copied both the dump and the datafiles to target.
7.Brought the tablespace to read/write mode on source
8.Converted the datafiles on target using rman convert command.
RMAN> convert datafile

'/dbaswap/mig2exa/<db_name>/XTT_TST_1.dbf', '/dbaswap/mig2exa/<db_name>/XTT_TST_2.dbf'

DB_FILE_NAME_CONVERT '/dbaswap/mig2exa/<db_name>','+DATAC1' FROM PLATFORM 'Solaris[tm] OE (64-bit)';

9.Created the user( that uses the tablespace) on target - This is important otherwise the plugging does not work

10.Kicked off the plugging of tablesapce using import dump: impdp userid=system directory=mig2exa transport_datafiles='+DATAC1/XTT_TST_1.dbf','+DATAC1/XTT_TST_2.dbf' dumpfile=xtt_tst_metadata.dmp nologfile=yes

The error I'm getting from both options 2A and 2B ( above) is :

ORA-39123: Data Pump transportable tablespace job aborted

ORA-28374: typed master key not found in wallet



How do I get round this error? Why is the master key not recognized on target even when I copy the source wallet to target and use the same encryption password? Is this RMAN convert approach even possible with 11g TDE databases?



Please advise!



Regards,

Ash Saxena

and Connor said...

I've been taking a look at the (19c) docs and from that I suspect you won't be able to do this with image copies, ie, the conventional means we use for cross-platform conversion.

In the cross-platform image copy section:

https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/rman-transporting-data-across-platforms.html#GUID-D4C86E36-8EF8-489D-84CE-B8F045C8AB20

there is no reference to TDE, and I think this probably makes sense because we need a backup of the wallet as well.

However, in the cross-platform with backupsets section:

https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/rman-transporting-data-across-platforms.html#GUID-4644069A-7849-49F2-A1BF-2193EBAFFDBD

there is a list of steps to handle TDE, in particular


--
-- source
--
If the tablespace being transported is a TDE-encrypted tablespace, then specify the passphrase that will be used to wrap the master key before storing it in the backupset.
The following command sets the passphrase to encr_temp.

RMAN> SET PASSPHRASE ON IDENTIFIED BY encr_temp;

RMAN > BACKUP
TO PLATFORM 'Solaris[tm] OE (64-bit)'
FORMAT '/tmp/xplat_backups/trans_ts.bck'
DATAPUMP FORMAT '/tmp/xplat_backups/trans_ts_dmp.bck'
TABLESPACE projects, tasks;

--
-- target
--
If the tablespace being transported is a TDE-encyrpted tablespace, then provide the passphrase that was used on the source database to wrap the master key.
The following example sets the passphrase to encr_temp.

SET PASSPHRASE ON IDENTIFIED BY encr_temp;

RMAN> RESTORE
FOREIGN TABLESPACE projects, tasks TO NEW
FROM BACKUPSET '/tmp/xplat_restores/trans_ts.bck'
DUMP FILE FROM BACKUPSET '/tmp/xplat_restores/trans_ts_dmp.bck';




We're not taking comments currently, so please try again later if you want to add a comment.

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.