db19c Transfer wallet from primary to standby, in ASM

To copy the wallet file from the primary to the standby, in 19c, the primary is supposed to be configured with TDE already.

On the primary

On the primary, create a temporary directory and export the wallet into it.

mkdir /tmp/TDEwallet
administer key management create keystore '/tmp/TDEwallet/' identified by welcome;
administer key management merge keystore '+DATA/EMDEVU/tde' into existing keystore '/tmp/TDEwallet/' identified by welcome with backup;

Transfer the wallet file /tmp/TDEwallet/ewallet.p12 in the standby directory, in the same directory

On the standby

On the standby, using grid, create the wallet directory

asmcmd mkdir +DATA/EMTSTP/tde

Using oracle, create the keystore

administer key management create keystore '+DATA/EMTSTP/tde' identified by welcome;
alter system set wallet_root='+DATA/EMTSTP' SCOPE=SPFILE;

bounce the standby, using srvctl

alter system set tde_configuration="keystore_configuration=file" scope=both;
t;

Import the wallet

ADMINISTER KEY MANAGEMENT MERGE KEYSTORE '/tmp/TDEwallet/' IDENTIFIED BY welcome INTO EXISTING KEYSTORE '+DATA/EMTSTP/tde' IDENTIFIED BY welcome WITH BACKUP;

Create the autologin

administer key management create auto_login keystore from keystore identified by "welcome";

Check the wallet status:

select inst_id, con_id, wallet_type, status from gv$encryption_wallet;