Thursday, July 26, 2012

Alter Encrypted Stored Procedure

How to Alter Encrypted Stored Procedure ?

Yesterday i wrote about how to write a Stored procedure in a encrypted manner. If Stored Procedure or User Defined Function are created WITH ENCRYPTION keyword then  is not possible to decrypt it using SQL Server commands. It is always advised to save a copy of the script used to create the SP or UDF on other media source than SQL Server.

yesterday i wrote a script and now i want to modify my script.As i already say keep your original script, in my case my script was

CREATE PROCEDURE MyEncrypteSP_cnetcode
WITH ENCRYPTION
AS
SELECT *
FROM cnetcode.user
UNION
SELECT *
FROM cnetcode.user
GO
-- Execute SP
EXEC MyEncrypteSP_cnetcode
GO
To Alter Above Script just replace Alter command with Create and add your additional line of code.
Like this:-

ALTER PROCEDURE MyEncrypteSP_cnetcode
WITH ENCRYPTION
AS
SELECT *
FROM cnetcode.user
UNION
SELECT *
FROM cnetcode.user

         SELECT * FROM CNETCODE.NEWTABLE
GO
-- Execute SP
EXEC MyEncrypteSP_cnetcode
GO

:))

13 comments:

  1. I absolutely liked visiting everything that is written and given on your blog. Keep the information coming.

    ReplyDelete
  2. It is really good to visit to your post guys as we can get new information from here, Thanks for this share.

    ReplyDelete
  3. I was looking for this kind of post and finally got it from your website so thanks a lot for make my day. :)

    ReplyDelete
  4. That is an extremely smartly written article. I will be sure to bookmark it and return to learn extra of your useful information..

    ReplyDelete
  5. Amazing blog and very interesting stuff you got here! I definitely learned a lot from reading through some of your earlier posts as well and decided to drop a comment on this one!

    ReplyDelete
  6. Interesting. Your instructions look clear but I'm not very good at this so I hope this will work well for me. Thanks for the tips! :)

    ReplyDelete
  7. Hello there! Extremely good article! I m a usual website visitor (very much like addict :P) to your website. Keep up the fantastic work .

    ReplyDelete
  8. I read few articles on this internet site and I believe that your weblog is very interesting and contains lots of great information.

    ReplyDelete
  9. Thanks…:)Just desire to say your article is as astounding. The clarity in your post is simply cool and i could assume you are an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please continue the rewarding work.

    ReplyDelete
  10. Keep up the fantastic work , I read few articles on this internet site and I believe that your weblog is very interesting and contains lots of great information.

    ReplyDelete
  11. I can see that you possess a degree of expertise on this subject, I would very a lot like to hear much more from you on this subject matter – I have bookmarked this page and will return soon to hear additional about it.

    ReplyDelete
  12. I do not know whether it’s just me or if perhaps everyone else experiencing issues with your blog. It seems like some of the written text within your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well?

    ReplyDelete
  13. What you're saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I'm sure you'll reach so many people with what you've got to say.

    ReplyDelete