MS SQL Basics Tutorial: Database Users

Source: Internet
Author: User
Tags what sql

Introduction to 14.3.1 Database users

A database user is used to indicate which database a person can access. In a database, the user ID uniquely identifies a user, the user's access rights to the data, and all relationships to the database objects are controlled by the user account, which is always based on the database, that is, two different databases can have two identical user accounts.

In the database, the user account and the login account are two different concepts. A valid login account only indicates that the account has been authenticated by NT or SQL Server. However, it does not indicate that it can do some or some operation on database data and data objects, so a login account always corresponds to one or more database user accounts (which must be in a different database). This allows access to the database. For example, the login account SA is automatically associated with each database user dbo.

Typically, a database user account is always associated with a login account, with one exception, that is the guest user.

Why does SQL Server do this when the guest user is added to master, pubs, tempdb, and Northwind data while installing the system? Let's take a look at what SQL Server does after the user successfully logs on to SQL Server through NT authentication or SQL Server authentication:

Note: Normally we can delete or add a guest user as we delete or add other users, but we cannot remove the user from the master or tempdb database, and the guest user is not present in a newly created database unless it is added.

14.3.2 Manage Database Users

1 managing database users with SQL Server Enterprise Manager

Create a new database user to use SQL Server Enterprise Manager to create a new database user performs the following steps:

(1) Start SQL Server Enterprise Manager and click the ' + ' flag next to the login server.

(2) Open the database folder and open the databases to which you want to create users.

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.