February 19, 2004 at 11:39 am
How can you depploy stored procedures to a client's installation, but not allow them to read the code? Can you distribute it in binary form somehow?
Thanks
steve
February 19, 2004 at 11:58 am
Check out http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=6&messageid=99545#bm99584 for some opinions on this. Basically use WITH ENCRYPTION option when creating the stored procs or use some 3rd party tool like SQL Shield.
Francis
February 20, 2004 at 7:02 am
In Developing a lot of .NET Applications, I have come to realize this is a simple process. Well, simple, yet difficult.
In .NET, it is possible to create "simple" Deployment projects. These Deployment Projects can use "Custom Actions". In MSDN, there is an Article about creating a Custom Action for installing a database. The Custom Action DLL stores all the Scripts into the Binary DLL, so there are no external files floating around.
The one Bad thing I noticed about this is that you absolutely must execute a Script per "GO" Statement. For example, most Scripts are one big @ss file! This cannot be done using the Custom Action because the SqlClient.SqlCommand does not support "GO" Statements. You must separate each Script between "GO" Statements into separate files.
You may be able to do this a different way by extracting the Binary Text files into a "*.txt" file during runtime and then Shell out to "OSQL" and pass it the Script file...I have never tried this.
Goo luck!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply