Example Code for Stored Procedure Encryption - SQL SERVER
/*STEP1: create
stored procedure*/
create procedure SSP_SelectNo
with encryption
as begin
select 1 as no
end
go
/*STEP2: Execute
stored procedure*/
exec
SSP_SelectNo
go
/*STEP3: Get
Contents of stored procedure*/
sp_helptext 'SSP_SelectNo'
Code Explanation:
The keyword used to encrypt the stored procedure in sql server is "with encryption".
When you create a stored procedure with this keyword the stored
procedure source code cannot be seen anymore.So please save a copy of
your stored procedure before encrypting it. This will be useful when the
sql server is installed at the client end and can avoid source code
theft to some extent.
No comments:
Post a Comment