PrepAway - Latest Free Exam Questions & Answers

Which Transact-SQL statement should you use?

You administer a Microsoft SQL Server 2012 database named Contoso that contains a single userdefined database role namedBillingUsers.
All objects in Contoso are in the dbo schema.
You need to grant EXECUTE permission for all stored procedures in Contoso to BillingUsers.
Which Transact-SQL statement should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
CREATE ROLE proc_caller
GRANT EXECUTE ON Schema: : dbo TO proc_caller
ALTER ROLE proc_caller ADD MEMBER BillingUsers

B.
GRANT EXECUTE ON INFORMATION_SCHEMA.ROUTINES TO BillingUsers

C.
EXEC sp_addrolemember ‘executor’, ‘BillingUsers’

D.
CREATE ROLE proc_caller
GRANT EXECUTE ON ALL PROCEDURES TO proc_caller
ALTER MEMBER BillingUsers ADD TO ROLE proc_caller

5 Comments on “Which Transact-SQL statement should you use?

  1. Rafael DBA says:

    For sure is A.

    Theres no sintax for “on all precedures to…”

    Try it on SQL server:

    Msg 156, Level 15, State 1, Line 2
    Incorrect syntax near the keyword ‘TO’.
    Msg 343, Level 15, State 1, Line 3
    Unknown object type ‘MEMBER’ used in a CREATE, DROP, or ALTER statement.




    1



    0

Leave a Reply