Difference between a User and a Login in SQL Server(SQL Server 中用户和登录的区别)
问题描述
我最近遇到了 SQL Server 的许多不同领域,而这些领域我通常不会搞砸.其中一个让我感到困惑的是登录和用户领域.看来这应该是一个很简单的话题……
I have recently been running into many different areas of SQL Server that I normally don't mess with. One of them that has me confused is the area of Logins and Users. Seems like it should be a pretty simple topic...
似乎每个登录名只能有1个用户,每个用户只能有1个登录名.
It appears that each login can only have 1 user and each user can only have 1 login.
一个登录名可以关联到多个表,从而将该用户关联到多个表.
A login can be associated to multiple tables thus associating that user to many tables.
所以我的问题是为什么还要有登录名和用户?他们似乎几乎是一回事.有什么区别,或者我似乎缺少什么?
So my question is why even have a login and a user? they seem to be pretty much one in the same. What are the differences, or what is it that I seem to be missing?
推荐答案
登录"授予主体进入 SERVER.
A "Login" grants the principal entry into the SERVER.
用户"将登录条目授予单个数据库.
A "User" grants a login entry into a single DATABASE.
一个登录"可以与多个用户关联(每个数据库一个).
One "Login" can be associated with many users (one per database).
上述每个对象都可以在其自己的级别上授予权限.有关每个的解释,请参阅以下文章
Each of the above objects can have permissions granted to it at its own level. See the following articles for an explanation of each
- 主体
- 数据库用户
这篇关于SQL Server 中用户和登录的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:SQL Server 中用户和登录的区别
- 更改自动增量起始编号? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- SQL 临时表问题 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
