RE: Programmatically decrypt stored procedure?

From: Mingqing Cheng [MSFT] (v-mingqc_at_online.microsoft.com)
Date: 06/26/04

  • Next message: Allan Mitchell: "Re: dts transaction"
    Date: Sat, 26 Jun 2004 04:09:52 GMT
    
    

    Hi FLX,

    Thanks for using MSDN Newsgroup!

    First of all, thanks the reply of MVP Allan Mitchell. If you only want to
    know how to decrypt stored procedure, to keep the integrity of newsgroup,
    it is highly appreciated if you could post your issue to the right place,
    which, I believe, will be better for you to discuss it with community
    members :)

    Secondly, from your descriptions, I understood that you may want to decrypt
    the stored procedures in DTS so that you could distribute the stroed
    procedures with DTS package, Have I understood you? If there is anything I
    misunderstood, please feel free to let me know:)

    Based on my scope, You can use the built-in function DECRYPT or your own
    decrypt function to create the encrypted stored procedure object when the
    SQL script is executed.

    1. In the Data Transformation Services (DTS) package:
          a. Copy the text of the encrypted stored procedure creation
    script(Use the Generate SQL Scripts dialog box) into the Execute SQL task.
          b. Set the owner and user password for the package.
          c. Distribute the package and give package users only the user
    password so that they can execute the package.

    NOTE: Users cannot open or edit the package because they do not have the
    owner password. For additional information, visit the following Microsoft
    Web site:
    Save DTS Package

    2. Create a database with encrypted objects and use this database for the
    distribution of encrypted objects. This distributed database can be
    attached or restored in the target server so that users can use the
    encrypted objects in the database.

    3. Write your own application to encrypt SQL Server script files and use
    custom logic to decrypt the encrypted scripts files. Additionally, run the
    decrypted scripts to create the encrypted objects by using the WITH
    ENCRYPTION clause.

    Hopt it helps and if you have any questions or concerns, please feel free
    to let me know :)

    Thank you for your patience and cooperation. If you have any questions or
    concerns, don't hesitate to let me know. We are here to be of assistance!
     

    Sincerely yours,

    Mingqing Cheng
    Microsoft Developer Community Support
    ---------------------------------------------------------------
    Introduction to Yukon! - http://www.microsoft.com/sql/yukon
    This posting is provided "as is" with no warranties and confers no rights.
    Please reply to newsgroups only, many thanks!


  • Next message: Allan Mitchell: "Re: dts transaction"

    Relevant Pages

    • Encryption
      ... Is there any way I can encrypt the stored procedure and that only I can only ... decrypt it none of other user can do? ... through third party tool, is there any other way I can encrypt my stored ...
      (microsoft.public.sqlserver.clients)
    • Re: Encryption
      ... can only decrypt it none of other user can do? ... stored procedure with my own key or like that? ... There are some thrid-party solutions for object encryption. ...
      (microsoft.public.sqlserver.clients)
    • Re: Encryption
      ... can only decrypt it none of other user can do? ... through third party tool, is there any other way I can encrypt my ... stored procedure with my own key or like that? ...
      (microsoft.public.sqlserver.clients)
    • how to decrypt the contents of ctext column in syscomments table
      ... i want to know how to decrypt the contents of ctext column in syscomments table through that can i get information about the parameters passed to stored procedure are mandatory or optional. ...
      (microsoft.public.sqlserver.server)
    • Re: decrypt a stored procedure
      ... "tommaso caldarola" wrote in message ... > Using SQL Server 2000 ... > I'd like to know if i can to decrypt a stored procedure!! ...
      (microsoft.public.sqlserver.security)