Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Posts
    2

    Unanswered: Encrypting stroredprocedures

    Anybody can help me for encrypting & decrypting Stored procedures...

  2. #2
    Join Date
    Jan 2002
    Posts
    12
    This is straight from the help file.

    If you are creating a stored procedure and you want to make sure that the procedure definition cannot be viewed by other users, you can use the WITH ENCRYPTION clause. The procedure definition is then stored in an unreadable form.

    After a stored procedure is encrypted, its definition cannot be decrypted and cannot be viewed by anyone, including the owner of the stored procedure or the system administrator

    Here is an example:
    CREATE PROCEDURE FactorAddRecord2
    (
    @iSecurityId dINTEGER,
    @iFactor dNUMERIC_15_8
    )
    /**************************************************
    DESCRIPTION:
    AUTHOR:
    DATE:
    CHANGE LOG:
    **************************************************/
    WITH ENCRYPTION
    AS
    DECLARE @vExchangeRateId dINTEGER;
    BEGIN
    BEGIN TRANSACTION
    UPDATE
    Security
    SET
    Current_Factor_N8 = @iFactor
    WHERE
    Security_Id = @iSecurityId;

    INSERT INTO Data_Point_Hist
    (As_Of_Date,
    Security_Id,
    Factor_N8)
    VALUES
    (dbo.fn_Today(),
    @iSecurityId,
    @iFactor);
    COMMIT;
    RETURN 0;

    END

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740

    change owner for many tables

    oooops - was supposed to be a new post: DELETED
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •