{"id":2045,"date":"2009-10-10T15:05:22","date_gmt":"2009-10-10T09:35:22","guid":{"rendered":"http:\/\/erpschools.com\/scripts\/get-sql-for-a-concurrent-request-id"},"modified":"2009-10-10T15:05:22","modified_gmt":"2009-10-10T09:35:22","slug":"get-sql-for-a-concurrent-request-id","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id","title":{"rendered":"Get SQL for a concurrent request id"},"content":{"rendered":"<p>1. Use this Script to get current sql statement that is running in the background for a given concurrent request.<br \/>\n2. Get all the sql statements that are being executed by a user.<br \/>\n3. Get all the blocking sessions<\/p>\n<p><code> <\/p>\n<p>-- GET THE CURRENT SQL STATEMENT RUNNING FOR A CONCURRENT REQUEST<\/p>\n<p>SELECT A.REQUEST_ID, D.SID, D.SERIAL#, D.OSUSER, D.PROCESS, C.SPID,<br \/>\n       E.SQL_TEXT<br \/>\n  FROM APPS.FND_CONCURRENT_REQUESTS A,<br \/>\n       APPS.FND_CONCURRENT_PROCESSES B,<br \/>\n       V$PROCESS C,<br \/>\n       V$SESSION D,<br \/>\n       V$SQL E<br \/>\n WHERE A.CONTROLLING_MANAGER = B.CONCURRENT_PROCESS_ID<br \/>\n   AND C.PID = B.ORACLE_PROCESS_ID<br \/>\n   AND B.SESSION_ID = D.AUDSID<br \/>\n   AND D.SQL_ADDRESS = E.ADDRESS<br \/>\n   AND A.REQUEST_ID = &REQUEST_ID;<\/p>\n<p>--SQL STATEMENTS RUNNING BY A USER<br \/>\nSELECT A.SID, A.SERIAL#, B.SQL_TEXT<br \/>\n  FROM V$SESSION A, V$SQLAREA B<br \/>\n WHERE A.SQL_ADDRESS = B.ADDRESS AND A.USERNAME = 'APPS';<\/p>\n<p>-- GET THE BLOCKING SESSIONS<br \/>\nSELECT   BLOCKING_SESSION, SID, SERIAL#, WAIT_CLASS, SECONDS_IN_WAIT<br \/>\n    FROM V$SESSION<br \/>\n   WHERE BLOCKING_SESSION IS NOT NULL<br \/>\nORDER BY BLOCKING_SESSION;<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Use this Script to get current sql statement that is running in the background for a given concurrent request. 2. Get all the sql statements that are being executed by a user. 3. Get all the blocking sessions &#8212; GET THE CURRENT SQL STATEMENT RUNNING FOR A CONCURRENT REQUEST SELECT A.REQUEST_ID, D.SID, D.SERIAL#, D.OSUSER, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-2045","post","type-post","status-publish","format-standard","hentry","category-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Get SQL for a concurrent request id, debug and locks<\/title>\n<meta name=\"description\" content=\"Get SQL for a concurrent request id debug queries locks for oracle apps locks and blocking sessions\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prudhvi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\"},\"author\":{\"name\":\"Prudhvi\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\"},\"headline\":\"Get SQL for a concurrent request id\",\"datePublished\":\"2009-10-10T09:35:22+00:00\",\"dateModified\":\"2009-10-10T09:35:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\"},\"wordCount\":43,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"articleSection\":[\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\",\"url\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\",\"name\":\"Get SQL for a concurrent request id, debug and locks\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"datePublished\":\"2009-10-10T09:35:22+00:00\",\"dateModified\":\"2009-10-10T09:35:22+00:00\",\"description\":\"Get SQL for a concurrent request id debug queries locks for oracle apps locks and blocking sessions\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get SQL for a concurrent request id\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\",\"name\":\"Prudhvi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"caption\":\"Prudhvi\"},\"sameAs\":[\"http:\/\/www.erpschools.com\"],\"url\":\"https:\/\/erpschools.com\/erps\/author\/prudhvi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get SQL for a concurrent request id, debug and locks","description":"Get SQL for a concurrent request id debug queries locks for oracle apps locks and blocking sessions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id","twitter_misc":{"Written by":"Prudhvi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id"},"author":{"name":"Prudhvi","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512"},"headline":"Get SQL for a concurrent request id","datePublished":"2009-10-10T09:35:22+00:00","dateModified":"2009-10-10T09:35:22+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id"},"wordCount":43,"commentCount":2,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"articleSection":["Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id","url":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id","name":"Get SQL for a concurrent request id, debug and locks","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"datePublished":"2009-10-10T09:35:22+00:00","dateModified":"2009-10-10T09:35:22+00:00","description":"Get SQL for a concurrent request id debug queries locks for oracle apps locks and blocking sessions","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/scripts\/get-sql-for-a-concurrent-request-id#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"Get SQL for a concurrent request id"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512","name":"Prudhvi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","caption":"Prudhvi"},"sameAs":["http:\/\/www.erpschools.com"],"url":"https:\/\/erpschools.com\/erps\/author\/prudhvi"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/2045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=2045"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/2045\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=2045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=2045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=2045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}