简体   繁体   English

存储过程显示为已加密

[英]Stored Procedures showing as encrypted

Currently the SQL Server 2012 Database I am working on has aa number of stored procedures, some encrypted and some not. 当前,我正在使用的SQL Server 2012数据库具有许多存储过程,有些存储过程加密而有些则没有。

Right now when I log in as most users only the expected stored procedures are showing up as encrypted. 现在,当我以大多数用户身份登录时,只有预期的存储过程显示为已加密。 (The lock by them) (他们的锁)

The weird thing is that for one user nearly all the other stored procedures that are not encrypted are showing up as so. 奇怪的是,对于一个用户,几乎所有其他未加密的存储过程都这样显示。

I was even able to verify using code 我什至可以使用代码进行验证

var encryptedSPs = db.StoredProcedures.Cast<StoredProcedure>()
            .Where(x => !x.IsSystemObject && x.IsEncrypted).ToList();

That code is giving me different counts for different users. 该代码为不同的用户提供了不同的计数。 As far I know SP encryption is not set at the user level. 据我所知,SP加密不是在用户级别设置的。

Any idea what is going on? 知道发生了什么吗?

Figured it out. 弄清楚了。

The user had lost the permission "VIEW DEFINITION". 用户失去了“查看定义”权限。 This caused the stored procedures to appear to be encrypted even though they were not. 这导致存储的过程看起来好像是加密的,即使没有加密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM