Re: Setting Encryption to 1000 Stored procedures
From: Erland Sommarskog (sommar@algonet.se)
Date: 07/26/02
- Next message: Seth Sanusi: "Patched Reactions"
- Previous message: Peter Saddow [MS]: "Re: Problem Applying Hotfix 8.00.0650"
- In reply to: Germán Cabrera H.: "Setting Encryption to 1000 Stored procedures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Erland Sommarskog <sommar@algonet.se> Date: Thu, 25 Jul 2002 22:08:04 +0000 (UTC)
[posted and mailed, please reply in news]
Germán Cabrera H. (gcabrera@pulsar.cl) writes:
> I have about 1000 stored procedures in my db and I wont to modify all of
> them to include "with encryption".
>
> I have tried to form the sentence: "ALTER PROC " + @PROCNAME + " WITH
> ENCRYPCION AS " + @PROCTEXT
Well you need to consider the parameters too.
> My problem is to form @PROCTEXT. I have tried using sp_helptext, with no
> good results.
If you don't have your stored procedures on disk and under the version
control, this is the time to do.Script the objects from enterprise manager;
I believe that you can get one object per file. Then again, for the task of
adding WITH ENCRYPTION, it may be simpler to have all in one file.
You need to use some good script language do this: find CREATE/ALTER
PROCEDURE, and then get the through the parameter list until you find
AS. Beware if that there is a WITH RECOMPILE, you should add
", ENCRYPTION", that is not another WITH.
Once your through with that exercise, it will be a much simpler task to
split the big file in one per SQL object, and check in to the version-
control system of your choice.
Note also that if you start to change procedures in SQL Server without
saving them to disk, YOU WILL NOT BE ABLE TO ACCESS YOUR CODE, once
you got that WITH ENCRYPTION in place; all you will see "procedure has
been encrypted".
-- Erland Sommarskog, SQL Server MVP sommar@algonet.se Books Online (updated!) for SQL 2000 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
- Next message: Seth Sanusi: "Patched Reactions"
- Previous message: Peter Saddow [MS]: "Re: Problem Applying Hotfix 8.00.0650"
- In reply to: Germán Cabrera H.: "Setting Encryption to 1000 Stored procedures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|