-
Create a SCIENTISTS table in the DB.
SQL
SQL> create table SCIENTISTS (SCID NUMBER(4), FirstName VARCHAR2(128), LastName VARCHAR2(128), Salary NUMBER(6));
-
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;
-
Verify the inserted data.
SQL
SQL> select * from SCIENTISTS;
-
Encrypt the
Salarycolumn from SCIENTISTS.
SQL
SQL> alter table SCIENTISTS modify (Salary ENCRYPT);
-
Transparent Data Encryption decrypts the encrypted column automatically and returns the data in clear format.
SQL
SQL> select salary from SCIENTISTS;
-
Verify the column is encrypted in your DB.
SQL
SQL> select * from DBA_ENCRYPTED_COLUMNS;
-
View the information of the HSM keystore.
SQL
SQL> select * from V$ENCRYPTION_WALLET;