<<Back to Oracle DB Security Main Page
SQL> ALTER TABLE ENC_TEST3 ADD (ssn VARCHAR2(11) ENCRYPT USING 'AES192');
ALTER TABLE ENC_TEST3 ADD (ssn VARCHAR2(11) ENCRYPT USING 'AES192')
*
ERROR at line 1:
ORA-28340: a different encryption algorithm has been chosen for the table
Cause:
There are already some encrypted column in the table using different encryption algorithm. A table must use the same encryption algorithm to encrypt all its column. Identify the existing Algorithm and use it for encryption
Solution:
Remove the using clause and rerun the query
SQL> ALTER TABLE ENC_TEST3 ADD (ssn VARCHAR2(11) ENCRYPT );
OR
SQL> select OWNER,TABLE_NAME,COLUMN_NAME,SALT,INTEGRITY_ALG,ENCRYPTION_ALG from dba_encrypted_columns where OWNER='TEST' and TABLE_NAME='ENC_TEST3';
OWNER TABLE_NAME COLUMN_NAME SAL INTEGRITY_AL ENCRYPTION_ALG
---------- -------------------- --------------- --- ------------ -----------------------------
TEST ENC_TEST3 EMPID YES NOMAC 3 Key Triple DES 168 bits key
SQL> ALTER TABLE ENC_TEST3 ADD (ssn VARCHAR2(11) ENCRYPT USING '3DES168');
Comments
Post a Comment