Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
na2173
Starting Member
38 Posts |
Posted - 2002-05-01 : 11:29:39
|
| i have 100 sp in my database, i need to encrypt the stored procedures all at one time, i don't want to go and edit manually each sp and add with Encryption, is there any way to do this, if so can you please help me out |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-01 : 11:32:02
|
| As far as I know, you'll have to do each one manually. It won't take that long, you can probably add the WITH ENCRYPTION clause to all 100 in about 10-15 minutes.MAKE SURE YOU KEEP A COPY OF THE UNENCRYPTED CODE! |
 |
|
|
sandesh_moghe
Constraint Violating Yak Guru
310 Posts |
Posted - 2002-05-02 : 03:44:41
|
One simple way is there.....(Take Back Up Before trying this )1. Generate SQL Script for all SPs without DROP option.2. Copy that .sql file to NotePad3. Find CREATE PROCEDURE and replace with ALTER PROCEDURE4. Find "AS" and replace with "WITH ENCRYPTION AS" (Be Careful while doing this,dont replace "As" of variable declaration.)5. Copy the whole Script to QA and Run it.---------------------------Sandesh - The Messanger |
 |
|
|
|
|
|