简体   繁体   English

在一个SQL Server上拥有1000个SQL用户/登录名是否有性能方面的考虑?

[英]Are there performance considerations to having 1000's of SQL Users/Logins on one SQL Server?

We have a web application backed by a SQL Server database. 我们有一个由SQL Server数据库支持的Web应用程序。

Up until now, we've been using a SQL Membership Provider for Application level logins. 到目前为止,我们一直在使用SQL成员资格提供程序进行应用程序级别的登录。 Backend calls to the SQL Server use a single SQL Account in the connection string in the Web.config 对SQL Server的后端调用在Web.config的连接字符串中使用单个SQL帐户

A new compliance requirement from our customer states that all application users must have their own dedicated SQL account in the background. 客户提出的新的合规性要求指出,所有应用程序用户都必须在后台拥有自己的专用SQL帐户。

I've already prototyped this out and have a working version of it. 我已经对此进行了原型设计,并有一个有效的版本。 The DB connection context in the application is configured for the current user per session, and in the background there's a mapping between SQLMembership account -> DatabaseUser -> Sql Server Login. 应用程序中的数据库连接上下文是为每个会话的当前用户配置的,并且在后台SQLMembership帐户-> DatabaseUser-> Sql Server登录之间存在映射。 The password is calculatable as a SHA1 hash of the SQLMembership User Guid. 该密码可作为SQLMembership用户指南的SHA1哈希计算得出。

This all works fine, but I'm wondering if there are any performance considerations on the database as a result of having 1000's of Server Logins, Database Users (+ all the GRANT permissions) that go with it. 一切都很好,但是我想知道是否由于数据库具有1000个服务器登录名,数据库用户(以及所有GRANT权限)而导致性能问题。

The number of login IDs will not have any real impact on performance. 登录ID的数量不会对性能产生任何实际影响。 You'll likely end up with other issues -- managing all the logins, keeping the passwords secure etc. 您可能最终会遇到其他问题-管理所有登录名,确保密码安全等。

What will impact performance is having increased non-pooled connections to the database. 影响性能的是增加了与数据库的非池化连接。 Each connection will eat a small amount of RAM on the database server. 每个连接将占用数据库服务器上的少量RAM。

Finally, most applications do audit tracking at the application level, not at the database level. 最后,大多数应用程序在应用程序级别而不是数据库级别执行审计跟踪。 You'll need to make sure the database login is preserved throughout the application lifecycle (eg what happens if you do a restore?) 您需要确保在应用程序的整个生命周期中都保留了数据库登录名(例如,如果进行还原会怎样?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM