Islam
Islam

Reputation: 55

How to get long running report current status?

While running a long running report in Oracle Application Server 10g, the status of the report is exist in OAS admin console something like "25 of 3225 Pages completed".

How can I got this value from the OAS to be able to display it to the user in oracle forms.

Upvotes: 1

Views: 1133

Answers (1)

Trevor North
Trevor North

Reputation: 2296

Not certain but it's possible it might be stored in v$session_longops. See here for examples.

Some oracle code writes into V$session_longops but you can also encode into your own applications using some provided PLSQL functions.

If OAS or the report itself is writing something into here, you can get that information from an oracle form to display to the user when the report is run.

While the above code is running, the contents of the v$session_longops view can be queried as follows.

COLUMN opname FORMAT A20
COLUMN target_desc FORMAT A20
COLUMN units FORMAT A10

SELECT
  opname,
 target_desc,
  sofar,
  totalwork,
  time_remaining,
  units
FROM  
  v$session_longops

The type of output expected from this v$session_longops query is listed below.

OPNAME               TARGET_DESC               SOFAR  TOTALWORK UNITS
-------------------- -------------------- ---------- ---------- ----
BATCH_LOAD           BATCH_LOAD_TABLE              3         10 rows

Upvotes: 0

Related Questions