Friday, August 18, 2006 4:17 AM
I know that we can CREATE PROCEDURE procedure_name WITH ENCRYPTION.
But how about if I want encrypt existing stored procedures?
Which command should I use ?
Friday, August 18, 2006 6:53 PM
how about scripting them all off, and using the following:
IF EXISTS (SELECT name
WHERE name = N'<procedure_name, sysname, proc_test>'
AND type = 'P')
DROP PROCEDURE <procedure_name, sysname, proc_test>
add your encryption, and you're all set......
Friday, August 18, 2006 9:43 PMThere is no easy way. You have to script out the SQL modules (Create or Alter) and then add the WITH ENCRYPTION option to the definitions. There is no DDL to just encrypt SQL modules without specifying the definition. Why do you want to encrypt your code? The encryption mechanism is really obfuscation and it is a reversible encryption. So it is possible to get the original code from the encrypted content. If you want to protect your code then you should look at legal binding terms and copyright mechanisms.
Tuesday, August 22, 2006 5:11 AMAs of now, I mark this thread as no answer.