What queries are being executed

Correct Answer for the following Question is given below

You administer a SQL Server 2014 instance.Users report that the SQL Server has seemed slow today. A large database was being restored for much of the day, which could be causing issues.You want to write a query of the system views that will report the following:Number of users that have a connection to the serverWhether a user’s connection is activeWhether any connections are blockedWhat queries are being executedWhether the database restore is still executing and, if it is, what percentage of the restore is complete.Which system objects should you use in your query to best achieve this task?* sys.dm_exec_requestsReturns information about each request that is executing within SQL Server.* sys.dm_exec_sessionsReturns one row per authenticated session on SQL Server. sys.dm_exec_sessions is a server- scope view that shows information about all active user connections and internal tasks. This information includes client version, client program name, client login time, login user, current session setting, and more.* sys.dm_exec_query_textReturns the text of the SQL batch that is identified by the specified sql_handle. sys.dm_exec_requests (Transact-SQL) sys.dm_exec_sessions (Transact-SQL)Incorrect:* sys.dm_exec_query_statsReturns aggregate performance statistics for cached query plans in SQL Server. The view contains one row per query statement within the cached plan, and the lifetime of the rows are tied to the plan itself.* sys.objectsContains a row for each user-defined, schema-scoped object that is created within a database.


What queries are being executed


sys.dm_exec_requests, sys.dm_exec_sessions, sys.objects

sys.dm_exec_sessions, sys.dm_exec_query_stats, sys.dm_exec_query_text,sys.objects

sys.sysprocesses, sys.dm_exec_query_text, sys.objects

sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_exec_query_text

Correct Answer

The Correct Answer for this Question is

sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_exec_query_text


The Question – What queries are being executed has been answered correctly and answers for the question is sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_exec_query_text

More about these Exams

These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.

We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.

you can find more here at mnccertified

Feel free to contact via comment or email.

Happy Learning

Cheers, Team MNCcertified

Leave a Comment