This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Must connect to SQL Server using the Dedicate Admin Connection, eg "admin:localhost". Verified with SQL Server 2012. | |
-- Originally from Williams Orellana's blog: http://williamsorellana.org/2012/02/decrypt-sql-stored-procedures/ | |
DECLARE @ObjectOwnerOrSchema NVARCHAR(128) | |
DECLARE @ObjectName NVARCHAR(128) | |
SET @ObjectOwnerOrSchema = 'dbo' | |
SET @ObjectName = 'PROCEDURE NAME HERE' | |
DECLARE @i INT |