为什么我们需要启用可信赖的选项在sql server中创建程序集之前..... [英] Why we need to Enable the Trustworthy option Before creating the Assembly in sql server .....

查看:95
本文介绍了为什么我们需要启用可信赖的选项在sql server中创建程序集之前.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI People,



我正在寻找这个值得信赖的选项,为什么在我们的数据库中创建程序集之前必须启用它。我已经尝试了值得信赖的选项与OFF我正在低于错误。



在镜像异步模式中,我们也必须使用此选项,而镜像服务器上线时。 />


请建议我使用这个值得信赖的选项的实际原因是什么。











消息10327,等级14,状态1,行1

为装配创建装配' encdec'失败,因为汇编'encdec'未获得PERMISSION_SET = UNSAFE的授权。如果满足以下任一条件,则授权程序集:数据库所有者(DBO)具有UNSAFE ASSEMBLY权限,并且数据库具有TRUSTWORTHY数据库属性;或者使用具有UNSAFE ASSEMBLY权限的相应登录的证书或非对称密钥对程序集进行签名。如果已还原或附加此数据库,请确保将数据库所有者映射到此服务器上的正确登录名。如果没有,请使用sp_changedbowner解决问题。











Regard's,

Thrilok,

SQL DBA。

HI People,

I am searching for this option trustworthy, why it has to be Enabled before creating assembly in our database. I have tried trustworthy option with OFF i am getting below Error.

In Mirroring Asynchronous mode also we have to use this option some where while mirror server getting online.

Please suggest me what is the actual reason to use this trustworthy option.





Msg 10327, Level 14, State 1, Line 1
CREATE ASSEMBLY for assembly 'encdec' failed because assembly 'encdec' is not authorized for PERMISSION_SET = UNSAFE. The assembly is authorized when either of the following is true: the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission. If you have restored or attached this database, make sure the database owner is mapped to the correct login on this server. If not, use sp_changedbowner to fix the problem.





Regard's,
Thrilok,
SQL DBA.

推荐答案

我猜微软很好地解释了这一点。



使用TRUSTWORTHY数据库设置的指南SQL Server [ ^ ]



使用Set database trustworthy for sql clr [ ^ ]



设置数据库可信赖或签署程序集 [ ^ ]
I guess Microsoft explains it quite well.

Guidelines for using the TRUSTWORTHY database setting in SQL Server[^]

using Set database Trustworthy on for sql clr[^]

Setting Database Trustworthy On or Signing Assemblies[^]


这篇关于为什么我们需要启用可信赖的选项在sql server中创建程序集之前.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆