nerdexam
Microsoft

70-458 · Question #90

You administer a Microsoft SQL Server 2012 database that has Trustworthy set to On. You create a stored procedure that returns database-level information from Dynamic Management Views. You grant…

The correct answer is B. Modify the stored procedure to include the EXECUTE AS OWNER statement. C. Create a SQL Server login that has VIEW SERVER STATE permissions. See the full explanation below for the reasoning.

Question

You administer a Microsoft SQL Server 2012 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.)

Options

  • ACreate a SQL Server login that has VIEW SERVER STATE permissions.
  • BModify the stored procedure to include the EXECUTE AS OWNER statement.
  • CCreate a SQL Server login that has VIEW SERVER STATE permissions.
  • DGrant the db_owner role on the database to User1.
  • EGrant the sysadmin role on the database to User1.

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    71% (25)
  • D
    9% (3)
  • E
    17% (6)

Community Discussion

No community discussion yet for this question.

Full 70-458 Practice