Verify Encrypting Column in Table

  1. Create a SCIENTISTS table into DB.

›_ sqlplus console

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

›_ sqlplus console

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 inserted data into SCIENTISTS table.

›_ sqlplus console

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

›_ sqlplus console

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

›_ sqlplus console

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

›_ sqlplus console

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

›_ sqlplus console

SQL> select * from V$ENCRYPTION_WALLET;