Fishy wrote:
How would I prevent a user from using Query Analyser or Enterprise Manager from running sps or messing with my tables?
Aside from not installing SQL QA or SQL EM on the users machine, you cant really. But, IMO, application roles as defined by SQL Server is a PITA.
I think you need to ask yourself, "How would someone ever learn the credentials to access the system?" So, you might store the connection string in a config file. If this is what you do, then I would encrypt it, so that users could not see it. If your app is a web app, then the only people with access to the web.config file, should, hopefully, be people who have administrative rights to that machine. If you sitll dont want administrators to have access, then encrypt the data in the web.config file.
The microsoft configuration management application block makes encrypting config files fairly simple.
Lastly, before you ship your code, you can write a simple TSQL Script, to Modify all tables, views, store procs, triggers, and user defined functions to use the "With Encryption" keyword to keep people from using EM or QA to get at that stuff.