Friday, December 23, 2011

Transparent Data Encryption (TDE)




seLect * from dict where table_name like '%WALLET%';

seLect * from dict where table_name like '%ENCRYPT%';


CREATE TABLE ENCRYPT_TEMP (FIRST VARCHAR2(20),SECOND VARCHAR2(20));

SQLNET.ORA

ENCRYPTION_WALLET_LOCATION =
(SOURCE=
(METHOD=file)
(METHOD_DATA=
(DIRECTORY=D:\ORACLE\PRODUCT\10.2.0\ADMIN\NBS1112\WALLET)))

CREATE WALLET DIRECTORY ON D:\ORACLE\PRODUCT\10.2.0\ADMIN\NBS1112

Create a Secure Wallet to hold the Master Encryption Key:

alter system set encryption key authenticated by "ImOracle";




ALTER TABLE ENCRYPT_TEMP MODIFY(FIRST ENCRYPT);

ALTER TABLE ENCRYPT_TEMP MODIFY (first DECRYPT); ---to decrypt


ALTER SYSTEM SET WALLET CLOSE;



SQL> SELECT * FROM ENCRYPT_TEMP;
SELECT * FROM ENCRYPT_TEMP
*
ERROR at line 1:
ORA-28365: wallet is not open




SQL> alter system set encryption key authenticated by "ImOracle";

System altered.

SQL> SELECT * FROM ENCRYPT_TEMP;

FIRST SECOND
-------------------- --------------------
AB1 ZX2
AB1 ZX2
AB1 ZX233

SQL>


SQL> ALTER SYSTEM SET WALLET CLOSE;

System altered.

SQL> SELECT SECOND FROM ENCRYPT_TEMP;

SECOND
--------------------
ZX2
ZX2
ZX233

No comments:

Post a Comment

Followers