PrepAway - Latest Free Exam Questions & Answers

You need to provide User1 access to execute Procedure1 by allocating only the required permissions

You administer a SQL Server 2008 instance that contains a database named DB1.
The DB1 database contains the following stored procedure. (Line numbers are included for
reference only.)

When a user named User1 attempts to invoke Procedure1, the following exception is raised:
“Msg 262, Level 14, State 1, Procedure Procedure1, Line 5 CREATE TABLE permission
denied in database ‘DB1’.”
You need to provide User1 access to execute Procedure1 by allocating only the required
permissions.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Grant the ALTER permission on the Sales schema to User1.

B.
Grant the CREATE TABLE permission and allow User1 to drop the Sales.Table1 table.

C.
Insert the WITH EXECUTE AS ‘dbo’ clause between lines 01 and 02.

D.
Insert the EXECUTE AS USER = ‘dbo’ statement between lines 02 and 03.


Leave a Reply