Rekeying an Existing Tablespace with Online Conversion

To rekey an existing tablespace that is online, you can use the REKEY clause of the ALTER TABLESPACE SQL statement.

  1. Login to DB instance as a system user.

›_ sqlplus console

SQL> connect system/<password>; 
  1. List the encrypted tablespace.

›_ sqlplus console

SQL> select TABLESPACE_NAME, ENCRYPTED from DBA_TABLESPACES; 
  1. Open a Keystore.

›_ sqlplus console

SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY <hsm_password>;
  1. Rekey the existing tablespace SECURE_TS.

›_ sqlplus console

SQL> alter tablespace SECURE_TS ENCRYPTION USING 'AES192' REKEY  FILE_NAME_CONVERT = ('SECURETS_01.DBF','SECURETS_03.DBF'); 
  1. Verify rekey is successful.

›_ sqlplus console

SQL> select * from V$ENCRYPTED_TABLESPACES;