# Oracle EBS SQL Query Generator for Concurrent Requests

> Source: https://netray.co/tools/oracle-ebs-sql-for-concurrent-requests-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Build ready-to-run SQL for recent, running, pending and long-running concurrent requests from a few filter fields.

## Category

oracle

## Erp

Oracle E-Business Suite

## Audience

- EBS DBA
- Apps DBA
- Support analyst

## Tool

**Kind:** template

**Output:** code

**Language:** sql

**Fields:**

#### Look back (hours)

**Key:** hours_back

**Type:** number

**Default:** 24

#### Program name contains

**Key:** program

**Type:** text

**Default:** Payables

**Help:** Matches the user concurrent program name, case-insensitive.

#### Requested by (user name)

**Key:** user_name

**Type:** text

**Default:** SYSADMIN

#### Phase code

**Key:** phase

**Type:** select

**Options:**

- C
- R
- P
- I

**Default:** C

**Help:** C completed, R running, P pending, I inactive.

#### Long-running threshold (minutes)

**Key:** min_minutes

**Type:** number

**Default:** 30

**Blocks:**

#### Recent requests by program, user and phase

**Body:** SELECT r.request_id,
       p.user_concurrent_program_name AS program_name,
       u.user_name AS requested_by,
       r.phase_code,
       r.status_code,
       r.requested_start_date,
       r.actual_start_date,
       r.actual_completion_date,
       ROUND((NVL(r.actual_completion_date, SYSDATE) - r.actual_start_date) * 24 * 60, 1) AS run_minutes
FROM   apps.fnd_concurrent_requests r
JOIN   apps.fnd_concurrent_programs_vl p
       ON p.concurrent_program_id = r.concurrent_program_id
      AND p.application_id = r.program_application_id
JOIN   apps.fnd_user u ON u.user_id = r.requested_by
WHERE  r.request_date > SYSDATE - ({{hours_back}} / 24)
AND    UPPER(p.user_concurrent_program_name) LIKE UPPER('%{{program}}%')
AND    u.user_name = UPPER('{{user_name}}')
AND    r.phase_code = '{{phase}}'
ORDER BY r.request_id DESC;

#### Running requests over the time threshold

**Body:** SELECT r.request_id,
       p.user_concurrent_program_name AS program_name,
       u.user_name AS requested_by,
       r.actual_start_date,
       ROUND((SYSDATE - r.actual_start_date) * 24 * 60, 1) AS running_minutes,
       r.oracle_process_id
FROM   apps.fnd_concurrent_requests r
JOIN   apps.fnd_concurrent_programs_vl p
       ON p.concurrent_program_id = r.concurrent_program_id
      AND p.application_id = r.program_application_id
JOIN   apps.fnd_user u ON u.user_id = r.requested_by
WHERE  r.phase_code = 'R'
AND    r.status_code = 'R'
AND    (SYSDATE - r.actual_start_date) * 24 * 60 > {{min_minutes}}
ORDER BY r.actual_start_date;

#### Error requests with completion text

**Body:** SELECT r.request_id,
       p.user_concurrent_program_name AS program_name,
       r.actual_completion_date,
       r.completion_text
FROM   apps.fnd_concurrent_requests r
JOIN   apps.fnd_concurrent_programs_vl p
       ON p.concurrent_program_id = r.concurrent_program_id
      AND p.application_id = r.program_application_id
WHERE  r.phase_code = 'C'
AND    r.status_code = 'E'
AND    r.actual_completion_date > SYSDATE - ({{hours_back}} / 24)
ORDER BY r.actual_completion_date DESC;

**Notes:** Run these as a read-only user with access to the APPS views, or in a reporting copy, and start with a short time window on large systems because fnd_concurrent_requests can hold millions of rows. Column names are standard for R12 but confirm on your release. Use the phase and status reference page to read the code values.

## Content

**Intro:** Most Oracle EBS support work starts with the same few questions: what ran, who ran it, what is still running and what failed. This generator writes the SQL for those questions against fnd_concurrent_requests so you do not rebuild the joins each time.

**Sections:**

#### How to use the generator

**Body:** Set the look-back window, a fragment of the program name, the user and the phase, and the three queries update. The first lists requests with run time in minutes, the second finds running requests beyond your threshold, and the third lists errors with completion text. Copy them into SQL Developer or your preferred client. Start narrow and widen the filters, because an unfiltered scan of the requests table can be slow on a busy system.

#### Tables behind the queries

**Body:** Request rows live in fnd_concurrent_requests, with the program joined through concurrent_program_id and program_application_id to fnd_concurrent_programs_vl, which holds the user program name. The requester joins to fnd_user through requested_by. Phase_code and status_code are the one-letter codes, and completion_text holds the message for finished requests. The oracle_process_id column gives you the database or OS process link for a running request.

**Bullets:**

- fnd_concurrent_requests: one row per request
- fnd_concurrent_programs_vl: program names
- fnd_user: who submitted it
- phase_code and status_code: current state

#### Reading the results

**Body:** Compare run minutes with the normal run time of the same program, not with a global rule, since a payment run and a trial balance report have very different norms. A request in Running for much longer than usual needs a session check in the database, looking at blocking and wait events. Errors need the log file and completion text together. If many requests pile up as Pending, look at manager queues rather than at individual requests.

**Bullets:**

- Join history by program name for a baseline
- Look at database sessions for slow runs
- Read the log file for every Error
- Check manager queues for a pending backlog

**Cta:** If your team writes these queries daily, we can set up a read-only assistant that turns plain questions into this kind of SQL, shows the query and runs on your own servers.

**Faq:**

#### Which table holds concurrent requests in Oracle EBS?

**Answer:** It is fnd_concurrent_requests. Join it to fnd_concurrent_programs_vl for the readable program name and to fnd_user for the requester. The phase_code and status_code columns hold the current state as one-letter codes.

#### How do I find long-running concurrent requests?

**Answer:** Query requests with phase R and status R and compare the time since actual_start_date to a threshold. Then compare to the same program's usual run time. The second query in this tool does exactly that and returns the oracle_process_id for a session lookup.

#### Is it safe to run these queries in production?

**Answer:** They are read-only selects, but a wide scan of a large requests table can load the database. Use a short time window, run off-peak when possible, or use a reporting copy. Never grant broad update access to the APPS schema for this purpose.

#### Why is my program name filter returning nothing?

**Answer:** The filter matches the user concurrent program name, which is the name shown in the Requests form, not the short name. Try a shorter fragment, and check that the look-back window is long enough and the phase value matches the state you want.

## Search terms

oracle ebs concurrent request sql, fnd_concurrent_requests query, oracle apps running concurrent requests sql, long running concurrent requests oracle, fnd_concurrent_programs_vl query, concurrent request run time sql, oracle ebs concurrent request error log query

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
