nerdexam
Microsoft

70-451 · Question #91

You are a database developer. You develop solutions by using SQL Server 2008 in an enterprise environment. You plan to create a stored procedure that queries a sales table and produces forecast…

The correct answer is B. Include an EXECUTE AS OWNER clause when you create each stored procedure. See the full explanation below for the reasoning.

Question

You are a database developer. You develop solutions by using SQL Server 2008 in an enterprise environment. You plan to create a stored procedure that queries a sales table and produces forecast data. You do not have administrative permissions, and you are not the owner of the database. You have permissions to create stored procedures. Users will only have permissions to execute your stored procedures. You need to ensure that users can execute the stored procedures. What should you do?

Options

  • ASet the TRUSTWORTHY property of the database to ON.
  • BInclude an EXECUTE AS OWNER clause when you create each stored procedure.
  • CInclude an EXECUTE AS CALLER clause when you create each stored procedure.
  • DInclude a SETUSER statement before you query the sales table in each stored procedure.

How the community answered

(39 responses)
  • A
    13% (5)
  • B
    74% (29)
  • C
    8% (3)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 70-451 Practice