欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Sqlserver關(guān)于TDE透明數(shù)據(jù)加密的使用總結(jié)

官方文檔https://docs.microsoft.com/zh-cn/sql/t-sql/statements/create-certificate-transact-sql?view=sql-server-2017

創(chuàng)新互聯(lián)公司是一家專業(yè)提供湘鄉(xiāng)企業(yè)網(wǎng)站建設(shè),專注與網(wǎng)站制作、做網(wǎng)站H5網(wǎng)站設(shè)計、小程序制作等業(yè)務(wù)。10年已為湘鄉(xiāng)眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)絡(luò)公司優(yōu)惠進(jìn)行中。

TDE:Transparent Data Encryption透明數(shù)據(jù)加密

master key XX:SSMS圖形界面工具中見master-security-symmetric key或見sys.symmetric_keys

CERTIFICATE YY:SSMS圖形界面工具中見master-security-certificates或見sys.certificates

數(shù)據(jù)庫啟用TDE:

大致步驟

在master數(shù)據(jù)庫里創(chuàng)建主密匙。

創(chuàng)建/使用受主密匙保護(hù)的證書。

對某個受證書保護(hù)的數(shù)據(jù)庫加密密匙。

對某個數(shù)據(jù)庫啟用TDE。

1、先drop master key主秘鑰

drop master key

如果報錯,說明有certificate在使用它,需要先把certificate刪除再刪除master key

Cannot drop master key because certificate 'C_databaseXX' is encrypted by it.

2、創(chuàng)建master key主秘鑰

CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'XX';

示例create master key encryption by password = 'TD_123456';

3、創(chuàng)建certificate證書,名稱一般為certdbname

create certificate certtificatename with subject ='XX';

示例create certificate certSSRSTEST with subject ='SSRSTEST database certificate data encription';

4、備份上面第3步創(chuàng)建certificate證書

BACKUP CERTIFICATE certtificatename TO FILE = 'XX'

WITH PRIVATE KEY ( FILE = 'XXkey' ,

ENCRYPTION BY PASSWORD = 'XX' );

示例

BACKUP CERTIFICATE certSSRSTEST TO FILE = '\\testdb1\mirror\certSSRSTEST'

WITH PRIVATE KEY ( FILE = '\\testdb1\mirror\certSSRSTESTkey' ,

ENCRYPTION BY PASSWORD = '654321_DT' );

5、對某個數(shù)據(jù)庫使用上面第3步的certificate進(jìn)行加密,并啟用這個加密

create database encryption key with algorithm = XX encryption by server certificate certtificatename

alter database databasename set encryption on

示例

use SSRSTEST;

go

create database encryption key with algorithm = AES_128 encryption by server certificate certSSRSTEST

go

alter database SSRSTEST set encryption on

go

異機(jī)恢復(fù)一個TDE備份的數(shù)據(jù)庫

1、備份TDE數(shù)據(jù)庫庫

backup database SSRSTEST to disk = '\\testdb1\mirror\SSRSTEST.bak'

2、異機(jī)恢復(fù)這個數(shù)據(jù)庫

2.1、異機(jī)創(chuàng)建master key,這個密碼可以隨便

create master key encryption by password = '999_TD999';

2.2、異機(jī)創(chuàng)建CERTIFICATE證書,這個 密碼必須和源端備份CERTIFICATE時的密碼一致(即上面第4步) ,否則會報錯

CREATE CERTIFICATE certClientData

FROM FILE='\\testdb1\mirror\certSSRSTEST'

WITH PRIVATE KEY(

FILE='\\testdb1\mirror\certSSRSTESTkey',

DECRYPTION BY PASSWORD='654321_DT')

2.3、

restore database SSRSTEST from disk = '\\testdb1\mirror\SSRSTEST.bak'

異機(jī)恢復(fù)這個數(shù)據(jù)庫時如果直接恢復(fù),有報錯,說明需要在異機(jī)創(chuàng)建certificate證書

restore database SSRSTEST from disk = '\\testdb1\mirror\SSRSTEST.bak'

報錯Cannot find server certificate with thumbprint '0x1640C78B8E4C6DCFA2DB4D2E97E3B206F2672FAB'.

異機(jī)創(chuàng)建certificate證書,有報錯說明DECRYPTION BY PASSWORD必須等于上面第4步的ENCRYPTION BY PASSWORD = '654321_DT'

use master;

go

CREATE CERTIFICATE certClientData

FROM FILE='\\testdb1\mirror\certSSRSTEST'

WITH PRIVATE KEY(

FILE='\\testdb1\mirror\certSSRSTESTkey',

DECRYPTION BY PASSWORD='TD_123456')

go

報錯The private key password is invalid

異機(jī)創(chuàng)建certificate證書,正確密碼還有報錯,說明需要先在異機(jī)建立master key

use master;

go

CREATE CERTIFICATE certClientData

FROM FILE='\\testdb1\mirror\certSSRSTEST'

WITH PRIVATE KEY(

FILE='\\testdb1\mirror\certSSRSTESTkey',

DECRYPTION BY PASSWORD='654321_DT')

go

報錯Please create a master key in the database or open the master key in the session before performing this operation.

創(chuàng)建master key隨便設(shè)置密碼password = '999_TD999',創(chuàng)建證書輸入正確密碼PASSWORD='654321_DT',一切正常

use master;

create master key encryption by password = '999_TD999';

CREATE CERTIFICATE certClientData

FROM FILE='\\testdb1\mirror\certSSRSTEST'

WITH PRIVATE KEY(

FILE='\\testdb1\mirror\certSSRSTESTkey',

DECRYPTION BY PASSWORD='654321_DT')

網(wǎng)站欄目:Sqlserver關(guān)于TDE透明數(shù)據(jù)加密的使用總結(jié)
文章分享:http://aaarwkj.com/article42/pjcghc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、網(wǎng)站制作網(wǎng)站策劃、定制網(wǎng)站、軟件開發(fā)云服務(wù)器

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)
日韩av在线专区观看| 国产精品大屁股一区二区| 一二区中文字幕在线观看| 国产亚洲精品久久久闺蜜| 草莓午夜视频在线观看| 国产精品传媒免费在线观看| 日韩有码高清av在线| 日韩人妻有码中文字幕| 亚洲av免费一区二区三区| 国产亚洲综合一区二区三区| 国产一区二区三区在线观看俏佳人| 精品亚洲第一区二区免费在线| 日本高清av一区二区| 欧美亚洲成人免费电影| 日韩二区三区在线观看| 欧美日韩精品乱码在线观看| 中文字幕国产精品专区| 亚洲激情欧美激情在线| 男女性生活视频成年人观看| 青青操国产在线自偷自拍| 中文字幕三级电影天堂| 国产精品成人av在线网站| 中文字幕在线一区国产精品| 欧美一区二区三区免费精品| 亚洲熟女精品不卡一区二区| 成人午夜福利影院在线| 日韩人妖视频在线观看| heyzo高清中文字幕在线| 综合激情丁香久久狠狠| 国产精品久久久99| 国产熟女肥臀精品国产馆乱| 人妻少妇麻豆中文字幕久久精品| 国产精品久久一区二区三区蜜桃 | 野花日本免费高清完整| 国产精品日韩欧美一区二区| 欧美一区二区三区va| 欧美人与性禽动交情品| 亚洲欧美国产精品久久久| 日韩av有码在线播放| 日韩一区二区高清视频在线观看| 日韩在线国产精品一区|