Monday, March 19, 2012

Encrypted Stored Procs.

Hi Everybody,
I have a quick question as follows:
Does it take longer to create a stored procedure when it is encrypted versus
when it is not encrypted?
Thanks.
Regards,
Soumitra BanerjeeHi Soumitra,
To create an encrypted Stored procedure include the keyword "With
encryption".
For more details visit the following URL :
http://msdn.microsoft.com/library/d...-us/tsqlref/ts_
create_4hk5.asp
Example :
The WITH ENCRYPTION clause hides the text of a stored procedure from users.
This example creates an encrypted procedure, uses the sp_helptext system
stored procedure to get information on that encrypted procedure, and then
attempts to get information on that procedure directly from the syscomments
table.
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'encrypt_this' AND type = 'P')
DROP PROCEDURE encrypt_this
GO
USE pubs
GO
CREATE PROCEDURE encrypt_this
WITH ENCRYPTION
AS
SELECT *
FROM authors
GO
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.|||Do you mean create as in CREATE PROCEDURE.. or in executing?
Persumably there is some tiny overhead in encrypting the text for syscomment
s but you won't notice it. I've never seen nor head of performance issues. O
ut of curiosity, why the question?
Alicia
http://www.sqlporn.co.uk

No comments:

Post a Comment