什么是SQL Server 2005中带有挂锁图标的存储过程?

问题描述:

我正在管理的一个数据库中看到一些存储过程,这些存储过程带有常规的存储过程图标,但旁边有一个小挂锁.
我看到的区别是我无法修改"它们,并且如果我尝试编写脚本,它会说:

I see some stored procedures in one database I'm managing that have the regular stored procedure icon, but with a little padlock next to them.
The differences I see is that I can't "modify" them, and if I try to script them, it says:

文本已加密.

Text is Encrypted.

这是因为这些是CLR存储过程吗?
它们是常规"过程,但以某种方式被加密/保护吗?
有什么方法可以获取这些代码(T-SQL或IL)?

Is this because these are CLR stored procedures?
Are they "regular" procedures, but encrypted/protected somehow?
Is there any way to get to the code of those (either the T-SQL or the IL)?

挂锁表示已使用WITH ENCRYPTION提示对存储过程进行了加密(有关更多信息,请参见BOL中的CREATE PROC).

The padlock means that the stored procedure has been encrypted using the WITH ENCRYPTION hint (see CREATE PROC in BOL for more information).

不是表示它是CLR存储过程.

It doesn't mean that it's a CLR stored procedure.

这是《 SQL Server杂志》上的一篇文章,内容涉及如何解密对象使用WITH ENCRYPTION提示进行加密.

Here's a SQL Server Magazine article on how to decrypt objects which are encrypted using the WITH ENCRYPTION hint.

还有一些第三方工具也可以做同样的事情-本机sproc加密并不意味着具有很强的加密水平.

There are also third party tools which do the same thing - native sproc encryption is not meant to be a strong level of encryption.

这里是另一个,但我尚未对其进行测试在SQL Server 2005或更高版本上.

Here's another, but I haven't tested it on SQL Server 2005 or later.