SQL Server : Encrypt / Protect stored procedure

2019-03-04 04:47发布

问题:

I am just wondering any good tools or software that you can recommend me to protect / encrypt my stored procedure that was developed on SQL Server 2008 R2 ?

I read about create stored procedure with encryption and is it possible to get it decrypted in case I have bugs in the program?

Also, came across CLR but I don't think I want to create a stored procedure in Visual Studio environment. Or I could be wrong.

Hope you can give me some advise while I am still researching on this topic.

Final objective would be, I don't want people to view my stored procedure and steal it for own use.

Thanks.

回答1:

It's not free, but you could give SqlShield a try

SQL Shield is a built-in tool for MSSQL, SQL Express and MSDE servers that offers hacker-proof encryption for triggers, views and procedures



回答2:

Can't you use WITH ENCRYPTION? For example

CREATE PROCEDURE #EncryptSP
WITH ENCRYPTION
AS
SELECT TOP 10 City
FROM Person.Address
GO

https://msdn.microsoft.com/en-gb/library/ms187926%28v=sql.105%29.aspx