gpt4 book ai didi

sql-server-2008 - 无法以 SQL 用户帐户身份通过​​证书打开对称 key

转载 作者:行者123 更新时间:2023-12-02 08:51:23 26 4
gpt4 key购买 nike

<分区>

我使用这样的证书创建我的 key :

CREATE SYMMETRIC KEY some_Key_01<br/>
WITH ALGORITHM = AES_256<br/>
ENCRYPTION BY CERTIFICATE myCert;<br/>
GO

GRANT VIEW DEFINITION ON CERTIFICATE::myCert TO sqlUser;<br/>
GO

GRANT VIEW DEFINITION ON SYMMETRIC KEY::some_Key_01 TO sqlUser;<br/>
GO

然后我尝试像这样打开和使用它:

OPEN SYMMETRIC KEY some_Key_01<br/>
DECRYPTION BY CERTIFICATE myCert;<br/>
GO<br/>
SELECT CONVERT(datetime, DecryptByKey(EncryptedField))<br/>
AS 'DecryptedField'<br/>
FROM MyTable;<br/>
GO

但我收到消息:
Msg 15151, Level 16, State 1, Line 23<br/>
Cannot find the certificate 'myCert', because it does not exist or you do not have permission.

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com