ORA-28338: cannot encrypt indexed column(s) with salt

In my Oracle database wallet is configured. While i tried to create an index on the encrypted column then i got the following error:

Error:

SQL> CREATE INDEX EMP_IDX on EMPLOYEES(EMPID);
error:
ORA-28338: cannot encrypt indexed column(s) with salt

Solution:

On the encrypted column with salt option, we cannot create the index, We need to modified the column property to the no salt. In Wallet, when we create the encrypt column to save data then with SALT option is default. it automatically pick by Oracle.

While Creating the table we have to follow the following syntax if we want to create index on that column:

CREATE TABLE employee (
   empID NUMBER ENCRYPT NO SALT,
   salary NUMBER(6) ENCRYPT USING '3DES168');

If want to create the index on existing column which already encrypted then we use ALTER command:

ALTER TABLE employee MODIFY (empid ENCRYPT NO SALT);

After convert the encrypted from SALT to No SALT option. you will able to create index on it.

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply