Saturday , June 10 2023

How To See Current Queries On SQL Server


With the help of the following query, you can access the answers to the questions listed below.

You can filter the query as you like by opening the command that was added and currently inactive.

  1. What queries are coming into your database right now?
  2. How long does the queries work?(total_elapsed_s)
  3. What queries are causing the lock and Which queries are waiting for the lock?(blocking_session_id)
  4. What is the percentage of backups completed?(percent_complete)
  5. What is the last type of wait for queries?(last_wait_type)
  6. Which query is waiting in suspend mode and which query is in running mode?(status)
  7. Which query was sent from which program?(program_name)
  8. Which query was sent from which host?(host_name)
  9. Which query started when?(start_time)
  10. How much memory does the queries use?(memory_mb)



About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *