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

Encrypt Stored Procedure Expand / Collapse
Author
Message
Posted Wednesday, January 16, 2013 10:56 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 21, 2013 4:00 AM
Points: 21, Visits: 77
I would like to encrypt SP, but I do not know how security different between
1 general procedure with "WITH ENCRYPTION" : display on Object Explorer windows
2 temp procedure with "WITH ENCRYPTION" : NOT display
3 temp procedure without "WITH ENCRYPTION" : NOT display

CREATE PROCEDURE EncryptSP
WITH ENCRYPTION

AS
BEGIN
... Statement ...
END


CREATE PROCEDURE #EncryptSP
WITH ENCRYPTION

AS
BEGIN
... Statement ...
END


CREATE PROCEDURE #EncryptSP
AS
BEGIN
... Statement ...
END


So, I have a question that
1. Is it enough to encrypt with "WITH ENCRYPTION"?
2. Does the temp procedure both encrypt and not encrypt, can decrypt by 3rd party tools?
Post #1408005
Posted Wednesday, January 16, 2013 11:23 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:45 AM
Points: 39,878, Visits: 36,222
It's not actually encryption, it's obfuscation. Give me a DB with encrypted procs, I'll give you back the decrypted versions in maybe 10 minutes, if that.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1408013
Posted Wednesday, January 16, 2013 11:38 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 21, 2013 4:00 AM
Points: 21, Visits: 77
I see, so How can I encrypt the stored procedure?
Post #1408020
Posted Wednesday, January 16, 2013 12:59 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:45 AM
Points: 39,878, Visits: 36,222
You can't.

You can encrypt the entire DB with TDE, that's protection against backups been stolen. Otherwise, secure the server, limit access to SQL and make sure you have your permissions set correctly.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1408049
Posted Wednesday, January 16, 2013 2:55 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, September 19, 2014 2:34 PM
Points: 12,923, Visits: 12,342
The bigger question is what do you hope to gain by encrypting the procedure code? I doubt you are doing anything so revolutionary that you need to protect how you manipulate the data. The sql is not really very important...now the data itself is another story.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1408088
Posted Wednesday, January 16, 2013 4:01 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, September 19, 2014 7:27 PM
Points: 7,107, Visits: 12,657
A plug for our sponsors:

redgate SQL Prompt can optionally decrypt objects compiled WITH ENCRYPTION for you right within an SSMS Query window. Encrypted objects appear decrypted when you hover over then and click on the quickview to see the definition.







__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato


  Post Attachments 
2.jpg (67 views, 93.25 KB)
1.jpg (64 views, 36.18 KB)
3.jpg (64 views, 36.55 KB)
Post #1408108
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse