Microsoft
70-451 · Question #84
You have an instance of SQL Server 2008 that has xp_cmdshell enabled. You need to design a stored procedure that meets the following requirements: - Allows authorized users to retrieve lists of…
The correct answer is C. Create a procedure that uses EXECUTE AS OWNER. Call xp_cmdshell in the procedure. See the full explanation below for the reasoning.
Question
You have an instance of SQL Server 2008 that has xp_cmdshell enabled. You need to design a stored procedure that meets the following requirements:
- Allows authorized users to retrieve lists of files
- Minimizes permissions assigned to objects
- Minimizes security risks
What should you include in the design?
Options
- AGrant users permission to execute xp_cmdshell.
- BGrant users permission to execute sp_configure.
- CCreate a procedure that uses EXECUTE AS OWNER. Call xp_cmdshell in the procedure.
- DCreate a procedure that uses EXECUTE AS CALLER. Call xp_cmdshell in the procedure.
How the community answered
(22 responses)- A9% (2)
- B5% (1)
- C73% (16)
- D14% (3)
Community Discussion
No community discussion yet for this question.