recently i needed to query a table , however i was denied "Select " permissions (because permissions had not yet been exported as the db was).
Should my application enable for administrator to grant permissions , if that error occurs OR should permission granting be done through MS SQL server only?
(is it unnecessary,security risk or good practice?)

-Thanks :icon_mrgreen:

8 Years
Discussion Span
Last Post by sknake

It depends. If your application installs the SQL Server instance and maintains it then you can do what you need to ensure the application functions.

If you allow users to use any network instance of SQL then you're best off not to automate any security modifications as you risk pissing off a DBA.

I have both cases -- In the case where my app installs the DB I require the app to run with dbo permissions so it can adjust the database accordingly -- both schema and permissions.

In the case where I don't install the DB I don't make any changes, I just flash informative error messages with what they need to do to fix the problem.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.