tags:

views:

19

answers:

1

I'm a novice C# programmer, but have done a fair amount of SQL development. I've built a few C# Windows apps which essentially install SQL code (e.g., stored procedures, triggers) into a user's database. I want to prevent users/customers from running the app and installing my proprietary SQL code into multiple SQL servers and/or databases. I want the user/customer to purchase an additional license for each database on which they want to install my SQL code via my app.

Can someone point me to the easiest or best way to do this?

Thanks in advance!

A: 

hmmm I'm not sure on how possible this is. I would expect that any DBA worth their salt would be able to query the database and produce the create statements required for all tables, stored procs and triggers.

I commonly like to have as much logic in the code as possible and away from the DB (for different reasons [testability]) but I'd think that shifting some the logic into the app and obfuscating would be a stronger way to keep "trade secrets".

Dylan
MS SQL allows for encryption of the SQL code for stored procedures, triggers, etc., and for my purposes, that encryption is secure enough. However, I need to prevent users from running my app against multiple servers and databases so that that SQL code can only be installed on 1 database on 1 server per license.