What should you use?

You are a database administrator for a company that has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database instances. The environment hosts several customer databases, and each customer uses a dedicated instance.

The environments that you manage are shown in the following table.

You need to monitor WingDB and gather information for troubleshooting issues.

What should you use?
A . sp_updatestats
B . sp_lock
C . sys.dm_os_waiting_tasks
D . sys.dm_tran_active_snapshot_database_transactions
E . Activity Monitor

Answer: B

Explanation:

The sp_lock system stored procedure is packaged with SQL Server and will give you insight into the locks that are happening on your system. This procedure returns much of its information from the syslock info in the master database, which is a system table that contains information on all granted, converting, and waiting lock requests.

Note: sp_lock will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. To obtain information about locks in the SQL Server Database Engine, use the sys.dm_tran_locks dynamic management view.

sys.dm_tran_locks returns information about currently active lock manager resources in SQL Server 2008andlater. Each row represents a currently active request to the lock manager for a lock that has been granted or is waiting to be granted.

References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-locktransact-sql

Latest 70-764 Dumps Valid Version with 451 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments