{"id":412,"date":"2012-06-19T17:52:08","date_gmt":"2012-06-19T12:22:08","guid":{"rendered":"http:\/\/pramodsingla.wordpress.com\/?p=412"},"modified":"2012-06-19T17:52:08","modified_gmt":"2012-06-19T12:22:08","slug":"sql-server-find-currently-running-jobs","status":"publish","type":"post","link":"https:\/\/pramodsingla.com\/?p=412","title":{"rendered":"SQL Server -Find currently Running jobs"},"content":{"rendered":"<p style=\"text-align:justify;\">If you want to find the currently running jobs then following queries will help you.<\/p>\n<ul>\n<li style=\"text-align:justify;\">\n<h5><strong>List All Currently Running SQL Agent Jobs:<\/strong><\/h5>\n<\/li>\n<\/ul>\n<pre style=\"padding-left:60px;\">exec msdb..sp_help_job @execution_status=1<\/pre>\n<ul style=\"text-align:justify;\">\n<li>\n<h5><strong>List Extra Information about your Job:<\/strong><\/h5>\n<\/li>\n<\/ul>\n<pre style=\"padding-left:60px;\">exec msdb..sp_help_job @Job_name=&lt;yourjobname&gt;<\/pre>\n<ul style=\"text-align:justify;\">\n<li>\n<h5><strong>Possible values of @execution_status:<\/strong><\/h5>\n<\/li>\n<\/ul>\n<div style=\"text-align:justify;\">\n<table style=\"padding-left:60px;\">\n<tbody>\n<tr>\n<th style=\"text-align:center;\"><span style=\"color:#800000;\"><strong>Value<\/strong><\/span><\/th>\n<th style=\"text-align:center;\"><span style=\"color:#800000;\"><strong>Description<\/strong><\/span><\/th>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>0<\/strong><\/td>\n<td style=\"text-align:left;\">Returns only those jobs that are not idle or suspended.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>1<\/strong><\/td>\n<td style=\"text-align:left;\">Executing.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>2<\/strong><\/td>\n<td>Waiting for thread.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>3<\/strong><\/td>\n<td style=\"text-align:left;\">Between retires.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>4<\/strong><\/td>\n<td>Idle.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>5<\/strong><\/td>\n<td>Suspended.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;\"><strong>7<\/strong><\/td>\n<td style=\"text-align:left;\">Performing completion actions.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align:justify;\"><strong>Links :\u00a0<\/strong>http:\/\/msdn.microsoft.com\/en-us\/library\/ms186722(SQL.105).aspx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to find the currently running jobs then following queries will help you. List All Currently Running SQL[&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[143,156,159],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pramodsingla.com\/index.php?rest_route=\/wp\/v2\/posts\/412"}],"collection":[{"href":"https:\/\/pramodsingla.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pramodsingla.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pramodsingla.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pramodsingla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=412"}],"version-history":[{"count":0,"href":"https:\/\/pramodsingla.com\/index.php?rest_route=\/wp\/v2\/posts\/412\/revisions"}],"wp:attachment":[{"href":"https:\/\/pramodsingla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pramodsingla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pramodsingla.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}