Msg 15151 Cannot find the certificate

简介:

早上执行加密的存储过程出现下面的错误:

 

Msg 15151, Level 16, State 1, Line 23
Cannot find the certificate 'EncryptCert', because it does not exist or you donot have permission.

 

查了一下发现访问的账户只是赋予了执行存储过程的权限,如果不是用加密是没有问题。网上查了一下,需要对证书和Key单独加权限.

 

代码如下: 

 

--需要对证书有Control权限

GRANT CONTROL ON CERTIFICATE::EncryptCert TO User1;

GO

--Key需要REFERENCES权限

GRANT REFERENCES ON SYMMETRICKEY::PoolKey TO User1;

GO

 

执行上面的代码问题解决。


本文转自 lzf328 51CTO博客,原文链接:

http://blog.51cto.com/lzf328/1331607
相关文章
sign check fail:check Sign and Data Fail报错攻略
错误码: com.alipay.api.AlipayApiException: sign check fail: check Sign and ​Fail            报错原因:验签失败 ,未使用正确的支付宝公钥     在新版接口的调用过程中,常常出现此报错。
4846 12
|
网络安全 开发工具 git
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
3789 0
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
|
24天前
|
存储 网络安全
Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。
73 1
|
4月前
Error unprotecting the session cookie.The key {...} was not found in the key ring.
Error unprotecting the session cookie.The key {...} was not found in the key ring.
81 0
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
124 0
|
7月前
|
Linux Windows
WARNING: UNPROTECTED PRIVATE KEY FILE!
WARNING: UNPROTECTED PRIVATE KEY FILE!
61 0
使用 spritesmith 报错 Error: Invalid file signature
使用 spritesmith 报错 Error: Invalid file signature
125 0
使用 spritesmith 报错 Error: Invalid file signature
|
NoSQL Redis
node-redis:ErrorReply: ERR wrong number of arguments for ‘auth‘ command
node-redis:ErrorReply: ERR wrong number of arguments for ‘auth‘ command
417 0
|
安全 网络安全 开发工具
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
497 0
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
|
安全 应用服务中间件 测试技术
Tomcat、Invalid message received with signature、AjpMessage.processHeader Invalid message
Tomcat、Invalid message received with signature、AjpMessage.processHeader Invalid message
204 0