Verifying Encrypted Columns in Tables

  1. Create a SCIENTISTS table in the DB.

SQL
SQL> create table SCIENTISTS (SCID NUMBER(4), FirstName VARCHAR2(128), LastName VARCHAR2(128), Salary NUMBER(6));
  1. Add data to the SCIENTISTS table.

SQL
SQL> insert into SCIENTISTS values (0001, 'Albert', 'Einstein', 850000); 
SQL> insert into SCIENTISTS values (0002, 'Isaac', 'Newton', 750000); 
SQL> insert into SCIENTISTS values (0003, 'Charles', 'Darwin', 650000); 
SQL> insert INTO SCIENTISTS values (0004, 'Curie', 'Einstein', 550000); 
SQL> commit;
  1. Verify the inserted data.

SQL
SQL> select * from SCIENTISTS;
  1. Encrypt the Salary column from SCIENTISTS.

SQL
SQL> alter table SCIENTISTS modify (Salary ENCRYPT);
  1. Transparent Data Encryption decrypts the encrypted column automatically and returns the data in clear format.

SQL
SQL> select salary from SCIENTISTS;
  1. Verify the column is encrypted in your DB.

SQL
SQL> select * from DBA_ENCRYPTED_COLUMNS;
  1. View the information of the HSM keystore.

SQL
SQL> select * from V$ENCRYPTION_WALLET;