Sql-server – How to query the names of encrypted stored procedures

sql serverstored-procedures

What query will identify the names of stored procedures which are encrypted? Here's what I got so far –

select ROUTINE_NAME
from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_TYPE = 'PROCEDURE'
-- need another condition here to identify just the encrypted SPROC's
order by ROUTINE_NAME asc

Thanks in advance.

Best Answer

SELECT name FROM sys.procedures
WHERE OBJECTPROPERTY([object_id], 'IsEncrypted') = 1;