Reputation: 425
I want to improve the security of my database, so I want to know what I should do.
And how I can encrypt the stored procedures.
Thanks in advance...
Upvotes: 0
Views: 143
Reputation: 103338
Use WITH ENCRYPTION
ALTER PROCEDURE [dbo].[sp_ProcedureName]
WITH ENCRYPTION
AS
BEGIN
SET NOCOUNT ON;
SELECT ...
END
Never encrypt development procedures though as you cannot decrypt these easily!
Upvotes: 2
Reputation: 498904
You will need to write a procedure that decrypts the stored procedure and execute it - anyone with access to the database will also be able to access this procedure, so you gain nothing by encrypting a stored procedure.
There are well established practices regarding database security - follow them.
Some of them are:
Upvotes: 6