Articles → SQL SERVER → Stored Procedure Encryption In SQL Server
Stored Procedure Encryption In SQL Server
Software Requirement
Prerequisite Knowledge
What Does Encryption Mean?
Syntax
CREATE PROC < PROC_NAME > [LIST OF INPUT VARIABLES] WITH ENCRYPTION AS < PROC_BODY >
Example
CREATE PROC sp_GetDBName @db_name varchar(100) WITH ENCRYPTION AS
SELECT
*
FROM
SYS.databases
Where
name = @db_name
Disadvantage Of Encrypting A Stored Procedure
- There is no simple way to get the stored procedure’s definition if somehow the proc gets deleted from hard disk
- Encryption requires an extended handshake and lots of CPU cycles. For high-volume sites, you need a high-performance CPU