How to encrypt a SQL Server stored procedure

by Al Beecy January 22, 2009
Here is an example of how to encrypt a SQL Server stored procedure. Before doing this, make sure your unencrypted version is stored in source control or somewhere else safe because once created with the "WITH ENCRYPTION" feature, you will no longer be able to access the version stored in SQL Server.

CREATE PROCEDURE dbo.MyStoredProcedure
WITH ENCRYPTION
AS
BEGIN
    SELECT 'my data'
END

Applies to: SQL Server 2005/2008

Tags: ,

SQL Server

Comments

January 23, 2009 #

DotNetKicks.com

Trackback from DotNetKicks.com

How to encrypt a SQL Server stored procedure

DotNetKicks.com

January 23, 2009 #

Web Development Community

Trackback from Web Development Community

SQL Server: How to encrypt a stored procedure

Web Development Community

June 15, 2009 #

DotNetShoutout

How to encrypt a SQL Server stored procedure

Thank you for submitting this cool story - Trackback from DotNetShoutout

DotNetShoutout

Powered by BlogEngine.NET1.5.0.7 | Theme by Mads Kristensen