PrepAway - Latest Free Exam Questions & Answers

Which permission or permissions should you assign to UserC?

You administer a Microsoft SQL Server 2012 database. The database has a table named Customers
owned by UserA and another table named Orders owned by UserB. You also have a stored
procedure named GetCustomerOrderInfo owned by UserB. GetCustomerOrderInfo selects data from
both tables.
You create a new user named UserC.
You need to ensure that UserC can call the GetCustomerOrderInfo stored procedure. You also need
to assign only the minimum required permissions to UserC.
Which permission or permissions should you assign to UserC? Choose all that apply.

PrepAway - Latest Free Exam Questions & Answers

A.
The Select permission on Customers

B.
The Execute permission on GetCustomerOrderInfo

C.
The Take Ownership permission on Customers

D.
The Control permission on GetCustomerOrderInfo

E.
The Take Ownership permission on Orders

F.
The Select permission on Orders

Explanation:
http://msdn.microsoft.com/en-us/library/ms188676.aspx
http://stackoverflow.com/questions/2212044/sql-server-how-to-permission-schemas
http://sqlservercentral.com/blogs/steve_jones/2012/03/14/ownership-chains-in-sql-server

22 Comments on “Which permission or permissions should you assign to UserC?

  1. Shak says:

    I don’t believe this answer is correct. I’m not sure about ownership chaining, but I do know that if a user does not have select permission on a table, but does have execute permission on a stored procedure that selects from that table, then the user is able to execute the stored procedure.

    Hence, I would go with B only




    0



    0
      1. Khalid says:

        Logically, the correct answer is A and B. But the question says the stored procedure selects data from BOTH the tables CUSTOMER and ORDERS. Now, userb owns ORDERS but not CUSTOMER. So in order to create the said stored procedure in the first place, userb has to have SELECT permission on the CUSTOMER table, otherwise SQL wont create the procedure failing with a permission related error. Granted the stored procedure is created, userb now has SELECT permission on both the tables, in which case, the execute permission would suffice for userc to successfully execute the stored procedure without explicitly providing him SELECT permission on the CUSTOMER table.

        I hope this clarifies. Someone tell me the RIGHT answer 🙁




        0



        0
  2. Shak says:

    Correction – I originally tried this on table objects owned by dbo (default). If this is the case, then all that is needed is execute permission on the sp that access the sp.

    However, if the table is an a schema owned by another user, then the UserC would need explicit select permission on the table as well as execute on the stored procedure.

    So, my corrected answer: A,C,F




    0



    0
  3. peter.pan says:

    This question still actual in real test. I try A, B, but i dont know if it is correct.
    New questions from Gonzalez is realy from actual exam test, i can confirm it.




    0



    0

Leave a Reply