PrepAway - Latest Free Exam Questions & Answers

Which three Transact-SQL segments should you use to dev…

DRAG DROP
You administer a Microsoft SQL Server database named Contoso. You create a stored procedure named
Sales.ReviewInvoice by running the following Transact-SQL statement:

You need to create a Windows-authenticated login named ContosoSearch and ensure that ContosoSearch canrun the Sales.ReviewInvoices stored procedure.
Which three Transact-SQL segments should you use to develop the solution? To answer, move the appropriate
Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the
correct order.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

7 Comments on “Which three Transact-SQL segments should you use to dev…

  1. KTF says:

    The question need to be fixed
    but I think the best answer is

    1. CREATE LOGIN Contoso\SalesGroup FROM WINDOWS
    for 2 reasons. First, he asked for Windows-Authenticated name.
    Second, the next step won’t work with login named ContosoSearch and there is no alternative in the options to make it work

    2. Correct

    3.
    GRANT EXECUTE ON Sales.ReviewInvoice TO Contoso\SalesGroup
    GRANT SELECT ON Sales.SalesInvoice TO Contoso\SalesGroup
    simply because you can’t GRANT SELECT ON a stored procedure
    the answer is grant execute on the store procedure and select on the table/view that is called by the stored procedure




    6



    0
    1. apple_lover says:

      I tried it and the answer above is incorrect, if you choose GRANT EXECUTE, SELECT Sales.ReviewInvoices stored procedure will return an error. You should try it in actual to check first.




      0



      0

Leave a Reply