找不到非对称密钥——因为它不存在或您没有权限
我试图使用 CLR 通过 SQL 运行 .Net dll - 但我没有成功。
我按照此处的说明进行
操作我正在执行以下操作:
CREATE ASYMMETRIC KEY AKEY_SqlClr FROM EXECUTABLE FILE = 'C:\dlls\mySqlClr.dll'
工作正常并创建密钥,然后我尝试执行以下操作:
CREATE LOGIN SQLCLR_AsymKeyLogin FROM ASYMMETRIC KEY AKEY_SqlClr
我收到错误:
找不到非对称密钥“AKEY_SqlClr”,因为它不存在或您没有权限。
我怎么可能没有这个权限呢?我已验证我具有 CREATE LOGIN 权限。有什么想法吗?
I am trying to be able to run a .Net dll through SQL using the CLR - I am doing so unsuccessfully.
I am following the instructions here
So I am doing the following:
CREATE ASYMMETRIC KEY AKEY_SqlClr FROM EXECUTABLE FILE = 'C:\dlls\mySqlClr.dll'
Which works fine and creates the Key, then I try to do the following:
CREATE LOGIN SQLCLR_AsymKeyLogin FROM ASYMMETRIC KEY AKEY_SqlClr
And I get the error:
Cannot find the asymmetric key 'AKEY_SqlClr', because it does not exist or you do not have permission.
How could I not have permissions to this? I have verified that I have CREATE LOGIN permissions. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
登录名是服务器主体,因此不能从用户数据库中存储的密钥创建它们。您必须从
master
数据库中的程序集创建密钥:Logins are server principals and as such they cannot be created from keys stored in user databases. You must create the key from assembly in
master
database: