Problem solve Get help with specific problems with your technologies, process and projects.

Hiding the source code of a stored procedure

I am trying to hide the source code for a stored procedure that will be used by a customer. The customer is an owner of the database where the SP resides. I have tried the 'with_encryption' clause, although as an owner of the database, the customer can easily decrypt the SP with source code that is out there on the Web. I am in need of a solution where my customer can access and use a SP that I write, although not view the source code.

My first question would be why. You cannot hide the database structure from them, therefore, they can figure out...

how to access their data directly if they choose to. If it is encrypted, they have performance problems, and you are not available, their entire environment comes to a screeching halt with you left on the hook as responsible for it because your code did not leave them any options. Your software copyright provides legal protection for your work, and the notice that you should have included with the software should have a clause preventing them from using your work. Additionally, encrypting objects can have your software rejected by many potential customers who do not allow such things to exist in their environments. I know that I do not and never will allow software to be deployed in a production environment that I run if it is encrypted or otherwise hidden, as it becomes nearly impossible to manage. Besides there not being any upside that I can possibly think of, there isn't any way that I'm aware of to accomplish this in SQL Server.

For More Information

This was last published in July 2003

Dig Deeper on SQL Server Stored Procedures

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.