Querying Microsoft SQL Server 2012/2014 — Question 13

You administer a Microsoft SQL Server database that has Trustworthy set to On. You create a stored procedure that returns database-level information from
Dynamic Management Views. You grant User1 access to execute the stored procedure. You need to ensure that the stored procedure returns the required information when User1 executes the stored procedure. You need to achieve this goal by granting the minimum permissions required. What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

Answer options

Correct answer: D, E

Explanation

The correct answers, D and E, involve granting User1 roles that allow them to execute the stored procedure with the necessary permissions. Options A, B, and C suggest creating new logins or modifying the procedure in a way that would not achieve the goal with minimum permissions, making them less efficient solutions.