[dba-SQLServer] Stored Procedures - How can the code be protected?

Stuart McLachlan stuart at lexacorp.com.pg
Mon Aug 17 05:45:27 CDT 2009


You use the SQL Server's built in permissions.
If they are not authorised to do so, they can't view the definition.

As a general rule, users should only have Execute rights on SPs.

-- 
Stuart


On 17 Aug 2009 at 19:45, Borge Hansen wrote:

> Hi all,
> 
> How do I protect code in a Stored Procedure from being looked at, messed
> with, lifted out and used by others - not authorized to do so?
> 
> I've read you can encrypt SP code - but that there are easy ways to get back
> the code in a readable form.
> 
> Then there is the possbility of creating the SP in an CLR assemby:
> "embedding" the SP in C# code and ending up with the SP in a .dll file -
> etc... I think they are called "managed stored procedures"
> 
> Question:
> Is this the way to fully protect / secure the SP code from the eyes of
> others??
> 
> If so, does anyone know of a few good links that will get me up to speed in
> writing and presenting Stored Procedures in a SQL db as CLR assemblies -
> "Managed Stored Procedures" ?
> 
> I have VS2008 up and running finally  ... and SQL2005 ...
> 
> I should add that I have read about .NET but never really gotten down to
> writing code using Visual Studio and the .net platform -
> 
> regards,
> borge
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 





More information about the dba-SQLServer mailing list