70-465 · Question #99
You use a contained database named ContosoDb within a domain. You need to create a user who can log on to the ContosoDb database. You also need to ensure that you can port the database to different…
The correct answer is C. Domain user. To enable a user to log on to a contained database within a domain while ensuring portability without additional server-level user configurations, a Windows domain user should be created directly within the database.
Question
Options
- AUser mapped to a certificate
- BSQL user without login
- CDomain user
- DSQL user with login
How the community answered
(59 responses)- A2% (1)
- B10% (6)
- C83% (49)
- D5% (3)
Why each option
To enable a user to log on to a contained database within a domain while ensuring portability without additional server-level user configurations, a Windows domain user should be created directly within the database.
While a type of contained database user, creating a user mapped to a certificate involves managing certificates and does not directly leverage existing domain identities for simplified portability within a domain context.
A SQL user without login is a contained database user authenticated by a password stored within the database, which does not utilize Windows domain authentication or simplify portability for domain users across servers.
For a contained database, a Windows domain user can be added directly to the database without requiring a separate server-level login. This ensures that the user's authentication relies on the domain, making the database portable across different SQL Server instances within the same domain without needing to recreate or reconfigure server-level logins, thus fulfilling the portability requirement.
A SQL user with login requires a server-level login, which explicitly ties the user to a specific SQL Server instance and violates the requirement for a contained database that needs portability without additional server-level configurations.
Concept tested: SQL Server contained database user types and portability
Source: https://learn.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-create?view=sql-server-ver16
Topics
Community Discussion
No community discussion yet for this question.