文章目录
-
目录
一、TDE配置
1.1.创建钱包目录
su - oracle
mkdir $ORACLE_HOME/network/admin//wallets/
1.2.配置TDE
配置文件为sqlnet.ora
vi $ORACLE_HOME/network/admin/sqlnet.ora
ENCRYPTION_WALLET_LOCATION=
(SOURCE=
(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/opt/app/oracle/product/11.2.0/mbsdb/network/admin/wallets)
)
)
1.3.设置主加密密钥
su - oracle
sqlplus / as sysdba
ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "password";
SELECT * FROM v$encryption_wallet;
1.4.关闭钱包
ALTER SYSTEM SET ENCRYPTION WALLET CLOSE IDENTIFIED BY "password";
1.5.打开钱包
ALTER SYSTEM SET WALLET OPEN IDENTIFIED BY "password";
1.6.重置密钥
ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "newpassword";
二、列加解密
2.1.创建测试表
CREATE TABLE TED_TEST1 (
TEST_A VARCHAR2(8),
TEST_B VARCHAR2(8),
TEST_C NUMBER,
TEST_D NUM