Answered decrypt stored procedure

  • 2011年8月18日 8:09
     
     

    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

全部回复

  • 2011年8月18日 8:38
     
     

    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)
  • 2011年8月18日 10:20
     
     已答复

    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
    • 已建议为答案 retracement 2011年8月19日 19:58
    • 已标记为答案 KJian_ 2011年8月25日 8:56
    •  
  • 2011年8月19日 14:59
     
     已答复

    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

    • 已建议为答案 retracement 2011年8月19日 19:58
    • 已标记为答案 KJian_ 2011年8月25日 8:56
    •  
  • 2012年3月6日 14:12
     
     

    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