SQLS2K: How to encrypt and decrypt objects

  • Hello,

    I've got tree questions that i'll appreciate if you can answer.

    Theres a lot of sp that were encrypted by dba that its not working with us and anyone knows the code of this procedures.

    I need to see the code of this procedures because the performance of the machine is completely horrible after 7 pm and cant delete them because i really don't know what they are doing.

    - How can i see the code of encrypted stored procedures?

    - Is there any tool that i can use to decrypt this objects?

    - How can i create encrypted objects?

    The code that appears is as follow:

    drop procedure [owner].[procedure_name]

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_NULLS ON

    GO

    setuser N'[owner]'

    GO

    /****** Encrypted object is not transferable, and script can not be generated. ******/

    GO

    setuser

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    SET ANSI_NULLS ON

    GO

    Thanks and regards

    JMSM 😉

  • There are utilities available to decrypt stored procs. You should be able to find one with google easily.

    Other option, run profiler and trace the sp_statement starting event. Then run the encrypted proc. Profiler will show you the commands run.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • Thanks a lot Gila.

    Hope one day be as useful to you as you being useful to me.

    Once more thanks a lot.:satisfied:

    Regards,

    JMSM 😉

  • Pleasure.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply