Decrypting SQL Server Database Objects

 
     
  By Rance Lucifinil
 
   
     
  Decrypting SQL Server database objects

Problem
SQL Server offers a way to encrypt your Stored Procedures to make sure that prying eyes can not see what is going on behind the scenes. The problem with this method is that it is not a very secure way of encrypting the contents of your stored procedures. In addition, since SQL Server basically stores your source code vs. a compiled version most people rely on the code that is in the database server instead of moving the code to a source control application. Because of the need to access this code this tip outlines various methods of decrypting your encrypted database objects.

Solution
There are basically two ways that you can go about doing this; 1) you can write your own process or 2) you can download and/or purchase a tool that was developed to do just this. Various tools exist that allow you to decrypt your database objects.

So how does encryption work?

Basically it is a simple option that you use when creating your objects. Here is a basic example using the "WITH ENCRYPTION" option.
CREATE PROCEDURE uspGetAuthors
WITH ENCRYPTION
AS
SELECT *
FROM authors
GO

After I create this stored procedure, when I try to view the contents of the stored procedure using the following command,
sp_helptext uspGetAuthors

I get this error: "The object comments have been encrypted."

Also, when trying to look at this stored procedure in Enterprise Manager I get the following error message.

To decrypt the stored procedure I used this script. This is very simple to install and use and allows you to decrypt stored procedures, view and triggers and best of all it is free. To use this script I first created it and then ran the following command.
exec DECRYPT2K 'uspGetAuthors', 'S'

When I issue the sp_helptext statement again this is the results I get, so we can see that it decrypted the stored procedure and it is now available for editing both with Query Analyzer or Enterprise Manager.
CREATE PROCEDURE uspGetAuthors

AS
SELECT *
FROM authors

So as you can see there is not a lot to decrypting your database objects. Also, encrypted objects are not really that secure, so this should not be your only method for securing code that you do not want others to see.

Please check more information at http://www.idooencryption.com

 
   
  Article Source: http://interpret.zar.vg   
     
  About The Author
www.idooencryption.com
 
     
 
More Articles about: Programming
 
 
 
  • Joomla as a Robust CMS
  • Developing iPhone Apps To Make Money
  • The Basics Of SharePoint WCM Development
  • Understanding SharePoint Development Security
  • Joomla Facebook Connect: Now As You Like It Open Graph Tags
  • Sharepoint Composite Offering A Suite Of Innovative Business Solutions
  • Enhancing The Performance Of SharePoint Across WAN
  • Build Great Application For iPhone Using COCOS2D
  • Understanding SharePoint Users' Work Systems
  • iPhone's Photo Feature
  • Change Paper Documents To Text!
  • iPhone SDK
  • PHP Tutorials for Beginners
  • 9 Tricks To Make Windows XP Running Gentle
  • Persona of a Professional PHP Programmer and Developer
  • The Advantages of Hiring A Good Web Designer Web Development Group For Your Enterprise
  • Unveal Useful Info. About How To Control Your Computer With A Programming Language
  • Find The Most Convenient Model To Hire PHP Programmer From Dedicated Hiring Platforms
  • iPhone application development at affordable cost
  • Dedicated Web developer web programmer Available for Hiring
  • Hire Ruby on Rails developer for ROR web application development
  • Web Development Company in India offers expert PHP Programmers
  • Hire PHP Developers for your PHP Based Dyanamic Website Development
  • We call iPhone app market a Grand Slam for the iPhone developers since its launch
  • 9 Tips To Keep Windows XP Running Stable
  •  
     
         
         
        © 2012 interpret.zar.vg