1. 程式人生 > >oracle表空間加密

oracle表空間加密

一.wallet

1.oracle表空間的加密與解密是基於wallet錢包中的金鑰進行。

2.wallet是Open狀態,可以使用其中的金鑰進行加密與解密處理。

3.wallet是close狀態時,加密表空間不可用,查詢修改和建立都不允許。

4.唯一刪除表是不需要金鑰的,wallet是open還是close狀態都可以進行刪除。

二.TDE(transparent data encryption透明資料加密)使用場景

1.保護敏感資料,禁止未授權的訪問,只有開啟錢包才能檢視資料。

2.防止資料丟失,當加密表空間的資料檔案被惡意拷貝走後,如果沒有金鑰是無法還原資料的。

3.防止資料被截獲,當在網路傳輸時加密後的資訊更安全,即使截獲了也無法得知其中內容。

TDE所支援的加密演算法種類AES(advanced encryption standard高階加密標準)是DESC的升級版。

AES標準是美國聯邦政府採用的一套加密標準,用來替代原來的DES標準。

AES屬於對稱性加密演算法(加密和解密使用同一金鑰進行),反之稱非對稱性加密演算法,如RSA標準公鑰和私鑰。

三.TDE環境配置

1.先建立一個wallet錢包,這個錢包裡面儲存著金鑰,oracle即是使用這個金鑰對列進行加密和解密。

2.設定wallet錢包的儲存位置

a.建立wallet目錄

  mkdir/u01/app/oracle/admin/orcl/wallet

b.修改配置檔案    vi sqlnet.ora

ENCRYPTION_WALLET_LOCATION=(SOURCE=

 (METHOD=file)

 (METHOD_DATA=

    (DIRECTORY=/u01/app/oracle/admin/orcl/wallet)))

3.使用sys使用者登入,建立mster key檔案,指定wallet密碼,建立後自動開啟wallet

[email protected]> alter system set encryptionkey identified by "oracle";

System altered.

4.驗證wallet錢包是否在指定的目錄下生成了檔案

[[email protected]

wallet]$ ls

ewallet.p12 

5.建立一個加密表空間

[email protected]> create tablespace test datafile '/u01/app/oracle/oradata/orcl/test.dbf' size 10m encryption default storage(encrypt);

Tablespace created.

[email protected]> select tablespace_name,encrypted from dba_tablespaces where tablespace_name='TEST';

TABLESPACE_NAME                ENC

------------------------------ ---

TEST                           YES

這裡如果不指定加密演算法,預設使用AES128的加密演算法。

esle如果報錯

ERROR at line 1:

ORA-28365: wallet is not open

此時是因為沒有開啟錢包,因為表空間的加密是使用錢包中的金鑰進行加密的。

開啟錢包

SQL> alter system set wallet open identified by "abc";

關閉錢包

SQL> alter system set wallet close identified by "abc";

案例1:在加密表空間上建立表encrypted_t

[email protected]> create table encrypted_t(idnumber) tablespace test;

Table created.

[email protected]> insert into encrypted_tvalues(1);

1 row created.

[email protected]> commit;

Commit complete.

[email protected]> select * from encrypted_t;

       ID

----------

        1

.關閉wallet後進行測試

[email protected]> alter system set wallet closeidentified by "oracle";

System altered.

--查詢操作失敗

[email protected]> select * from encrypted_t;

select * from encrypted_t

ERROR at line 1:

ORA-28365: wallet is not open

--在加密表空間上新建表,失敗

[email protected]> create table encrypted_t1 (idnumber) tablespace test;

create table encrypted_t1 (id number)tablespace test

*

ERROR at line 1:

ORA-28365: wallet is not open

--唯一例外的操作是刪除表,因為刪除的過程不需要金鑰參與,所以wallet開啟或關閉都無所謂

[email protected]> drop table encrypted_t;

Table dropped.

[email protected]> drop tablespace test includingcontents and datafiles;

Tablespace dropped.

案例2:加密資料

保證wallet是開啟的情況下,直接將需要加密的表移動到加密表空間中,

系統自動完成加密。

[email protected]> alter table t move tablespacetest;

Table altered.

需要注意的是alter table move會使索引失效,所以移動完成後需要重建索引。

alter table t t_index1 rebuild tablespace test;



相關推薦

oracle空間加密

一.wallet 1.oracle表空間的加密與解密是基於wallet錢包中的金鑰進行。 2.wallet是Open狀態,可以使用其中的金鑰進行加密與解密處理。 3.wallet是close狀態時,加密表空間不可用,查詢修改和建立都不允許。 4.唯一刪除表是不需要金鑰的,w

oracle 空間擴容方法

oracle 表空間擴容方法測試環境OS:RedHat 6.7Oracle:11.2.0.4[[email protected]/* */ ~]# su - oracle[[email protected]/* */ ~]$ sqlplus / as sysdbaSQL*Plus: R

11、oracle 空間

oracle 表空間創建和管理表空間1、創建表空間例子select name from v$datafile;SQL> select name from v$datafile;NAME------------------------------------------------------------

oracle空間自增長

align 文件的 end com 空間 images ble ges 自動擴展 方式一:通過修改oracle database control 修改 第一步,點擊開始——所有程序——Oracle - OraDb11g_home1——Database Control 第二步

Oracle空間、用戶、授權管理

manage tables 空間 gin 創建 tempfile max ide 指定 1、查詢表空間位置 select * from dba_data_files; -->d:\app\administrator\oradata\orcl\***.dbf 2、查看臨

zabbix 3.2添加Oracle空間監控

zabbix查看博文:http://7424593.blog.51cto.com/7414593/1910111?utm_source=tuicool&utm_medium=referral 註意:在zabbix中添加監控項時需要把PROCESS_NAME改為TABLESPACE_NAMEzabbix

oracle空間查詢維護命令大全之中的一個(數據空間)史上最全

ava 劃分 man max rac 帳戶 oca nio msi 表空間是數據庫的邏輯劃分,一個表空間僅僅能屬於一個數據庫。全部的數據庫對象都存放在建立指定的表空間中。但主要存放的是表, 所以稱作表空間。在oracle 數據庫中至少存在

ORACLE空間操作實例

nds 臨時文件 acl efault home const desc 文件大小 extend 本文主要介紹oracle表空間常見的操作實例,包括創建、查詢、增加、刪除、修改。表空間和數據文件常用的數據字典和動態性能視圖包括v$dbfile、v$datafile、d

[oracle]空間情況查看、占用、擴容、使用情況、空間維護等操作

file where sed limit sel dbf limited 每次 文件大小 --查詢表空間使用情況SELECT Upper(F.TABLESPACE_NAME) "表空間名", D.TOT_GROOTTE_MB

oracle空間

ora use 用戶 max oracl con 創建表空間 limited 建表 --創建表空間權限grant create tablespace to QJT--刪除表空間權限grant DROP tablespace to QJT --創建表空間create tabl

Oracle空間狀態

altered app line oracle style tables error dba date 1.表空間只讀 查看當前表空間狀態 [email protected]>column file_name format a60 [email 

創建Oracle空間和用戶

ide others maxsize 創建用戶 max add emp alter ant create oracle tablespace and user /*第1步:創建臨時表空間 */ create temporary tablespace test_temp t

oracle 空間

oracle user 表空間 創建表空間--查看所有用戶,以及對應的永久表空間,臨時表空間select username,default_tablespace,temporary_tablespace from dba_userswhere username=‘SYSTEM‘;1.1 創建臨時表

oracle11g 重裝操作系統後,如何利用原有oracle空間文件還原數據庫

系統 pro oracle安裝 bho 創建 庫文件 sel 臨時 listener oracle11g 重裝操作系統後,如何利用原有oracle表空間文件還原數據庫最近由於系統重裝,在還原dmp備份文件時,由於數據原因(用exp命令導出時表沒有導出全部),導致系統不能正常

Zabbix 3.2.6 通過Discovery批量監控Oracle空間

oracle zabbix 一、背景 接到任務,要求對所有數據庫的所有表空間進行監控,願意是遇到表空間不足導致業務數據庫的不可用,我們知道通過Zabbix監控Oracle的插件有一些,比如Orabbix或者Pyora,前者通過Java進行數據獲取,所以必須要安裝Java,我之前的文章有講解安裝過

oracle空間轉移

狀態 錯誤 得到 過程 ews ner -- 表名 依次 --查看表空間下的表 select t.TABLE_NAME,T.TABLESPACE_NAME from dba_tables t where t.TABLESPACE_NAME = ‘${spacename}‘

oracle-空間-用戶-角色-權限-約束

是什麽 res 建議 字符串 整數 問題 contents 加班 情況下 一,表空間 1.1創建表空間 --問題:創建一個名為hp的表空間,指定數據文件為hp.dbf,大小為10m. create tablespace hp datafile ‘C:\app

【轉】ORACLE 空間擴展方法

desc taf ora 查看 ges bytes 查詢 auto _id 轉載地址:http://blog.itpub.net/28950170/viewspace-763139/ 第一步:查看表空間的名字及文件所在位置: select tablespace_name,

oracle空間的管理

連接 total 創建表空間 med oca end normal urg user 1、創建表空間 CREATE TABLESPACE TBS_TR_DATA DATAFILE ‘/oradata/rTBS_TR_DATA_001.dbf‘ SIZE 64G EXTE

Oracle空間管理相關

自己 問題 出現 測試 方式 文件的 個數 數據字典 多個 以下以我自己的測試環境舉例:1.表空間的 block_size 為 8192字節,即8KBytes。從數據字典中查到 max_size 為 2147483645,即約為15.9TBytes。2.在創建表空間時,可以