Which Transact-SQL command should you run?

Posted by: Pdfprep Category: DP-300 Tags: , ,

Question Set 2

You have an Azure SQL database named DB3.

You need to provide a user named DevUser with the ability to view the properties of DB3 from Microsoft SQL Server Management Studio (SSMS) as shown in the exhibit. (Click the Exhibit tab.)

Which Transact-SQL command should you run?
A . GRANT SHOWPLAN TO DevUser
B . GRANT VIEW DEFINITION TO DevUser
C . GRANT VIEW DATABASE STATE TO DevUser
D . GRANT SELECT TO DevUser

Answer: C

Explanation:

The exhibits displays Database [State] properties.

To query a dynamic management view or function requires SELECT permission on object and VIEW SERVER STATE or VIEW DATABASE STATE permission.

Reference:

https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-properties-options-page

Leave a Reply

Your email address will not be published.