Hi we have completed a database migration from visual foxpro to sql server 2008 .
Now we are thinking security how to hide our scripts and stored Procedures
because we need to run a script and Stored Procedures and then finally
delete or hide those.please guide us please
You can encrypt stored procedures using WITH ENCRYPTION option. You can use Policy Management on SQL Server 2008 to make sure stored procedures are kept encrypted.
The following thread gives you an script to encrypt your stored procedures, but at the end of that thread you will find also some posts about this encryption can be reversed.
Create roles on your databases and assign proper permissions to view the definition of stored procedures, to alter and create them, to execute them, etc. Assign users to those roles.
Please consider also using CLR integration. This is probably the best way to protect your code.
Hope this helps.