Need to fetch connection, query details

Hi,
How can I get the following details from the system tables:
1) The maximum number of connections that have been in use simultaneously since the server started.
2) Number of times Select, Insert statement has been executed.
3) Number of temp tables created

Hi,
For 1 & 3 : you need to implement audit session and statement.
For 3 : what do you mean by temp table ?
Nicolas.

Similar Messages

  • SQL query to fetch Online Payslip Details

    Hi All,
    First of all "Happy Diwali" to you all and sorry for asking too much. Actually I need to develope an SQL query which will fetch all the details that appears in online payslip(employee self service) including employee details, earning and deduction elements their value, TAX deducted, absence details etc. And the details should match exactally to our online payslip details.
    I am sure many of you have come across this requirement and have developed this already. If you still have that query could you please pass it to me. I know expecting a readymade sql query would be too much and therefore just let me know all the tables I need use for this so that I can start writting query by my own. Actually any help in this regard will be much appreciated.
    P.S. We are still using 11i :-(
    Thank you all once again,
    Avinash

    Hi All,
    Thank you all for your help on this. The forum was really helpful to get answer of my question. I have almost got answer to all my question. Hence marking this "Answered" :-) I have prepared some sql which fetches the information from PAY_ACTION_INFORMATION for Australia legislation and would like to share it with you all so that you can utalize it if needed.
    ------------ For Employee Details ---------------------------------------
    select pai.action_information1 "Employee"
    ,pai.action_information18 "Employer Name"
    ,pai.action_information10 "Employee Number"
    ,pai.action_information19 "Position"
    ,pai.action_information14 "Assignment Number"
    ,pai.action_information17 "Job"
    ,pai.action_information7 "Grade Step"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'EMPLOYEE DETAILS'
    and action_context_id = &action_context_id
    ------------ for IBN Number ----------------------------------------------
    select pai.action_information21 "Employer ABN"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'AU EMPLOYEE DETAILS'
    and action_context_id = &action_context_id
    ------- For Balances ------------------------------------------------------
    select pai.action_information1 "Description"
    ,pai.action_information4 "YTD"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC BALANCES'
    and action_context_id = &action_context_id
    --------- Taxable Earning ------------------------------
    select pai.action_information1 "Description"
    ,pai.action_information9 "Rate"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Taxable Earnings'
    and action_context_id = &action_context_id
    ----------- Pre Tax Deduction -------------
    select pai.action_information1 "Description"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Pre Tax Deductions'
    and action_context_id = &action_context_id
    --------------- Non Taxable Earnings -----------
    select pai.action_information1 "Description"
    ,pai.action_information9 "Rate"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Non Taxable Earnings'
    and action_context_id = &action_context_id
    --------- for Tax Deductions ----------------------
    select pai.action_information1 "Description"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Tax Deductions'
    and action_context_id = &action_context_id
    ---------- Post Tax Deductions -----------------
    select pai.action_information1 "Description"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Post Tax Deductions'
    and action_context_id = &action_context_id
    --------- Employer Superannuation Contributions ----------------------
    select pai.action_information1 "Superannuation Fund Name"
    ,pai.action_information5 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ELEMENTS'
    and action_information4 = 'Employer Superannuation Contributions'
    and action_context_id = &action_context_id
    ----------- Payments -----------------------------
    select pai.action_information18 "Payment Method"
    ,pai.action_information6 "Account Number"
    ,pai.action_information16 "Payment Amount"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'EMPLOYEE NET PAY DISTRIBUTION'
    and action_context_id = &action_context_id
    ------------- Other Pay Advice Information ------------
    select pai.action_information14 "Description"
    ,pai.action_information6 "Value"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'EMPLOYEE OTHER INFORMATION'
    and action_information2 = 'ELEMENT'
    and action_context_id = &action_context_id
    -------------------- Other Balance Information -----------
    select pai.action_information14 "Description"
    ,pai.action_information6 "Value"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'EMPLOYEE OTHER INFORMATION'
    and action_information2 = 'BALANCE'
    and action_context_id = &action_context_id
    ------------------- Pay Period and Salary ------------
    select pai.action_information28 "Annual Salary"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'EMPLOYEE DETAILS'
    --and action_information2 = 'BALANCE'
    and action_context_id = &action_context_id
    --------------- Annual Leave Information ------------
    select pai.action_information1 "Name"
    ,decode(pai.action_information5,'D','Day','H','Hours') "Unit"
    ,pai.action_information4 "Balance"
    from apps.pay_action_information pai
    where 1 = 1
    and pai.action_information_category = 'APAC ACCRUALS'
    and action_context_id = &action_context_id
    ----------- Message to Employee -----------
    select pai.action_information6 "Message to Employee"
    from apps.pay_action_information pai
    where 1 = 1
    and action_information_category = 'EMPLOYEE OTHER INFORMATION'
    and action_information2 = 'MESG'
    and action_context_id = &action_context_id
    ---------------- Leave Taken -------------
    select pai.action_information2 "Name"
    ,pai.action_information4 "Start Date"
    ,pai.action_information5 "End Date"
    ,pai.action_information6 "Amount Taken"
    ,pai.action_information8 "This Pay"
    from apps.pay_action_information pai
    where 1 = 1
    and action_information_category = 'APAC ABSENCES'
    and action_context_id = &action_context_id
    Thanks,
    Avinash

  • Query should fetch all the query details in the system.

    Hi All
    We  are looking for a query which will fetch all the query details in the system along with the user names either who has created the query or who has run it atleast once.
    If any of the queries are not used for a long time then we  can delete it with the user's/owner's approval.
    Is there anyway we can desing such query .
    Thanks
    Asim

    Hi,
    Thanks for the reply.
    My requirement is that we want to create a new query which should fetch the details information of already existing queries.
    Like who has created that query, how frequently the use it etc...
    Whenever we run the new query it should give information of all other existing queries.
    Thanks and Regards
    Asim

  • Help need to create a query

    I need to fetch records from a table. Please help me to create a query
    The Tablename is Employee. It has the following records
    Department Empname Gender
    Finance Tom Male
    Finance Rick Male
    Finance Stacy Female
    Corporate Tom Male
    Corporate Rob Male
    I want to select the value of the Gender field from the Employee table corresponding to a Department
    If all the values in the Gender field are 'MALE' corresponding to 'finance' in the Department field, the value should be 'MALE'
    If there is a value 'FEMALE', the gender corresponding to the Empname 'TOM' should be considered as the gender

    Tables have rows - not records.
    Your question is a basic SQL language question - which means you do not know the SQL language. This forum is not a classroom for teaching you the SQL language.
    Use the following as the basic outline of how your SQL language statement need to look like for selecting the required from the table:
    SELECT
      <<sql projection goes here>>
    FROM <<table name goes here>>
    WHERE <<filter conditions go here>>
    {code}
    The SQL projection specifies the list of columns the SQL need to return to the caller.
    The filter condition is basic predicates and AND and OR  can be used for multiple predicates.
    Go to http://tahiti.oracle.com and look for the +SQL Reference Guide+ for the Oracle version you are using. The +SELECT+ statement syntax is covered in detail and sample statements are provided.
    And please do not expect this forum to be used as a classroom, or expect this forum to do your homework for a class.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Running Connected Query with Run Control Parameters using App Engine

    Hello,
    I created a connected query that has 1 parent query and 1 child query, and use this as DataSource for the report that I am going to generate. I created an app engine that willl be called to generate this report. However, I encounter the error "Error occurred while processing the request. (228,101) PT_CONQRS.CONQRSMGR.OnExecute Name:GetXMLData PCPC:59072 Statement:1309". What could be causing this issue? One cause I am thinking is that the Connected Query not returning any data since I am not able to pass / map the values to the CQ's prompt fields. How is this done in CQ? I've done it in PS Query by using the function SetPSQueryPromptRecord+. I'm trying to search for this function's equivalent in CQ. I was able to search for a workaround (http://mfinchps.blogspot.com/2011/05/how-to-launch-connected-query-xml.html), but I still prefer to have a CQ data source.
    Below is the code that should handle mapping of CQ prompt fields:
    &oConQrsInst = create PT_CONQRS:CONQRSMGR(&OperId, &ReportName);
    &result = &oConQrsInst.Open(&oConQrsInst.Const.InitExisting);
    &CQPromptsArray = &oConQrsInst.QueriesPromptsArray;
    &rcdQryRunParms = CreateRecord(@&PromptRec);
    &sqlSelectQryParms = CreateSQL("%Selectall(:1) WHERE OPRID = :2 AND RUN_CNTL_ID = :3");
    &sqlSelectQryParms.Execute(&rcdQryRunParms, &OperId, &RunControlId);
    /*Loop through the Connected Query "Queries" and fill in each query's prompts as needed*/
    For &arrCtr = 1 To &CQPromptsArray.Len
    &rcdQryPrompts = &CQPromptsArray.Get(&arrCtr).QueryPromptRecord;
    For &i = 1 To &rcdQryPrompts.FieldCount
    While &sqlSelectQryParms.Fetch(&rcdQryRunParms)
    If &rcdQryPrompts.GetField(&i).Name = &rcdQryRunParms.GetField(Field.BNDNAME).Value Then
    &rcdQryPrompts.GetField(&i).Value = &rcdQryRunParms.GetField(Field.BNDVALUE).Value;
    Break;
    End-If;
    End-While;
    End-For;
    &sqlSelectQryParms.Close();
    End-For;
    rem &oRptDefn.SetPSQueryPromptRecord(&rcdQryPrompts);  -> need to have equivalent of this+
    &oConQrsInst.Close();
    Thanks!
    Janet

    i think you have run the code to generate the XML file from your connected query...
    check the following things
    1. Check the Report definition is defined or not for the file that you want generate.
    2. if its defined check the RTF template is present or not.
    3.Check your code in Appengine whether you have mentioned the Report Definition and template name,

  • Do all users of an Excel workbook need to have Power Query installed?

    If I create an Excel file that makes use of Power Query to fetch data, do all users that will open this file require Power Query be installed on their system?
    Shawn Keene

    Yes, they do need to have power query installed. If you fetch data using Power Query, that adds a new type of connection to the list of connections in that workbook. To refresh that connection, you need the Power Query addin to be installed and run.
    Thanks
    Zafar Abbas

  • How to fetch the query by a report

    Post Author: gionnyDeep
    CA Forum: Data Connectivity and SQL
    How to fetch the query by  a report.I need to manipulate it and pass it again to the report.
    Any idea?

    Post Author: gionnyDeep
    CA Forum: Data Connectivity and SQL
    I just need to get the query of a report.
    You know that a report is buld up on a sql query.I just want to know how to get that query starting by  a java ReportClientDocument.
    And I found reportClientDoc.getDatabaseController().getDatabase() to fetch DataBase object .After that I do not know the exact sequence of methods for fetch the query
    Sorry for my english

  • Need to fetch random rownum from a table

    Hi All
    I need to fetch two random records from a table each time I query it. e.g. my_emp_table if this contains unique employee ids, is there any way to write a query which would give a two random employee records, say for first run 11 and 18 and next time 20 and 28 employee record.
    We can get random values by select TRUNC(dbms_random.value(1,250)), TRUNC(dbms_random.value(1,250)) num from dual
    but how do I use these values to get the Nth record using sql?
    Any help will be appreciated.
    Many Thanks!!
    - Shashank

    Looks like this what you are looking for,
    WITH result
         AS (SELECT       LEVEL id, ROWNUM rn
                   FROM   DUAL
             CONNECT BY   LEVEL <= 10),
         required
         AS (SELECT       TRUNC (DBMS_RANDOM.VALUE ( 1, 10)) rn
                   FROM   DUAL
             CONNECT BY   LEVEL <= 2)
    SELECT   *
      FROM   result a, required b
    WHERE   a.rn = b.rnG.

  • Need help in MDX query

    Hi All 
    I am new to MDX language and need a MDX functions/query on the cube to get the required output, Given below is the scenario with the data. 
    I am maintaining the data in a table in dataMart with given structure. We have the data at day and weekly in a single table with granularity indicator and count is the measure group column. While loading the data in to mart table we are populaiting the week
    Key from week table and Month key from month table and joining in the cube.
    we need to calculate the inventory for a particular month. If a user selects a particular month the output would be count = 30 as  a measure called Closed and count = 16 as a measure value called Open.
    Need a MDX query to get output.
    Granularity  Count WeekKey MonthKey
    Weekly 16
    W1 M1
    Weekly 17
    W1 M1
    Weekly 18
    w1 M1
    Weekly 19
    W1 M1
    Weekly 20
    W1 M1
    Weekly 21
    W1 M1
    Weekly 22
    W1 M1
    Weekly 23
    w2 M1
    Weekly 24
    w2 M1
    Weekly 25
    w2 M1
    Weekly 26
    w2 M1
    Weekly 27
    w2 M1
    Weekly 28
    w2 M1
    Weekly 29
    w2 M1
    Weekly 30
    w2 M1
    Weekly 16
    w3 M1
    Weekly 17
    w3 M1
    Weekly 18
    w3 M1
    Weekly 19
    w3 M1
    Weekly 20
    w3 M1
    Weekly 21
    w3 M1
    Weekly 22
    w3 M1
    Weekly 23
    w4 M1
    Weekly 24
    w4 M1
    Weekly 25
    w4 M1
    Weekly 26
    w4 M1
    Weekly 27
    w4 M1
    Weekly 28
    w4 M1
    Weekly 29
    w4 M1
    Weekly 30
    w4 M1
    Thanks in advance

    Hi Venkatesh,
    According to your description, you need to count the members with conditions in a particular month, right?
    In MDX, we can achieve the requirement by using Count and Filter function, I have tested it on AdventureWorks cube, the sample query below is for you reference.
    with member [ConditionalCount]
    as
    count(filter([Date].[Calendar].[Month].&[2008]&[2].children,[Measures].[Internet Order Count]>50))
    select {[Measures].[Internet Order Count],[ConditionalCount]} on 0,
    [Date].[Calendar].[Date].members on 1
    from
    (select [Date].[Calendar].[Month].&[2008]&[2] on 0 from
    [Adventure Works]
    Reference
    http://msdn.microsoft.com/en-us/library/ms144823.aspx
    http://msdn.microsoft.com/en-us/library/ms146037.aspx
    If this is not what you want, please elaborate your requirement, such as the detail structure of your cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Do i need wire less connection to verify my itunes account and to use my itouch?

    do i need wire less connection to verify my itunes account and to use my itouch?

    You only need to verify your payment details.  Have you done that so far?  See here for more information.
    iTunes Store: My credit card's security code or zip code does not match my bank's records
    B-rock

  • How to fetch the query string in BW?

    Hi Gurus,
    How can fetch the query string from BW Server to implement  Bex web application Iview.
    *Now to get the information "BEx Web Application Query String". open the SAP Log on and open the BW Browser, double click any of the queries available, this will open a window and select the Query String ( it should be between & to end &).*
    Explain the above point with more detail like how will open the bw browser what is the step for that?where the query string will available in BW browser.
    Higher points will be rewarded for valuable inputs.
    Thanks in Advance,
    Dharani

    hi ,
    What krishna suggested is right ... Another method can be like :
    &CMD=LDOC&infocube=0D_DECU&query=SALES_DEMO_2
    Get this information from your BI consultant.
    Please close thread if you got ur answer!!!
    Regards
    Parth

  • Need to fetch the last record/row from a table

    Hi,
    I have a requirement like fetching the closing balance of the last record of the table and inserting the same into the opening balance of the immediatetly created next record.
    In simple words, I need to fetch a value from the last row of the record.
    For example, I use the below query,
    select rownum, empno, ename from emp
    where rownum = (select count(rownum) from emp);
    But, the above query does not return any of the record.
    Hence, need help on this.
    Regards,
    Shivakumar A
    Edited by: shiva on Mar 27, 2011 10:14 PM

    Rows in a table are inherently unordered. In order to introduce the concept of "first" and "last", you would need to specify how to order the rows which would require that there was one or more columns in the table that you could order by in order to determine the "last" record.
    In your closing balance example, if we assume that there is something like a BALANCE_DATE column,
    SELECT account_number, balance_amount, balance_date
      FROM (
        SELECT account_number,
               balance_amount,
               balance_date,
               rank() over (partition by account_number order by balance_date desc) rnk
          FROM table_of_balances )
    WHERE rnk = 1Justin

  • Form Error 40507: unable to fetch next query record

    Hi there folks,
    I have a Form (10g) where I have a Master Block and a Detail block. However, the other day, there was an Error reported:
    ORACLE error: unable to fetch next query record
    When we do capture Errors, we also capture the Last Query run. From that, it says that the last record that was queried was in the Detail block (Which is multi-record block) in tabular form. I looked at the Error Message but there is not much information on this Error.
    So, it's just a base table block and it has a drop down list which has two values. Any ideas what could have happened?
    Thanks!

    The Block is based on a a table. As a mattr of fact, there are 3 blocks in the form and they are all based on tables. Now, it migth be wrong for me to assume that the detail block in the one that caused the problem just because the Last Query was based on the detail block.
    Block 1 is a single record block -- Master Block
    Block 2 is a tabular block -- Detail Block
    Block 3 is a tabular block -- Detail Block
    There are two relations:
    Block 1 and Block 2
    Block 1 and Block 3

  • Connected Query issue

    Hello -
    I've been working on creating a payroll report with tax balance and earnings data.
    I have a query for each set of data.
    Each set has an emplid and a balance_year as key fields.
    Since I can get all of the tax balance data in one record I am using it as my parent record in connected query.
    For earnings information there could be up to 25 records per employee so I am using these records as child records to the Tax parent.
    The issue is that when Preview XML is selected only the Tax Balance XML record is displayed for the first 6 records.
    No child record data is displayed.
    Any one else run into this before and come up with a solution?
    Thank you,
    Mike

    Default rows to fetch is 6 as defined in the Max Rows Fetched For Query field, if you set this to a greater number it will fetch more data or 0 it will fetch all data.
    http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tpsq/img/sm_ConnectedQueryQuickStartPreviewPage7f77_tpsq7f81.png
    PeopleBooks > PeopleTools 8.52: PeopleSoft Query > Using Connected Query > Step 5: Preview a Connected Query
    http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq07.htm#H4013

  • Where to see query details(urgent)

    Hi xperts,
    Can you please tell me where to see the runtime detaile of the query if we excute in the browser or in query analiser it is not aback ground job by default.Due points will be given.
    Thanks in advance,
    Dan

    Hello Dan,
    I am not sure about the BW release you are using, therefore, I would provide the solution for both the releases.
    BW 3.5 (NW04)
    In case, you are using BEx Analyzer or the browser for executing the query, you can see the query runtime statistics in the BW system only if the BW statistics for the InfoCube are activated on which the query is running.
    Therefore, please activate the BW statistics on all the Basic InfoCubes on which the query is running. You can do this from TCode: RSDDSTAT or from RSA1-> Tools -> BW Statistics for InfoProviders.
    Now, execute the query from BEx or the portal and after executing login to the BW system (ABAP system) and go to Transaction SE16.
    In transaction SE16, enter the table name as (Table Name = RSDDSTAT)and in the QueryID field enter the technical name of the "query" and then press execute.
    Now, you will see all the runtime statistics for the query, like the total runtime, DB time, OLAP time and the frontend time.
    The other way to see the query details is to run the same query in the "Query Monitor" (TCode : RSRT) with the option "execute and debug" and in the options select "display runtime statistics". After you execute the query on the output screen, just go back and you will see the query statistics for the current exection of the query.
    BI 7.0 (NW 7.0)
    Same things need to be followed here also.
    The difference is that you can activate the BI statistics on a query also in case of BI 7.0.
    Therefore, from "RSA1 -> Tools -> Settings for BI statistics" or from TCode: RSDDSTAT, activate the statistics on the query, you are referring to.
    Now, after running the query in BEx Web Analyzer or BEx Excel addin, you can again go to SE16 and here now, you need to enter the table name as "RSDDSTAT_OLAP" to see the new BI query runtime statistics.
    For getting the details of the DM time, you can also use the RSDDSTAT_DM table.
    The other option of RSRT is also valid in this case.
    I hope, I have answered your query.
    Please let me know in case of any doubts.
    Regards,
    Yash Vardhan

Maybe you are looking for

  • How can we call the method of used controller?

    Hi All,    i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window

  • "Convert" from RAW to JPEG?

    I normally shoot in RAW so I have the power to make more accurate corrections, if needed. 90% of the time I don't need the RAW image after I've made adjustments, however. Here's what I would like to accomplish using Aperture 3: -Import RAW images -Ma

  • Struts-InfoView.xml file

    I'm currently running XIR2SP3 on a Windows server, Tomcat 5.0.27.  My Performance Mgmt link thru Infoview was working fine up until today when I received this error in the Tomcat logs: Parse Error at line 2 column 16: Document root element "struts-co

  • ExtendScript filesystem access breaks mysteriously

    Hi, I am experiencing mysterious issue with ExtendScript filesystem access. I have two ExtendScript functions which I am calling from my Illustrator html5 panel: function p1_open(path) {      app.open(new File(path)); function p1_openAsLayer(name, pa

  • SQL query to empty database ...

    Hello every one I have to questions 1. Is there any SQL command by executing which I can see where particular foreign key belongs to. For example when I am trying to delete a data in particular table I got an foreign key relation ship error, I can se