4

Assuming you're creating a database user mapped to a SQL login, is there any valid reason to ever assign the user a different name than the login?

I'm not really asking this from the perspective of "oh, it's silly that they make me type the same name twice in the ssms gui when creating a database user", but from the perspective that there may actually be a legitimate use case scenario and I'd like to know what it is if so.

1 Answer 1

4

No good reason, going forward. In ancient versions of SQL Server it was allowed to map multiple Logins to the same Database User. But database roles, introduced in SQL Server 7 are better, so the functionality was deprecated and removed.

But

  1. There's no good practical reason to have different names.
  2. It's common practice to reuse the Login name for the User.
  3. It's obscure functionality likely to cause confusion, which for security-related stuff is especially bad.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.