decrypt stored procedure
-
Thursday, August 18, 2011 8:09 AM
Hello,
I was reading an article on how to decrypt objects in database. I encrypt a stored procedure using the following statement
CREATE
PROCEDURE sp_update_salary WITH ENCRYPTION AS DECLARE @perIncrease AS INT DECLARE @employeeid AS INT UPDATE [AdventureWorks].[HumanResources].[Employee] SET salary= salary *@perincrease WHERE employeeid =@employeeid
but i do not know how to decrypt it again in order to modify the stored procedure
Thank in advance for your help
All Replies
-
Thursday, August 18, 2011 8:38 AM
Hi Khaled,
You can not decrypt the code except you have original code written some where. Insted of encrypting stored procedure you can revoke view definition permission user rights. go through below article suggest main big problems with encrypting stored procedure.
http://www.mssqltips.com/tip.asp?tip=1828
Also follow the below thread.
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/09d4e473-6331-48de-867f-ef00fd05806f
Regards,
Balwant.
Failure in Life is failure to try... PGDCA-98(South Gujarat University),MCTS (SQL Server 2005) -
Thursday, August 18, 2011 10:20 AM
Hallo Khaled,
there are hundreds of thousends of tools available in the net.
Some are for free, most have to be paid.
http://optillect.com/products/sqldecryptor/overview.html
I would recommend to have your devs stored as a file or in a SourceControl-Tool (like SourceSafe)
To revoke VIEW DEFINITION is o.k. for "normal" users but not for db_owner.
So this recommendation is - from my point of view - to a good idea.
Uwe Ricken
MCITP Database Administrator 2005
MCITP Database Administrator 2008
MCITS Microsoft SQL Server 2008, Database Development
db Berater GmbH
http://www-db-berater.de- Proposed As Answer by retracement Friday, August 19, 2011 7:58 PM
- Marked As Answer by KJian_ Thursday, August 25, 2011 8:56 AM
-
Friday, August 19, 2011 2:59 PM
You may find this article from SQL Server Magazine useful, although it only includes through SQL Server 2005. (But I do not know of any further steps for stored procedure encryption taken in 2008.)
http://www.sqlmag.com/article/encryption2/decrypt-sql-server-objects
Hope it helps,
RLF- Proposed As Answer by retracement Friday, August 19, 2011 7:58 PM
- Marked As Answer by KJian_ Thursday, August 25, 2011 8:56 AM
-
Tuesday, March 06, 2012 2:12 PM
this is the best one i have ever seen khalid
go this link and download decryptsql
http://www.devlib.net/buy-decryptsql.htm?source=d
thanks

