Microsoft
98-364 · Question #48
You have developed a stored procedure named usp_GetEmp that accepts an employee number as a parameter and retrieves the details about the employee from the CurrentEmp table of a database named…
The correct answer is A. Modify usp_GetEmp to include the With Execute As Owner clause. See the full explanation below for the reasoning.
Question
You have developed a stored procedure named usp_GetEmp that accepts an employee number as a parameter and retrieves the details about the employee from the CurrentEmp table of a database named Employees. You have tested it, and it works exactly as you expected. Later, another employee tries to use the stored procedure and receives the following error:
"The SELECT permission was denied on the object 'CurrentEmp', database 'Employees.schema 'dbo' ". What should you do to resolve the problem?
Options
- AModify usp_GetEmp to include the With Execute As Owner clause.
- BModify usp_GetEmp to include the With Execute As Caller clause.
- CGrant the employee the SELECT permission on the CurrentEmp table.
- DGrant the employee the SELECT permission on the Employees database.
How the community answered
(58 responses)- A74% (43)
- B14% (8)
- C9% (5)
- D3% (2)
Community Discussion
No community discussion yet for this question.