nerdexam
Microsoft

DP-300 · Question #87

Drag and Drop Question You have an Azure SQL Database instance named DatabaseA on a server named Server1. You plan to add a new user named App1 to DatabaseA and grant App1 db_datacenter permissions…

The correct answer is On the master database, run CREATE LOGIN [App1] WITH PASSWORD = 'P@aaWord!'.; On DatabaseA, run CREATE USER [App1] FROM LOGIN [App1].; On DatabaseA, run ALTER ROLE db_datareader ADD MEMBER [App1]. The correct sequence is: (1) Create a SQL Server login on the master database using 'CREATE LOGIN [App1] WITH PASSWORD', which establishes server-level credentials that can be reused across multiple databases. (2) Create a user in DatabaseA mapped to that login using 'CREATE…

Submitted by neha2k· Mar 6, 2026Implement and manage database security in Azure SQL Database, including creating server-level logins, database users, and role assignments to control access across multiple databases.

Question

Drag and Drop Question You have an Azure SQL Database instance named DatabaseA on a server named Server1. You plan to add a new user named App1 to DatabaseA and grant App1 db_datacenter permissions. App1 will use SQL Server Authentication. You need to create App1. The solution must ensure that App1 can be given access to other databases by using the same credentials. Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. Answer:

Exhibit

DP-300 question #87 exhibit

Answer Area

Drag items

On the master database, run CREATE LOGIN [App1] FROM EXTERNAL PROVIDER.On DatabaseA, run CREATE USER [App1] WITH PASSWORD = '@ssWord!'.On DatabaseA, run ALTER ROLE db_datareader ADD MEMBER [App1];On the master database, run CREATE LOGIN [App1] WITH PASSWORD = 'P@aaWord!'.On DatabaseA, run CREATE USER [App1] FROM LOGIN [App1].

Correct arrangement

  • On the master database, run CREATE LOGIN [App1] WITH PASSWORD = 'P@aaWord!'.
  • On DatabaseA, run CREATE USER [App1] FROM LOGIN [App1].
  • On DatabaseA, run ALTER ROLE db_datareader ADD MEMBER [App1];

Explanation

The correct sequence is: (1) Create a SQL Server login on the master database using 'CREATE LOGIN [App1] WITH PASSWORD', which establishes server-level credentials that can be reused across multiple databases. (2) Create a user in DatabaseA mapped to that login using 'CREATE USER [App1] FROM LOGIN [App1]', linking the database user to the server-level login. (3) Grant the role using 'ALTER ROLE db_datareader ADD MEMBER [App1]' to assign the appropriate permissions. This approach satisfies the requirement that App1 can access other databases using the same credentials, because a server-level login (not a contained database user) is portable across databases on the same server.

Topics

#Azure SQL Database#SQL Server Authentication#Database Security#Logins and Users

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice