Finding sql query in statspack report

Hi;
I have 11.5.10.2 and db version is 9iR2.. i took one statspack report and i should find one sql query... But admin is kill session and i cant see complite query under SQL ordered by Gets for DB...
so the question is can i find this query whihc is kiiled by admin?
thanks

Hi,
Its bad news to cant find this sql.. If normaly it istn killed by admin, i could find it from stats$sql_summary or v$sql_text??It is possible.
Note: 153507.1 - Oracle Applications and StatsPack
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=153507.1
And one other question... If i suspect from one sql is eating my cpu or my server resource, how i can find this sql? Under which title i can find in statspack reportRefer to:
Note: 232443.1 - How to Identify Resource Intensive SQL for Tuning
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=232443.1
Regards,
Hussein

Similar Messages

  • How to enable show SQL Query in Crystal report tool

    Hi,
    How can we enable the show SQL Query under Database tab in crystal report...
    We have a requirement to modify the SQL query in Crystal reports.
    Thanks,
    Gana

    Gana,
    CR has an "Add Command" feature that will allow you to use hand-coded SQL as your data source.
    Look at Defining an SQL Command in CR's online help (F1).
    If a command was used in the original report creation, it's a simple matter to go in and edit that SQL.
    If the report was not originally built w/ a Command you may find it difficult to switch over. In most cases it easier to start over from scratch, creating a new, blank report, that uses the command.
    Jason

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • Modify SQL query in Crystal Reports 2013

    Bonjour,
    Je voulais savoir s'il était possible de modifier la requête SQL dans Crystal Reports 2013, car les bases de données de notre application pour bibliothèque utilise un format de date particulier qu'il nous faut corriger directement dans la requête SQL.
    Merci pour vos informations.
    Cordialement
    Claude Marcilly
    Cannes - France
    Hello,
    I wanted to know if it was possible to modify the SQL query in Crystal Reports 2013. Databases of our application library indeed use a particular date format that we need to fix directly into the SQL query.
    Thank you for your information.
    Best regards
    Claude Marcilly
    Cannes - France

    Hi Claude,
    If you are creating reports using tables then go in Database menu and click on show SQL query, this will show the SQL generated by crystal reports.  Now go in database expert and expend your connection and double click on Add Command and past the query which was generated by Crystal and try to modify the date format and click OK.
    Now you need to redesign your reports based on Add command.
    or
    If your reports datasource is Add command you can directly go in add command and change it.
    -Sastry

  • How Can I find SQL Query in Database

    Dear Experts,
    How Can I find SQL Query in Database.

    Hi,
    U mena what query got executed in db? u can try V$SQL for it.
    Regards
    Bharath

  • How to find sql query using hash value

    Hi,
    DBVERSION: 9.2.0.8
    I generated statspack report and i want to see total query and i have hash_value here.
    in v$sql am not able to see all the querys ...pls suggest me other ways..
    Thanks,
    Srini...

    Srini wrote:
    Thanks Nikolay,
    But that views are not available in 9i , my DB is in 9.2.0.8...Use v$SQLAREA
    SQL> desc v$sqlarea
    Name                                      Null?    Type
    SQL_TEXT                                           VARCHAR2(1000)
    SQL_FULLTEXT                                       CLOB
    SQL_ID                                             VARCHAR2(13)
    SHARABLE_MEM                                       NUMBER
    PERSISTENT_MEM                                     NUMBER
    RUNTIME_MEM                                        NUMBER
    SORTS                                              NUMBER
    VERSION_COUNT                                      NUMBER
    LOADED_VERSIONS                                    NUMBER
    OPEN_VERSIONS                                      NUMBER
    USERS_OPENING                                      NUMBER
    FETCHES                                            NUMBER
    EXECUTIONS                                         NUMBER
    PX_SERVERS_EXECUTIONS                              NUMBER
    END_OF_FETCH_COUNT                                 NUMBER
    USERS_EXECUTING                                    NUMBER
    LOADS                                              NUMBER
    FIRST_LOAD_TIME                                    VARCHAR2(19)
    INVALIDATIONS                                      NUMBER
    PARSE_CALLS                                        NUMBER
    DISK_READS                                         NUMBER
    DIRECT_WRITES                                      NUMBER
    BUFFER_GETS                                        NUMBER
    APPLICATION_WAIT_TIME                              NUMBER
    CONCURRENCY_WAIT_TIME                              NUMBER
    CLUSTER_WAIT_TIME                                  NUMBER
    USER_IO_WAIT_TIME                                  NUMBER
    PLSQL_EXEC_TIME                                    NUMBER
    JAVA_EXEC_TIME                                     NUMBER
    ROWS_PROCESSED                                     NUMBER
    COMMAND_TYPE                                       NUMBER
    OPTIMIZER_MODE                                     VARCHAR2(10)
    OPTIMIZER_COST                                     NUMBER
    OPTIMIZER_ENV                                      RAW(2000)
    OPTIMIZER_ENV_HASH_VALUE                           NUMBER
    PARSING_USER_ID                                    NUMBER
    PARSING_SCHEMA_ID                                  NUMBER
    PARSING_SCHEMA_NAME                                VARCHAR2(30)
    KEPT_VERSIONS                                      NUMBER
    ADDRESS                                            RAW(4)
    HASH_VALUE                                         NUMBER
    OLD_HASH_VALUE                                     NUMBER
    PLAN_HASH_VALUE                                    NUMBER
    MODULE                                             VARCHAR2(64)
    MODULE_HASH                                        NUMBER
    ACTION                                             VARCHAR2(64)
    ACTION_HASH                                        NUMBER
    SERIALIZABLE_ABORTS                                NUMBER
    OUTLINE_CATEGORY                                   VARCHAR2(64)
    CPU_TIME                                           NUMBER
    ELAPSED_TIME                                       NUMBER
    OUTLINE_SID                                        VARCHAR2(40)
    LAST_ACTIVE_CHILD_ADDRESS                          RAW(4)
    REMOTE                                             VARCHAR2(1)
    OBJECT_STATUS                                      VARCHAR2(19)
    LITERAL_HASH_VALUE                                 NUMBER
    LAST_LOAD_TIME                                     DATE
    IS_OBSOLETE                                        VARCHAR2(1)
    IS_BIND_SENSITIVE                                  VARCHAR2(1)
    IS_BIND_AWARE                                      VARCHAR2(1)
    CHILD_LATCH                                        NUMBER
    SQL_PROFILE                                        VARCHAR2(64)
    SQL_PATCH                                          VARCHAR2(30)
    SQL_PLAN_BASELINE                                  VARCHAR2(30)
    PROGRAM_ID                                         NUMBER
    PROGRAM_LINE#                                      NUMBER
    EXACT_MATCHING_SIGNATURE                           NUMBER
    FORCE_MATCHING_SIGNATURE                           NUMBER
    LAST_ACTIVE_TIME                                   DATE
    BIND_DATA                                          RAW(2000)
    TYPECHECK_MEM                                      NUMBER
    IO_CELL_OFFLOAD_ELIGIBLE_BYTES                     NUMBER
    IO_INTERCONNECT_BYTES                              NUMBER
    PHYSICAL_READ_REQUESTS                             NUMBER
    PHYSICAL_READ_BYTES                                NUMBER
    PHYSICAL_WRITE_REQUESTS                            NUMBER
    PHYSICAL_WRITE_BYTES                               NUMBER
    OPTIMIZED_PHY_READ_REQUESTS                        NUMBER
    LOCKED_TOTAL                                       NUMBER
    PINNED_TOTAL                                       NUMBER
    IO_CELL_UNCOMPRESSED_BYTES                         NUMBER
    IO_CELL_OFFLOAD_RETURNED_BYTES                     NUMBERYou have HASH_VALUE and SQL_FULLTEXT to identify your query. Remember if query is long then you needt to set proper parameters like
    set long 80000
    set pagesize 200
    set linessize 200
    Was that helpful?

  • How to find a query name from report name

    I have a report in my system with the name AQICMM==========P2============ . I believe this was created from a query. How to find the query corresponding to this report ? I need to change the logic for certain columns of the report. How to know if this was created from SQVI or SQ01 or any other transaction.
    THanks.

    Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
    Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM

  • How to use SQL Query in OBIEE Reports

    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advance

    796797 wrote:
    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advanceArrggh. I wish people wouldn't just answer a question without taking the time to actually think about what the user is asking for and if it makes sense. I like Diney's response best: Why not use the Title View? (i.e., asking questions until it is clear what is needed.) So along those lines, why are you trying to put the name of your report in a column of your report?? And why do you need to use direct sql to do this??
    Kindly or not, urgent or not, state what you are trying to achieve and why you need it (if the obvious answer like "using the Title View" doesn't work for you), instead of simply assuming your method is right and you need to know how to do what envision. Your method may not be correct or necessary.

  • Access APEX_APPLICATION.G_F01 in an SQL query for a report

    APEX 4.0.2.00.07
    I've got a standard report with checkboxes. The SQL is along the lines of:
    SELECT APEX_ITEM.CHECKBOX(1,empno,'CHECKED') " ",
           ename,
           job
    FROM   empThen I have another report below this, which I want to drive based on the items checked in the first report. I know that the checkbox values will go into the APEX_APPLICATION.G_F01 collection. Normally these are accessed using pl/sql such as:
    FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
        DELETE FROM emp WHERE empno = to_number(APEX_APPLICATION.G_F01(i));
    END LOOP;But is there any way I can access the collection from the sql for my second report.
    i.e. I want my sql to be something like:
    SELECT empno, day_of_service
    FROM   emp_timesheet
    WHERE emp_no in <get access to the collection here>I was hoping that the check box collection would be available from the APEX_COLLECTIONS view, but it doesn't seem to be there.
    Thanks,
    John

    John,
    If the goal is to hold onto the checked values for some other processing then you could add them to a collection yourself.
    create a process on your page which looks something like this:
    This will create your collection if it does not exist or delete everything currently in it if it does exist and then insert your new selections.
    DECLARE
       l_col_name varchar2(30) := 'EMP_SELECTED';
    BEGIN
        apex_collection.create_or_truncate_collection(l_col_name);
        FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
            apex_collection.add_member(
                l_col_name,
                to_number(APEX_APPLICATION.G_F01(i))
        END LOOP;
    END;your second query could look something like this:
    SELECT empno, day_of_service
      FROM emp_timesheet
    WHERE empno in (select C001 empno
                       from apex_collections ac
                      where ac.collection_name = 'EMP_SELECTED')
    Edit
    some people choose to create a view ontop of certain collection queries which will be reapeated throughout the application so you could also just
    create view selected_emps as
    select C001 empno
      from apex_collections ac
    where ac.collection_name = 'EMP_SELECTED'   and your new query would look like:
    SELECT empno, day_of_service
      FROM emp_timesheet
    WHERE empno in (select empno
                       from selected_emps)Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Apr 6, 2011 10:37 AM

  • Using SQL Query Values as Report Parameters

    Why can I not use a page item to pass a value to a report when that page item is populated by a SQL query? If the item is populated as a database item, it can be passed, but not otherwise. Is there a way to work around this problem so that I can pass parameters to a report?

    Hi, Jeff
    Thanks for asking about this problem. This issue involves two tables mainly and others peripherally. I have a person table with borrower names and addresses, and each record in this table has an identifier in a column called IDENT. There is also a loan table with essential data on the loan, e.g.., loan identifier (DKTNR), the amount, interest rate, maturity date, etc., and also the IDENT linking to the person table. The borrower can be identified from any table that has the DKTNR in it by querying the borrower's name from the person table via the IDENT in the loan table. E.g., select borrower's name from loan_table, person_table where loan_table.ident = person_table.ident and the dktnr here equals the dktnr in the loan table.
    I put the borrower's name on each APEX page using this query. I have one table, for example, which stores default accountings (i.e., accountings on loans that have defaulted and, generally, on which the lender has had to expend money to maintain the loan's maritine collateral). The records in this table are identified by the DKTNR. So on the reports page which shows this accounting, there is a non-database_column field (page item) populated via this query. If I want to use the value of this page item on an Oracle report that can be printed, I cannot do so. I place it into a variable (I forgot the name of the variable type, but it is the &PX_ITEM_NAME. type) in the URL which calls the report, but it will not be placed in the report. It is as if I have put a null value into the variable.
    Ideas?

  • Passing SQL query at runtime - Report

    Hi,
    There is some way to pass a sql query at runtime from a Form to report? I need to set some report object property?
    Thanks
    Sandro

    You can pass the parameter same as you pass the other parameters. Define a variable that will hold the Query and then pass that parameter from form to report.
    Regards,
    Eric.

  • Finding deadlock Info in Statspack report

    Hi DBA Gurus,
    Is it possible to get some information relevant to deadlocks from statspack report? I have been asked to analyze the report 1 hour before the deadlock occurred and the hour during which the deadlock occurred.
    Thanks
    Saravanan

    Hi Saravanan,
    STATSPACK report generates system wide statistics and i dont think it would be helpful to debug your deadlock , the statspack report generated for the interval when deadlock occured might show you an increase in your enqueue statistics etc. You can enable trace for your application and find out the area of contention. Is the box a Production server ?
    Thanks,
    Khalid

  • Show the SQL query on the report itself

    I'd like to show the entire SQL query in print at the end of a report, say in the Report Footer section so that the user could review it let me know what edits are needed to meet their needs.  Thanks

    Since the query itself doesn't really change (except for parameter values passed to selection criteria), you can just open the Show SQL Query and paste it into a text box.
    Beyond that, there isn't a way to add via a "Special Field".
    HTH,
    Jason

  • How to find sql query using sqlid

    Hi
    I am not aware of that sqlid .DBA is saying a particular sqlid is making problem .how to find the particular sql query using sql_id ?

    Are you aware of modplsql when i executed the query the result is like
    DECLARE
       rc__             NUMBER;
       simple_list__    OWA_UTIL.vc_arr;
       complex_list__   OWA_UTIL.vc_arr;
    BEGIN
       OWA.init_cgi_env (:n__, :nm__, :v__);
       HTP.htbuf_len := 84;
       NULL;
       NULL;
       simple_list__ (1) := 'sys.%';
       simple_list__ (2) := 'dbms\_%';
       simple_list__ (3) := 'utl\_%';
       simple_list__ (4) := 'owa\_%';
       simple_list__ (5) := 'owa.%';
       simple_list__ (6) := 'htp.%';
       simple_list__ (7) := 'htf.%';
       simple_list__ (8) := 'wpg_docload.%';
       IF ((owa_match.match_pattern ('Oly_browse.oly_pattern ',
                                     simple_list__,
                                     complex_list__,
                                     TRUE
       THEN
          rc__ := 2;
       ELSE
          NULL;
          NULL;
         oly_browse.oly_pattern (search_phrase      => :search_phrase,           --Oly_browse.oly_pattern is package name
                                btn                => :btn,
                                p_qual             => :p_qual,
                                p_bcat             => :p_bcat,
                                p_stdy             => :p_stdy,
                                p_bloc             => :p_bloc,
                                z                  => :z
          IF (WPG_DOCLOAD.is_file_download)
          THEN
             rc__ := 1;
             WPG_DOCLOAD.get_download_file (:doc_info);
             NULL;
             NULL;
             NULL;
             COMMIT;
          ELSE
             rc__ := 0;
             NULL;
             NULL;
             NULL;
             COMMIT;
             OWA.get_page (:data__, :ndata__);
          END IF;
       END IF;
       :rc__ := rc__;
    END; Edited by: vishnu prakash on Sep 8, 2010 10:16 PM

  • How to find exact query executed by reports with parameters

    Hi,
    I am running a report which errors out with below log messages.
    REP-0004: Warning: Unable to open user preference file.
    REP-0300: ORACLE error occurred.
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-300: ORACLE error occurred.
    In toad, the query is not giving any error message.
    I want to know what exact query is being executed by oracle report server.
    How can I find exact query executed?
    Abdul Wahid

    Hi Bobby,
    I had already tried to enable trace. But when I enable trace, report builder crashes!!
    I created SR also, and oracle says that they do not support 10.1.2.0.2. I should update to 10.1.2.3.
    I installed the 10.1.2.0.2 in xp mode and tried to update with 10.1.2.3. However, the updgrade failed saying that there is no update patch required/found or something like that.
    Abdul Wahid

Maybe you are looking for