简体   繁体   中英

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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