What is the appropriate SQL commands (not through the GUI) to add a windows user account to permissions on a SQL Server 2008 Database? ie.. I want to give someone read access and another person read/write..
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Django check user group permissions
- Bulk update SQL Server C#
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
- How can I convert a OLE Automation Date value to a
It's a two-step process:
first, you need to create a login for that user, based on its Windows credentials
This sets up the basic permission to even connect to your SQL Server
once you have a login, you can create a user in each database where you want to give that login rights to do something:
to grant read permissions on every table in your database, assign the
db_datareader
role to that userto grant read and write permissions on every table in your database, assign both the
db_datareader
as well as thedb_datawriter
role to that userif you need more fine grained control over what tables can be read from or written to, you need to manage permissions manually, e.g. by creating your own database roles and assigning grants to those roles, and then adding your users to those app-specific roles you created