SQL Server R2 assigning permissions to users

Source: Internet
Author: User

  background

Before we wrote the program directly to the database access, and did not set what permissions and so on, but in the process of managing the database, we sometimes need to control the access of a user to the database, such as can only see a few tables belonging to its management, or have a crud (Increase ( Create), read (Retrieve) (re-get data), updates (update) and delete) permissions, or smaller granularity, all in all, for system security and ease of operation.

Introduction to system requirements

Recently has been doing the university cloud platform this project, our team does is one of the subsystem is the performance management system, different from the previous development mode, this time we use the Sub-module development is to divide the granularity becomes smaller, so there is a benefit, is responsible for their respective development and debugging.

But this also brings a problem, that is, the database is common, we are using the EF mapping is generated from the database entity, if you are logged in with an account, then see will be the same number of tables, in fact, this is not necessary, so the database provides us with better convenience, That is, assigning different permissions to individual users.

Operation Steps? Database-level logins are completed as shown in:  

? Specific steps  

  Enter the database-level security settings----New login name,

  First step: In the General tab, fill in:


Server role does not have to be reset

  Step Two: User Mappings tab


Security objects do not have to be set

  Step Three: Status tab


At this point, we have set the permissions for this user.

? Assignment of user Rights  

Select one of the tables, the permission settings, must be the database that was just set up, otherwise it is not visible.


At this point, the appropriate permission settings can be

Now that we have finished, we can enter with the login name and password we have set, and see just a few of the tables we have allocated. Try it yourself.

Summary

Here just do some of the simplest database user permissions settings, which are used in the development process, some other more complex settings, in the process will be gradually applied and understood.

SQL Server R2 assigning permissions to users

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.