Du leder efter WITH ENCRYPTION
, som krypterer koden bag din lagrede proc.
CREATE PROCEDURE usp_MyProc
WITH ENCRYPTION
AS
SELECT *
FROM myTable
Bare en advarsel, fra MSDN:
Nogle referencer og yderligere læsning:
- http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user -definerede-funktioner/
- http://msdn.microsoft.com/en-us/ library/ms187926.aspx