exam questions

Exam 70-765 All Questions

View all questions & answers for the 70-765 exam

Exam 70-765 topic 2 question 10 discussion

Actual exam question from Microsoft's 70-765
Question #: 10
Topic #: 2
[All 70-765 Questions]

DRAG DROP -
You deploy a new Microsoft Azure SQL Database instance to support a variety of mobile applications and public websites. You plan to create a new security principal named User1.
The principal must have access to select all current and future objects in a database named Reporting. The activity and authentication of the database user must be limited to the Reporting database.
You need to create the new security principal.
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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1, Step 2:
First you need to create a login for SQL Azure, it's syntax is as follows:
CREATE LOGIN username WITH password='password';
This command needs to run in master db. Only afterwards can you run commands to create a user in the database.
Step 3:
Users are created per database and are associated with logins. You must be connected to the database in where you want to create the user. In most cases, this is not the master database. Here is some sample Transact-SQL that creates a user:
CREATE USER readonlyuser FROM LOGIN readonlylogin;
References:
https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
strider500
4 years, 6 months ago
Correctn answer is (assuming Reorting database is contained ) 1. ...create connection to to the Reporting database 2. create run CREATE USER User1 WITH pasword = 'Pa$$w0rd' 3. exec sp_addrolemember 'db_datareader', 'User1' source: https://docs.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-making-your-database-portable?view=sql-server-2016
upvoted 4 times
StillConfused
4 years, 6 months ago
Agree, because of "The activity and authentication of the database user must be limited to the Reporting database", *authentication* won't be limited to Reporting DB unless it's a contained DB.
upvoted 2 times
cmolina16
4 years, 5 months ago
No agree, read again the answer and you will see. "select reporting db and run exec sp_add......" read again
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...