We have some sensitive IPR in some Stored Procedures. We encrypt the stored procedures. However, at the point they are created, they are plain text.
Is there anyway we can prevent SQL Server Profiler from being used to monitor the execution of the Create procedure statements?
(Yes, I know that you can also un-encrypt the stored procedures reasonably easily)
Not in a generic manner.
You can restrict the access to the database server to trusted users but trying to achieve perfect (or even descent) security using code obfuscation is a pointless waste of time and resources in most (if not all) cases.
Edit: there is one thing that you can do to make it a tinny little bit harder to see exactly what is happening in you code is to write it as a CLR stored procedure. It's not going to slow someone competent very much but it'll make it harder to follow what's going on just using the SQL debugger.