Skip to content Skip to sidebar Skip to footer

Logins , Users, Permissions In Sql Express 2005 , With Diagram , Flowchart

I want to create logins & users for my c#.net winforms application which uses sql server 2005 express .& upto my knowledge i have built these steps. So , I want to ask tha

Solution 1:

I'm changing my whole answer. I really think it's not a good idea to grant uses direct login access to your db. The DB is not the right "choke point" for permissions. Create one user with the total db permissions you will need. Then grant the users features in your application based on their role in the application (tracked in a table in your database).

There are a lot of problems with creating 1 login per user in your database. A few are 1. Maintainance nightmare 2. Now your users can log in to your db directly if they can get connected to it with Management studio or some other tool.

  1. To elaborate . . . create one login for your application. Name it something like MyApplicationUser.
  2. Create a table in your application to track the roles that each user could be part of. This can also track the features they are allowed to have in your application (though probably in a different table)
  3. When the user starts the application, the application is opend using the same db credentials (MyApplicationUser)
  4. Now you know who the user is (based on NTID, or application login), and you can give them the features that are appropriate to them in the application)

Post a Comment for "Logins , Users, Permissions In Sql Express 2005 , With Diagram , Flowchart"