Metadata query to extract each session run duration for last 10 Runs

Here is the query:   Select  Subject_Area,Workflow_Name,Task_Name,Instance_Name,Task_Type_Name, Start_Time, End_Time  from (Select  Subject_Area,Workflow_Name,Task_Name,Instance_Name,Task_Type_Name,Cast(Start_Time As Timestamp) Start_Time, Cast(End_Time As Timestamp) End_Time, rank()over(partition by subject_area,workflow_name,instance_name,task_type_name order by Start_time desc) RFrom Rep_Task_Inst_Run Where Task_Type_Name<>'Start') where R<=10

Hi all, Please help me with metadata query to extract each session RUN_DURTION, Start Time, end time for last 10 runs of each session at a workflow level. I know we can get information from REP_WFLOW_RUN table but i dont know table strucure and I dont have access to Repository database and we need an exact query to raise it to admin team. so please provide me an exact query.   Thanks

Similar Messages

  • Metadata query to extract each session run duration for last 10 Runs (10 days if daily scheduled)

    Hi all, Please can anybody help me with metadata query to extract all the sessions run duration information (start time and end time, run duration)in each workflow for last 10days.I dont have access to metadata repository so need exact query so that i can raise a request to admin team(he needs exact query). I know that we can get information from REP_WFLOW_RUN , but i dont know the table structure so please provide full query. Thanks,Ravi kumar

    Hi all, Please help me with metadata query to extract each session RUN_DURTION, Start Time, end time for last 10 runs of each session at a workflow level. I know we can get information from REP_WFLOW_RUN table but i dont know table strucure and I dont have access to Repository database and we need an exact query to raise it to admin team. so please provide me an exact query.   Thanks

  • ODI metadata query to find source and Target table for Interface

    Hi Experts,
    Client is migrating there source from EBS 11.5.10 to R12. They are in ODI BIApps. 7952 version.Since,all there mappings are customized they are not bothering about support from Oracle as far as BIApps is concerned.
    Now,we need to know how many ODI mappings will be impacted when source EBS is migrating from 11.5.10 to R12 and so that we can only target those mappings accordingly.
    So,please provide me with below inputs:
    1) Any metadata query which will give me the source table and target table information's against an interface even-if the main interface source is another interface.
    2) What are the other stuffs I need to look from point of view of mapping changes when the source is upgrading.e.g. only source table change is enough or I need to look into other stuffs.I feel,it is boiling down to create a separate source adapter for R12.
    Regards,
    Snehotosh

    SELECT C.TABLE_NAME AS "Target Table Name",
         A.COL_NAME AS "Target Field Name",
         Wm_Concat(G.SOURCE_DT) AS "Target Data Type",
         Wm_Concat(G.LONGC) AS "Target Data Length",
         Wm_Concat(TXT) AS "Transformation Rule",
         Wm_Concat(DISTINCT F.TABLE_NAME) AS "Source Table Name",
         Wm_Concat(D.COL_NAME) AS "Source Field Name",
         Wm_Concat(D.SOURCE_DT) AS "Source Data Type",
         Wm_Concat(D.LONGC) AS "Source Data Length"
    FROM
         SNP_POP_COL A JOIN SNP_TXT_CROSSR B ON A.I_TXT_MAP=B.I_TXT
         JOIN SNP_POP C ON A.I_POP=C.I_POP
         JOIN SNP_TXT E ON A.I_TXT_MAP=E.I_TXT AND B.I_TXT=E.I_TXT
         LEFT OUTER JOIN SNP_COL D ON B.I_COL=D.I_COL
         LEFT OUTER JOIN SNP_TABLE F ON F.I_TABLE= D.I_TABLE
         LEFT JOIN SNP_COL G ON A.I_COL=G.I_COL
    WHERE POP_NAME = 'XXXXXXX'
    GROUP BY C.TABLE_NAME,A.COL_NAME ORDER BY 1

  • Query to find Memory used by each session in the database

    Hi All,
    Is there any query to find the memory utilised by each session in the database.I am in 9i database.
    Regards
    Vijay

    Memory using sessions script,
    SET LINESIZE 145
    SET PAGESIZE 9999
    COLUMN sid FORMAT 99999 HEADING 'SID'
    COLUMN serial_id FORMAT 999999 HEADING 'Serial#'
    COLUMN session_status FORMAT a9 HEADING 'Status' JUSTIFY right
    COLUMN oracle_username FORMAT a12 HEADING 'Oracle User' JUSTIFY right
    COLUMN os_username FORMAT a9 HEADING 'O/S User' JUSTIFY right
    COLUMN os_pid FORMAT 9999999 HEADING 'O/S PID' JUSTIFY right
    COLUMN session_program FORMAT a18 HEADING 'Session Program' TRUNC
    COLUMN session_machine FORMAT a8 HEADING 'Machine' JUSTIFY right TRUNC
    COLUMN session_pga_memory FORMAT 9,999,999,999 HEADING 'PGA Memory'
    COLUMN session_pga_memory_max FORMAT 9,999,999,999 HEADING 'PGA Memory Max'
    COLUMN session_uga_memory FORMAT 9,999,999,999 HEADING 'UGA Memory'
    COLUMN session_uga_memory_max FORMAT 9,999,999,999 HEADING 'UGA Memory MAX'
    prompt
    prompt ----------------------------------------------------
    prompt | User Sessions Ordered by Current PGA Size |
    prompt ----------------------------------------------------
    SELECT
    s.sid sid
    , s.serial# serial_id
    , lpad(s.status,9) session_status
    , lpad(s.username,12) oracle_username
    , lpad(s.osuser,9) os_username
    , lpad(p.spid,7) os_pid
    , s.program session_program
    , lpad(s.machine,8) session_machine
    , sstat1.value session_pga_memory
    , sstat2.value session_pga_memory_max
    , sstat3.value session_uga_memory
    , sstat4.value session_uga_memory_max
    FROM
    v$process p
    , v$session s
    , v$sesstat sstat1
    , v$sesstat sstat2
    , v$sesstat sstat3
    , v$sesstat sstat4
    , v$statname statname1
    , v$statname statname2
    , v$statname statname3
    , v$statname statname4
    WHERE
    p.addr (+) = s.paddr
    AND s.sid = sstat1.sid
    AND s.sid = sstat2.sid
    AND s.sid = sstat3.sid
    AND s.sid = sstat4.sid
    AND statname1.statistic# = sstat1.statistic#
    AND statname2.statistic# = sstat2.statistic#
    AND statname3.statistic# = sstat3.statistic#
    AND statname4.statistic# = sstat4.statistic#
    AND statname1.name = 'session pga memory'
    AND statname2.name = 'session pga memory max'
    AND statname3.name = 'session uga memory'
    AND statname4.name = 'session uga memory max'
    ORDER BY session_pga_memory DESC
    Thanks

  • LO Extraction approx time duration for PO Items (2lis_02_itm)

    Hi All,
    We are supposed to use 2lis_02_itm which is a purchase order line items data and this has to be initialized in our organization as previously there were no one using it. But, as we have to use LO extraction for PO item, we have been trying to prepare the cut over plan on how many hours approximately do we need to complete the extraction.
    As there should not be any postings during the LO extraction for PO items, we need to request to down the system for that duration. So, we are trying to estimate the time required from the start till the end of extraction. The data that we have is around in 1.3 Million records in PO header table.
    We tried to extract to the setup table in a LVT system and it took 39 hours to complete.
    I would like to know, on any of your experience, how long will it take and how much was the data load for your case.
    I need your expertise advice on this and is there any way we can initialize the system without downing the system during extraction?
    Appreciate your replies .
    Thanks in advance.

    Hi,
      There is no way for us to predict the run time, since it varies from system to system according to memory and other conditions.
    Also the header table is not a real indication of your runtime, you need to look at the line items (EKPO table). This is because any LO set-up program, always fills the lines items and these have the most data.
    This is what I suggest.
    1) Take dumps of the document ranges in the EKPO table.
    2) Split above document ranges into even chunks. For eg doc# 1 -100 contains 500 items. Doc # 101 -150 contains 500 items. The items should be more or less the same number.
    3) Take a subset of these, say 1000 records and do a set-up run without blocking the documents( there is a check box in the program). Schedule the setup as a background job. In this way, you get the exact runtime of the program for a 1000 records.You can then predict the run time for the ranges mentioned in step 2.
    4) You then need to create parallel jobs, each job contains a different document range( this is because setup tables can be filled in parallel). By optimizing the number of items and then number of parallel jobs you can get a small a time as possible and minimize the downtime.
    5) Once the jobs have completed, you can run an init w/o data transfer and then unlock the system. You can then do repair  fulls while the system is up, since the repairs would be done from the setup tables. Once all the loads are completed, you can begin running your delta ( This would already have started being captured, the moment you ran the setup w/o data transfer.
    Regards.

  • Same query different timings , different sessions at the same time

    I am running exactly the same query from 2 different sessions almost simultaneously and in one session it is taking 2 seconds and in the other it is taking 20 seconds. The explain plans in both the sessions (by set autotrace on) are exactly the same. The timing is almost same for succesive runs of the query in the same sessions. That is when I run the query again in the "slow session" it is always around 20 seconds and when I run the query again in the "fast session" it is always fast. The queries are being run within a few seconds of each other so the load on the database is almost same.
    My hunch is that it is a database parameter that needs to be changed to solve this problem, can someone guide me with this ....which parameters I should ask our DBAs to adjust ? Our database is Oracle 10G.
    Regards
    Amitabha

    Duplicate thread
    Same query different timings , different sessions at the same time
    Gints Plivna
    http://www.gplivna.eu

  • Job step duration of currently running job

    Greetings!
    I have the below query against [dbo].[sysjobsteps] to calculate step duration which is almost perfect for my needs except that it is only showing steps for the
    completed job and not steps for a job in progress.
    I need to track steps in progress, and as a step completes, report back the duration it took to complete. Any idea how to achieve this? Thanks in advance for any advice you may offer!
    ;with activeJobStepDuration as (
    SELECT
    job_id
    ,step_id
    ,step_name
    ,last_run_outcome
    ,last_run_date
    ,last_run_duration
    ,last_run_time
    ,CONVERT(DATETIME, RTRIM(last_run_date)) + ((last_run_time / 10000 * 3600) + ((last_run_time % 10000) / 100 * 60) + (last_run_time % 10000) % 100 /*run_time_elapsed_seconds*/)
    / (23.999999 * 3600 /* seconds in a day*/) AS LastStart_DateTime
    ,CONVERT(DATETIME, RTRIM(last_run_date)) + ((last_run_time / 10000 * 3600) + ((last_run_time % 10000) / 100 * 60) + (last_run_time % 10000) % 100) / (86399.9964 /* Start Date Time */) + ((last_run_duration / 10000 * 3600) + ((last_run_duration % 10000) / 100 * 60)
    + (last_run_duration % 10000) % 100 /*run_duration_elapsed_seconds*/) / (86399.9964 /* seconds in a day*/) AS LastEnd_DateTime
    FROM [dbo].[sysjobsteps] AS sjs WITH (NOLOCK)
    WHERE job_id = 'F86B0B2E-D2C2-46B3-B48A-618DA136ED4F' )
    SELECT a.*
    ,datediff(minute,a.LastStart_DateTime,a.LastEnd_DateTime) as 'Step Duration (Mins)'
    FROM activeJobStepDuration a

    Okay that is much closer, using the blog you posted I found this query below. However, I want to track the duration of each step while the job is running! Any ideas?  
    SELECT
    ja.job_id,
    j.name AS job_name,
    ja.start_execution_date,
    ISNULL(last_executed_step_id,0)+1 AS current_executed_step_id,
    Js.step_name
    FROM msdb.dbo.sysjobactivity ja with (Nolock)
    LEFT JOIN msdb.dbo.sysjobhistory jh with (Nolock)
    ON ja.job_history_id = jh.instance_id
    JOIN msdb.dbo.sysjobs j with (Nolock)
    ON ja.job_id = j.job_id
    JOIN msdb.dbo.sysjobsteps js with (Nolock)
    ON ja.job_id = js.job_id
    AND ISNULL(ja.last_executed_step_id,0)+1 = js.step_id
    WHERE ja.session_id = (SELECT TOP 1 session_id FROM msdb.dbo.syssessions ORDER BY agent_start_date DESC)
    AND start_execution_date is not null
    AND stop_execution_date is null;

  • [svn:osmf:] 14486: Add stream metadata support by extracting the actual metadata object from the binary data stream .

    Revision: 14486
    Revision: 14486
    Author:   [email protected]
    Date:     2010-03-01 14:27:41 -0800 (Mon, 01 Mar 2010)
    Log Message:
    Add stream metadata support by extracting the actual metadata object from the binary data stream.
    Fix bug 466
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/ManifestParser.as
        osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/Media.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamingUtils.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FIndexHandler.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FStreamInfo.as

    same problem, data not replicated.
    its captured,propagated from source,but not applied.
    also no apply errors in DBA_APPLY_ERROR. Looks like the problem is that LCRs propagated from source db do not reach target queue.can i get any help on this?
    queried results are as under:
    1.at source(capture process)
    Capture Session Total
    Process Session Serial Redo Entries LCRs
    Number ID Number State Scanned Enqueued
    CP01 16 7 CAPTURING CHANGES 1010143 72
    2. data propagated from source
    Total Time Executing
    in Seconds Total Events Propagated Total Bytes Propagated
    7 13 6731
    3. Apply at target(nothing is applied)
    Coordinator Session Total Total Total
    Process Session Serial Trans Trans Apply
    Name ID Number State Received Applied Errors
    A001 154 33 APPLYING 0 0 0
    4. At target:(nothing in buffer)
    Total Captured LCRs
    Queue Owner Queue Name LCRs in Memory Spilled LCRs in Buffered Queue
    STRMADMIN STREAMS_QUEUE 0 0 0

  • Timing Issue - Running sqlplus for each script in a list of scripts

    I have a large number of folders with sql scripts that I need to run from windows with sqlplus. The problem is the scripts must be run in order. When I loop through the scripts and run sqlplus for each one, they sometimes fail because things in the prior script are not yet available.
    So I added a jdbc client that checks a table for when the data is available from the prior sqlplus script. It says yes the data is visible in the table so the script can launch the next SQLPlus process but it fails unless I put a 2 second sleep in.
    Because sqlplus doesn't have a "CD" command and there are limitations with SQL_PATH and relative imported child scripts, I'm afraid I'm stuck with running multiple sqlplus sessions.

    I should clarify that I'm looking for a way to run scripts in sequence with sqlplus. There is an issue where one sqlplus session commits and exits and the next starts but the commit is not yet available to the new sqlplus session. To me this is a bug with sqlplus but maybe someone can explain how this is a "feature".

  • Run a query multiple times in the same report for different nodes in Hier

    Hi,
    I have created a query as per my requirements. But my issue is I need to run the report for all the profit centers in a hierarchy. Right now I enter a node value of the hierarchy in the variable and I get the result. But I want to run it for each node in the hierarchy and display the result in the same report.Is it possible to do so in web using information broadcaster or any BI 7.0 tools. Has anyone done similar to this in web. I would prefer the web route rather than the excel but if excel is the only answer I will follow the excel path.
    Looking forward to your suggestions on this.
    Thanks,
    Kal

    Hello Kal,
    if the number of Profit Centers is limited, you could probably work with query views (one for each PC) and include all these into your Web Template.
    If this is not appropriate, I don´t know if there is any way of programming possible.
    Regards
    Cornelia

  • Sql Server Agent last run duration in minutes

    Hello Forum Members,
    Can you please advise me on this:
    There are 5 sqlagent jobs and they run many times in a day ranging from 10 seconds to 1 hour. I would like to know the duration of run in minutes during their last run.
    Kind Regards,
    Sqlquery9

    Hi
    This isn't as easy as it should be due to the job duration in sysjobhistory being stored as an INT, so you need to extract the hours,mins,seconds and add them together. 
    Here's an example:
    SELECT rec_job.job_name,
    run_duration/10000 hrs, --hrs
    run_duration/100%100 mins, --mins
    run_duration%100 secs, --secs,
    ((run_duration/10000) * 60 ) +
    (run_duration/100%100) +
    (CASE when run_duration%100 > 29
    THEN 1
    ELSE 0
    end) Total_mins ---total mins
    FROM msdb.dbo.sysjobhistory jh
    INNER JOIN ( select j.job_id, MAX(h.instance_id) instance_id, MAX(j.name) job_name
    FROM msdb.dbo.sysjobhistory h
    INNER JOIN msdb.dbo.sysjobs j on h.job_id = j.job_id
    WHERE step_id = 0 --overall outcome
    AND j.name IN
    ( 'Job Name 1',
    'Job Name 2',
    'Job Name 3',
    'Job Name 4',
    'Job Name 5')
    GROUP BY j.job_id
    ) rec_job ON rec_job.instance_id = jh.instance_id
    The code above assume that any duration of 30secs or over will be counted as one minute, you can fill in the job names that you're interested in.

  • How to know last run time and who ran the query

    Hi
    I am doing the analysis for all the queries , their last run time and who ran the query
    Since there are almost 6000 queries , is there any way to find out last run time and who ran the query
    in one step or through any transaction else It would huge effort taking task to check the data in BW statistics
    table for each query
    Regards,
    Vivek

    Hi,
    Statistics should be switched ON for all the queries first. You can check this in RSDDSTAT.
    Statistics data is stored in BW for a specific period only. This setting can be maintained in table RSADMIN (Field : TCT_KEEP_OLAP_DM_DATA_N_DAYS). If the value for the field is 30, then 30 days old statistics will be available at any point.
    Not all the queries will be ran daily. Some are ran daily, monthly and yearly depending upon User requirement.
    1. You can check in RSDDSTAT_OLAP for the details you needed.
    2. You can install the BI Technical Content and run the respective query for the details you needed.
    Hope this helps.
    Regards,
    Sunil

  • Query Shows 5000 Milliseconds in Profiler,but once i run in mangement studio it comes 1000 Millisecons

    hi
      I monitor the performance of the application, It shows 5000 milli seconds in profiler and i copy it and run in management studio it runs in 1000 milli seconds..is there any methods to find out why it is showing 5000 milli seconds in profiler and when
    i run it shows 1000 milli seconds. Please help me. I run duration trace in profiler. SQL server 2012
    Thanks & Regards Manoj

    Hi,
    I would suggest you to read below posts.
    Query Execution time in Management Studio & profiler
    SQL SERVER – SQL Server Management Studio and Client Statistics
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • Memory leak/overload when looping by index over a large query and updating each DB record

    I am importing a CSV file into a temporary table and then running a select query that joins my actual database table with the temporary table, looking for any changes in the data. If changes exist, the select query is looped from 1 to #recordCount# and an update is applied to each record via cfquery. It runs very quickly (much more quickly than looping the query itself), but my memory spikes and overloads after about 1500 updates are completed. I need to be able to do upwards of 20000 at a time, without killing my system. I have tried manually setting the runtime garbage collection to trigger after X number of loops, but that doesn't seem to help. I am running CF8. See below for loop example:
    <cfloop from="1" to="#updatedRecordsQuery.recordCount#" index="a">
    <cftry>
                    <cfquery datasource="#db#" name="doUpdate">
                        UPDATE
                            CI
                        SET
                            firstname = <cfqueryparam cfsqltype="cf_sql_varchar" value="#updatedRecordsQuery.firstname[a]#" />,
                            lastname = <cfqueryparam cfsqltype="cf_sql_varchar" value="#updatedRecordsQuery.lastname[a]#" />,
                            etc, for about 15 various fields
                        FROM
                            client_info CI
                        WHERE
                            CI.client_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#updatedRecordsQuery.client_id[a]#" />
                    </cfquery>
                    <cfcatch type="database">
                        <cfset local.updateErrorList = listappend(local.updateErrorList,updatedRecordsQuery.client_id[a]) />
                        <cfset local.error = true />
                    </cfcatch>
               </cftry>
    </cfloop>

    I would suggest to use select update instead of looping over query object and update each row one-by-one.
    Procedure:
    - Insert your CSV data into temp table.
    - Use a select update SQL query to update the changed data instead of looping over a select query.
    Example:
    UPDATE
       Table
    SET
       Table.col1 = other_table.col1,
       Table.col2 = other_table.col2
    FROM
       Table
    INNER JOIN
      other_table
    ON
       Table.id = other_table.id
    NOTE: You can put all your scripts in a Procedure.

  • Number of user sessions / each session time

    Hi,
    I need to find out the following info
    1) Then number of user sessions and for each session duration for every user..
    is there a way to compute the same (if it's not directly available)..
    so basically at J2EE Session level how do i find out for each user what was the session time.
    Any pointers will be greatly appreciated.
    Regard,s
    Sam

    You can find some information within the NWA - Monitoring - Java Systems Report - report: User activities...
    Regards
    Timm

Maybe you are looking for

  • How do I use a remote superdrive? I'd like to backup iTunes and iPhoto

    I'd like to be able to use a remote shared drive. I know how to make it shared - but not how to then get another machine to share it! I'd like to do remote backups to my mac mini superdrive - I have it there and I can see the disc, but, when I try to

  • Shall I use one datasource for multiple connection pool?

    Hi, I need to clarrify that, Shall I use one Datasource for multiple connection pool in distributed transaction? Thanks with regards Suresh

  • Zen Micro photo.....HELP?

    <FONT color=#6666ff>ok sooo.... i am an idiot..............one night after coming home i was running to catch a ride with my friend and on the way.....my zen micro photo fell outta my pocket and into the grass..............well the next morning i obv

  • Which topics are required for CRM consultants from BW consultants

    hi experts, In which scenario BW consultants will hepfull to the CRM consultants, It means what type information they will require from BW consultants. In BW which topics are usefull for CRM consultants. thanks & regards venkat

  • How to retrive multiple images from database

    Hi, I have to retrieve multiple images from oracle database and have to display the image in the jsp. I am passing imageCategoryId from the jsp.This id contain number of image in DB. I googled the issue and i found some solution.want to know whether