1.编辑 $ORACLE_HOME/network/admin/sqlnet.ora 文件,添加参数
encryption_wallet_location=(source=(method=file)(method_data=(directory=/nbu/u01/app/oracle/product/11.2.0/dbhome_1)))
2.sqlplus 中执行
SQL> alter system set encryption key identified by oracle;
System altered.
3. 验证 /nbu/u01/app/oracle/product/11.2.0/dbhome_1 密码文件
-rw-r--r-- 1 oracle oinstall 1573 Feb 13 16:38 ewallet.p12
[oracle@TDSHUIFU dbhome_1]$ pwd
/nbu/u01/app/oracle/product/11.2.0/dbhome_1
4.建立加密表空间
SQL> create tablespace encrypted_tbs datafile '/oradata/fcfbom/encrypted01.dbf'size 10m autoextend off encryption default storage(encrypt);
Tablespace created.
5.move 表测试
SQL> alter table system.wh move tablespace encrypted_tbs;
Table altered.
6.测试
关闭 wallet
SQL> alter system set wallet close identified by oracle;
System altered.
SQL> select * from system.wh where rownum=1;
select * from system.wh where rownum=1
*
ERROR at line 1:
ORA-28365: wallet is not open
7.建立表测试
SQL> alter system set wallet open identified by oracle;
System altered.
SQL> create table system.test tablespace encrypted_tbs as select * from dba_objects;
Table created.
encryption_wallet_location=(source=(method=file)(method_data=(directory=/nbu/u01/app/oracle/product/11.2.0/dbhome_1)))
2.sqlplus 中执行
SQL> alter system set encryption key identified by oracle;
System altered.
3. 验证 /nbu/u01/app/oracle/product/11.2.0/dbhome_1 密码文件
-rw-r--r-- 1 oracle oinstall 1573 Feb 13 16:38 ewallet.p12
[oracle@TDSHUIFU dbhome_1]$ pwd
/nbu/u01/app/oracle/product/11.2.0/dbhome_1
4.建立加密表空间
SQL> create tablespace encrypted_tbs datafile '/oradata/fcfbom/encrypted01.dbf'size 10m autoextend off encryption default storage(encrypt);
Tablespace created.
5.move 表测试
SQL> alter table system.wh move tablespace encrypted_tbs;
Table altered.
6.测试
关闭 wallet
SQL> alter system set wallet close identified by oracle;
System altered.
SQL> select * from system.wh where rownum=1;
select * from system.wh where rownum=1
*
ERROR at line 1:
ORA-28365: wallet is not open
7.建立表测试
SQL> alter system set wallet open identified by oracle;
System altered.
SQL> create table system.test tablespace encrypted_tbs as select * from dba_objects;
Table created.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7569309/viewspace-2133481/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7569309/viewspace-2133481/