Your company has a SQL Azure subscription.
You implement a database named Database1. Database1 has two tables named Table1 and
Table2.
You create a stored procedure named sp1. Sp1 reads data from Table1 and inserts data into
Table2.
A user named User1 informs you that he is unable to run sp1.
You verify that User1 has the SELECT permission on Table1 and Table2.
You need to ensure that User1 can run sp1. The solution must minimize the number of
permissions assigned to User1.
What should you do?
A.
Changesp1torunasthesaUser.
B.
GrantUser1theEXECUTEpermissiononsp1.
C.
AddUser1to the db_datawriter role.
D.
Grant User1 the INSERT permission on Table2.
Explanation:
http://msdn.microsoft.com/en-us/library/ms191291.aspx
B
You don’t know if sp1 and Table2 have the same owner.
So User1 is not able to write to Table2
The solution must minimize the number of permissions assigned to User1.
So it could not be ‘C+B’ or ‘D+B’
So it must be ‘A+B’