exam questions

Exam 70-764 All Questions

View all questions & answers for the 70-764 exam

Exam 70-764 topic 1 question 110 discussion

Actual exam question from Microsoft's 70-764
Question #: 110
Topic #: 1
[All 70-764 Questions]

You administer a Microsoft SQL Server 2016 database named Contoso that contains a single user-defined database role namedBillingUsers.
All objects in Contoso are in the dbo schema.
You need to grant EXECUTE permissions for all stored procedures in Contoso to BillingUsers.
Which Transact-SQL statement should you use?

  • A. EXEC sp_addrolemember'db_procexecutor', 'BillingUsers'
  • B. CREATE ROLE proc_caller GRANT EXECUTE ON ALL PROCEDURES TO proc_caller ALTER MEMBER BillingUsers ADD TO ROLE proc_caller
  • C. GRANT EXECUTE ON Schema::dbo TO BillingUsers
  • D. GRANT EXECUTE ON Contoso::dbo TOBillingUsers
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
Guest
Highly Voted 5 years, 7 months ago
Would expect option C: with Schema::dbo https://dba.stackexchange.com/questions/154841/sql-server-which-role-grants-permission-to-execute-all-stored-procedures
upvoted 8 times
...
jlcesco01
Most Recent 4 years, 5 months ago
grant execute on cadastro::dbo to BillingUsers; Msg 102, Level 15, State 1, Line 4 Incorrect syntax near 'cadastro'. grant execute on schema::dbo to BillingUsers; Command(s) completed successfully.
upvoted 1 times
...
Chela
4 years, 7 months ago
D is correct. If you grany execute to schema, the user will have access to databases added to the instance
upvoted 1 times
Hoglet
4 years, 5 months ago
EXECUTE us a database level permission, so is applied to the current database when executed. So no, it will not do as you say
upvoted 1 times
...
...
henriquecof
4 years, 10 months ago
Resposta correta C.
upvoted 2 times
...
TheSwedishGuy
5 years, 5 months ago
Yes, since the default schema is dbo, and Contoso is using this schema, the correct answer is C.
upvoted 2 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 ...