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.