Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

What Is the Purpose of WITH ENCRYPTION? Expand / Collapse
Author
Message
Posted Monday, June 16, 2008 3:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 29, 2013 3:13 PM
Points: 2, Visits: 32
Can someone please help me understand the usefulness of encrypting a stored procedure?
Post #517905
Posted Monday, June 16, 2008 3:30 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, July 21, 2014 7:33 AM
Points: 1,140, Visits: 963
I see this mostly used in "packaged" applications that have a SQL backend. It's so you can't use the logic in their sprocs. I have rarely seen this used in "in house" applications
Post #517917
Posted Monday, June 16, 2008 4:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 29, 2013 3:13 PM
Points: 2, Visits: 32
Thanks for that. To recap, it makes sense to encrypt client or distributed object, not necessarily objects that will remain on a central server, even a serve to which those clients my connect?
Post #517933
Posted Tuesday, June 17, 2008 7:03 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, July 21, 2014 7:33 AM
Points: 1,140, Visits: 963
If you want to hide the text from anyone who has access to view the object definition, that is when you will want to use encryption.
Post #518191
Posted Tuesday, June 17, 2008 7:13 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:53 AM
Points: 1,030, Visits: 2,794
so i fyou have written your own appication then you may want to encrypt your SP's etc so your customers cannot see the underlying code...

Gethyn Ellis

gethynellis.com
Post #518205
Posted Friday, July 4, 2008 3:51 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 25, 2010 6:09 AM
Points: 1,621, Visits: 409
Hi

At times, it is needed that you encrypt the text of stored procedures containing sensitive information. SQL Server provides the WITH ENCRYPTION to encrypt the text of the stored procedure.

CREATE procedure [dbo].[Ten Most Expensive Products Encyrpt]
WITH ENCRYPTION AS
SET ROWCOUNT 10
SELECT Products.ProductName AS TenMostExpensiveProducts, Products.UnitPrice
FROM Products
ORDER BY Products.UnitPrice DESC

Once the stored procedure has been created WITH ENCRYPTION, attempts to view the stored procedure returns a message specifying that the text is encrypted:

EXEC sp_helptext usp_SEL_EmployeePayHistory

'The text for object 'Ten Most Expensive Products Encyrpt' is encrypted.'

One note of caution. Save the original text of the stored procedure before encrypting it, as there is no straightforward way to decode the encrypted text. One hack is to attach a debugger to the server process and retrieve the decrypted procedure from memory at runtime.

Check out the below link
http://www.sqlservercurry.com/2008/02/how-to-encrypt-stored-procedure-in-sql.html

Thanks -- Vj
http://dotnetvj.blogspot.com


Thanks -- Vijaya Kadiyala
www.dotnetvj.com
SQL Server Articles For Beginers



Post #528775
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse