SQL Server Performance

Stored Procedure decrypt

Discussion in 'SQL Server 2005 General DBA Questions' started by kvreddy, May 11, 2009.

  1. kvreddy New Member

    Hi Experts

    I have some stored procedures which are entrypted in the database, i would like to dycrypt and see the procedure. Is it posisble?

    please suggest me what way i can see the procedure .

    thanks
    kv reddy
  2. MohammedU New Member

  3. FrankKalis Moderator

    True, just search the internet. You won't get any advise on such tools or even how to use them from a serious forum though.
  4. dhamu294 New Member

    i hope we can use exec DECRYPT2K sp for decrypting.
    but i am not sure where to get the source of this. in google many recommend for this. if you come across any thing, just let me know.
  5. Adriaan New Member

    By decrypting you're probably violating the license for the use of the database where the encrypted sproc is sitting.
  6. MohammedU New Member

  7. kvreddy New Member

    Hi Freinds,
    Thanks for the reply.
    i have receved lot of suggestion, but no use as so far.
    i am able to see half of the procedure with some tools, but have to buy them, then only can see total proc.
    Thanks for the suggestion, let me know if you find any new links
    thanks so much
    kv
  8. Sandy New Member

    [quote user="kvreddy"]
    Hi Freinds,
    Thanks for the reply.
    i have receved lot of suggestion, but no use as so far.
    i am able to see half of the procedure with some tools, but have to buy them, then only can see total proc.
    Thanks for the suggestion, let me know if you find any new links
    thanks so much
    kv
    [/quote]
    My 1st question for you is why you want to go for decrypt?
    Is all database object is got Encrypted OR you want to keep security on your database objects?
    Thanks,
    Sandy.
  9. kvreddy New Member

    Hi Sandy,
    Actually i am trying to identify functionality/business logic of existing SPs, then i wanted to merge and write new procs. all most all the procs are encrypted.
    Please let me know if you have suggestion.
    thanks
    kv
  10. kvreddy New Member

    Hi Experts
    I am able to see part of the procedure of the encryption proc with tools which i downloaded some, just i would like to know that what kind of decryption method they might used for decrypt the code.
    any idea? please let me know.
    Thanks
    kv
  11. FrankKalis Moderator

    If the source code of that tool is not available, if might be better if you ask the guys who made this tool. [;)]
  12. Sandy New Member

    Dear KV,
    Please find the script for Dycrypt Stored Procedure in SQL 2000. It will works fine in SQL 2000.
    NOTE: It will not work in SQL 2005 Because of SQL 2005 SP Encrypted Script is not allowed to Add in SysComment table.
    Please let me know if you have any query.
    Thanks,
    Sandy.
  13. SantoshKumar New Member

    Sandy,
    EXCELLENT SCRIPT.....[:)]
    I WAS JUST SEARCHING FOR THIS.
    AND THE UNIT TEST CASE IS REALLY AWESOME.
    Rerards,
    Santosh
  14. kvreddy New Member

    Hi Sandy,
    Thanks for the reply, i was checked with this script, but did'nt work bacause my database is SQL 2005, is there any way to decrypt the procs.
    DecryptSQL tool able to show part of the SP, i donno what kind of logic or commands they were used.
    please let me know if you have any idea.
    thanks
    kv
  15. Greg Larsen New Member

  16. Greg Larsen New Member

    Sorry for the blank post. But have you tried RedGate's SQL Data Compare. If I recall correctly it can decrypt encrypted stored procedures
  17. FrankKalis Moderator

    [quote user="Greg Larsen"]
    Sorry for the blank post. But have you tried RedGate's SQL Data Compare. If I recall correctly it can decrypt encrypted stored procedures
    [/quote]
    I guess you have "SQL Compare" in mind instead of "SQL Data Compare", right?
    Doh, I didn't notice this option and I just tried that here and it seems that you need to have higher permissions than being db_owner. So, no way for me.
  18. Greg Larsen New Member

    Yep that would be SQL COMPARE. I had data on the mind. I always run it with SysAdmin rights. Kind of make sense if you think about what it take to encyrpt the procedures.
  19. dhamu294 New Member

    if we have only one row in syscomments this is working, if we have more than that it is giving error. how to handle it. can you please give a solution

Share This Page