How to display a specific sql's expalin plan in pl/sql block?

Hello Experts,
Maybe this is very simple question but I am really wondering, how to see explain plan of the following sql.
DECLARE
     p_value number;
BEGIN
     FOR i IN (SELECT * FROM emp WHERE empno = p_value)
     LOOP
          -- do something
     END LOOP;
END;
Thanks

SKP wrote:
Enable session trace
execute your PLSQL
End the session trace.
Now your trace file is ready.
Use TKPROF utility to see the trace.
Now you will see the used execution plan of SQL used in the PLSQL program.
Read Using Application Tracing Tools
So, you say I have to use sql trace?
Thank you by the way.

Similar Messages

  • Q: how can i write PL/SQL block to check prerequisite?

    Hello...
    I designed an application using sql*plus statment for creating database and developer for creating forms, for on-line registration system for universties,
    so I need to teach me how can I write pl/sql block to check the prerequisite, taken courses, and complete hours for the students who wants register the courses via Internet.
    thanks alot in advance
    kindly send the answers a.s.a.p

    please repost this in the SQL & PL/SQL forum
    thanks - OTN

  • How to display DB specific data in WEBI for users with Single Universe

    hi,
    I have a WEBI report which is based on Single Universe, which can support both Oracle and SQL Server databases.
    There are 2 users for this report.
    1) Oracle_User
    2) SQLServer_User
    When 'Oracle_User' opens report in InfoView, he should see the data from Oracle DB
    When 'SQLServer_User' opens the same report in InfoView, he should see the data from SQL Server DB
    Please let me know how to achieve this functionality.
    Can we dynamically change the Universe connection based on the User who logged into InfoView..?
    Thanks,
    Vamsee

    hi Anil,
    Thank you for the response.
    I have tried creating 2 connections and restricted each connection for each group, but in Infoview, only one group user is able to refresh the report, whose connection is exported along with the Universe. when the other group user tries to refresh the report, an error is displayed 'You donot have access  the data from this Universe'.
    So the reason is : 'As Universe can be exported to Repository with only one connection' that connection specific group user is able to access data from Universe Whereas other groupuser cannot( as other connection can't be exported along with the same universe).
    As Universe can be exported to Repository with only one connection, how should these connections set for the corresponding groups?
    Could you please provide me the detailed steps w.r.t connections restrictions...?
    Thanks,
    Vamsee

  • How to display a specific folder item ?

    Hi,
    Having the item id, how can we display the content of that item in a page/portlet ?
    Michael

    Alvaro,
    Maybe the item source type could be SQL Query and the query would be: select seq.nextval from dual. Or you could have a before-header page computation do the same thing for the item.
    scott

  • How to display a specific SAP logon screen per system?

    Hello,
    I woud like to display a logon screen which contains system-specific information, e.g. for the QAS system it would be something like "This system was created by a system copy from PRD on MM/DD/YYYY"...
    I have gone through the SAP Note 205487 and my understanding is that I have to create the ZLOGIN_SCREEN_INFO in the development (changeable) system and transport it.
    Note 205487 : "Creating/changing this text requires a changeable system. Therefore, for production systems, SAP recommends maintaining the text in the upstream system and then transporting it."
    Can anyone please provide me with some hints on how to create a different logon screen for each system and apply them via transport requests?
    I prefer not to "open" the QAS system in order to create the logon screen because I would then have to "open" the productive system to create a different logon screen...
    Any help is appreciated.
    Thanks and Regards,
    Michel M.

    Hi Michel,
    Please refer to below documents for modifying SAP Logon screen and transporting to other system.
    [How to customize the login screen|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=22219]
    [Customizing SAP Login Screen|http://www.abap-tutorials.com/2009/12/30/customizing-sap-login-screen/]
    [SAP logon screen, SE61, ZLOGIN_SCREEN_INFO|SAP logon screen, SE61, ZLOGIN_SCREEN_INFO; 
    Hope it helps
    Regards
    Arun

  • How to Displaying Operating specific data in Discoverer Reports.....?

    Hi Experts,
    My Requirement : I need to develope one custom report where it has to display operating unit specific data based on the resposibility selection in Discoverer.
    My Approach : I prepared the below query and I am trying to pick Business_group_id from profile options and passing to the query.(You can observe the condition which is highlighted as red color)While i am running the query I am getting zero records.
    Please suggest me how to achieve the my requirement of displaying operating unit specific data in Discoverer.
    SELECT  A1.PERSON_ID
           ,A1.employee_number
           ,A1.first_name
           ,A1.last_name
           ,A1.known_as PREFERRED_NAME
           ,A1.GENDER
           ,A1.date_of_birth
           ,A1.Marital_status
           ,A1.original_date_of_hire
           ,A1.Organization
           ,A1.Location
           ,A1.Job_name
           ,A1.OLF_DEPARTMENT
           ,A1.OLF_DEPT_SUBGROUP
           ,A1.salary
           ,A1.salary_change_date
           ,A1.HIRE_DATE
           ,A2.PERSON_ID SUPERVISOR_ID
           ,A2.EMPLOYEE SUPERVISOR
           ,A3.PERSON_ID SUPERVISOR_ID_1
           ,A3.EMPLOYEE SUPERVISOR_NAME_1 
    FROM (
    SELECT PAPF.first_name
          ,PAPF.last_name
          ,papf.known_as
          ,papf.*** GENDER
          ,papf.date_of_birth
          ,papf.marital_status
          ,papf.employee_number
          ,PAPF.person_id
          ,PAAF.supervisor_id     
          ,PAPF.original_date_of_hire
          ,(SELECT name FROM  hr_all_organization_units WHERE Organization_id=PAAF.organization_id) Organization
          ,(SELECT location_code FROM  hr_locations WHERE location_id=PAAF.Location_id) Location
          ,(SELECT name FROM  per_jobs WHERE job_id=PAAF.job_id) Job_name
          ,PPP.proposed_salary_n SALARY
          ,ppp.change_date salary_change_date
          ,ppgk.segment1   OLF_DEPARTMENT
          ,ppgk.segment2  OLF_DEPT_SUBGROUP
          ,papf.original_date_of_hire HIRE_DATE
      FROM per_all_people_f PAPF 
          ,per_all_assignments_f PAAF
          ,per_pay_proposals  PPP
          ,PAY_PEOPLE_GROUPS_KFV ppgk
    WHERE 1=1
       AND PAPF.person_id=PAAF.person_id
       AND papf.business_group_id=paaf.business_group_id
       AND PAAF.assignment_id=PPP.assignment_id
       AND paaf.people_group_id=ppgk.people_group_id
       AND ppp.change_date =(SELECT MAX(change_date)
                               FROM per_pay_proposals
                              WHERE assignment_id=PPP.assignment_id)
       AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
       AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date<font color="red">AND PAPF.BUSINESS_GROUP_ID = TO_NUMBER(FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID '))</font>
    ) A1
    SELECT PAPF.first_name
    ||','||PAPF.last_name EMPLOYEE,PAPF.PERSON_ID,PAAF.supervisor_id
    FROM per_all_people_f PAPF
    ,per_all_assignments_f PAAF
    WHERE PAPF.person_id=PAAF.person_id
    AND papf.business_group_id=paaf.business_group_id
    AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
    AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    ) A2
    SELECT PAPF.first_name
    ||','||PAPF.last_name EMPLOYEE
    ,PAPF.PERSON_ID
    ,PAAF.supervisor_id
    FROM per_all_people_f PAPF
    ,per_all_assignments_f PAAF
    WHERE PAPF.person_id=PAAF.person_id
    AND papf.business_group_id=paaf.business_group_id
    AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
    AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    ) A3
    WHERE 1=1
    AND A2.PERSON_ID(+)=A1.SUPERVISOR_ID
    AND A3.PERSON_ID(+)=A2.SUPERVISOR_ID
    AND A4.PERSON_ID(+)=A3.SUPERVISOR_ID
    ;

    Pl identify versions of OS, database, EBS and Discoverer. Have you reviewed these MOS Docs ?
    373634.1 - Using Discoverer 10.1.2 with Oracle E-Business Suite Release 12
    1074326.1 - Using Discoverer 11.1.1 with Oracle E-Business Suite Release 12
    313418.1 - Using Discoverer 10.1.2 with Oracle E-Business Suite 11i
    1073963.1 - Using Discoverer 11.1.1 with Oracle E-Business Suite Release 11i
    HTH
    Srini

  • How to display a specific tab in a screen after a popup message

    Hi all,
            I've a rewuirement where in i need to display a secific tab in a screen after popping up a warning message. To be specific, when i choose 'Yes' in the popup window, it shoud take me to a tab which is not active while displaying the warning popup.
    Thanks in advance....
    Anil Kumar Japa

    Hi
    U need to active the tab you want to show:
    So you should set the ok_code (of the tab) value to field ACTIVETAB
    <TABSTRIP>-activetab = <OK_CODE>.
    And transfer the value of subscreen number to the subscreen area:
    CALL SUBSCREEN SUBSCREEN1
                 INCLUDING G_CTRL_TABSTRIP-PROG             
                           G_CTRL_TABSTRIP-SUBSCREEN.
    Max

  • How to display report from SQL query string

    <p>I am a new user at this forum, my name is Muneer.</p><p>I have a doubt please help me</p><p>I am develoing an Institute Management System (Plat form VB.Net 2003), that can add participant details, course details, Account details so and so....</p><p>my problem is i have a VB.net form ,that form include combo box and flex grid.</p><p>when i select a text from combobox, data will be display in flexgrid its ok. but i want same out in Report.</p><p>when i try to make it showing all data please help me asap. how can i pass data to report.</p><p>I am using ADODB.Connection method with Access Database.</p><p>waiting ur valuable reply</p><p>Muneer</p>

    This sample passes ado data to a report.
    [http://diamond.businessobjects.com/node/2052Â | /node/2052]
    Rob Horne
    Rob's blog - http://diamond.businessobjects.com/blog/10</p>

  • How to display output of SQL Loader in a readable format

    Hi All,
    We have an inbound interface wherein we are uploading data from a flat file to Oracle Applications.
    The entire process is happening in a request set -
    1. Loading from flat file to staging tables via SQL Loader
    2. Validating Data in staging tables
    3. Uploading in Oracle standard tables
    User says that the log file which shows the output of SQL Loader (step 1) is not readable and they want the data in some particular format which is understandable/readable for them.
    Firstly, help me understand is it possible.
    Also I have heard about BAD file, can anyone tell me where is it created and by what name and can we fetch that file created ?
    Any pointers would be really helpful.
    Regards,
    Shruti

    Hi
    DATA :
      w_i TYPE i VALUE 1,
      w_temp TYPE i VALUE 1..
    WHILE w_temp LE 10.
      w_i = 1.
      WHILE w_i LE w_temp.
        WRITE :
          w_i.
        ADD 1 TO w_i.
      ENDWHILE.
      SKIP.
      ADD 1 TO w_temp.
    ENDWHILE.
    Regards
    Pavan

  • How to display warning in SQL Develooper?

    I just compiled a package body and recieve the message:
    Warning: execution completed with warning
    PACKAGE BODY test_pkg Compiled.
    Where can I see the details fo the warning?

    When I compile in developer, a window pops up at the bottom of the screen.
    By clicking the tab that says "Complier", it shows me the errors and/or warnings I got.
    For future reference, SQL Developer would be a better place for SQL Developer questions.

  • How to pass parameter into sql block?

    example code
    @script.sql a b c d
    Inside script
    DECLARE
    cursor cur is select col1 from table where col1 in ('a','b','c','d','e');
    BEGIN
    END;
    Not sure 1) The the total number of parameters will be passed at run time
    2) Not sure of case, could be lower upper or both....
    Please help...

    do you have different queries which are defined to use different numbers of parameters, OR (more likely) sometimes you just want to pass less parameters?
    sqlplus / @file1 "a" "b" "" "" ""
    now I only passed 2 "real" params, and 3 blanks. that way, sqlplus still has the values of &3 - &5 defined, and everything works fine. you'lll need either single or double quotes (or perhaps single quotes within double quotes) depending on your os, version, etc.

  • How to display three different images in three planes(xy,yz,zx) simultaneously

    Hi,
    I am looking for some help on displaying three images on three planes(i.e, xy,yz,zx planes) at a time such that the user can see all the images and interpret them.The images should be arranged as in the faces of a cube.If anyone has any idea, their help is greatly appreciated.
    Thanx
    marooner

    marooner,
    I am curious about your application. I am having a hard time coming up with a reason for this style of display. I have some image mapping tools that could be used to do what you are asking for. Send me an email at [email protected], and we can discuss it further.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How to display column headings only once in each page with repeated blocks

    Hi,
    I have a report with 1 block on one column. The block has a table in it and will repeat in one page.
    I need to display the column headers only in the beginning of each page. Can someone share your experience in implementing this ?
    Thanks for your help.

    >
    andyhchsu wrote:
    > Hi,
    > I mean in each block within section, I only need to display the table header once in each page.
    > However if I check table header, it will display repeatedly. Any way to get around this ? Thx.
    The trick I use to do that is turn off all the headers on the block (table and break) and put the header information in its own block above the section and set the new header block to repeat on each page.  You just have to remember to resize the columns in the header block if you make changes to the column sizes in your data block.

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • How to update PL/SQL block/Specs in Repository without cut/paste ?

    (cross-posted in METALINK form also)
    Hello,
    Question: How to quickly update PL/SQL block/specs in a package
    Repository Object Browser? (without cut/paste)
    Tools: Designer 9i, ROB 9.0.2.6
    Detailed description of a problem:
    -- there is no good pl/sql IDE working with ROB
    (JDeveloper can not work with NOT PRIVATE repository workspace)
    -- I use Toad and develop/generate pl/sql object
    directly in database.
    -- I have to synchronize my work with repository as often
    as possible the following way (we do not use read-server model
    because afraid of getting 1000s of atomik func and proc):
    ---- navigate to the pl/sql package
    ---- select properties
    ---- click on pl/sql block - get old code in editor
    ---- copy all new code from Toad into editor
    ---- remove CREATE OR REPLACE and last line
    ---- save
    ---- do the same with specifications
    I am looking for some way to do this with some script or
    one-button click...
    For example, for text files it is possible to use command line
    Repository Tool. But I did not found the possibility to make
    a script like this:
    checkout
    update workarea/container/plsql_definition/package_name/body....
    .....with new_package_body.txt
    checkin
    Thanks in advance for any help/advice,
    Alex V.

    Hi Alex,
    I just had an "Ah! I see!" moment. I now understand why you're having trouble and I can explain things so you can move on... I hope!
    First it's important to understand that Oracle SCM is designed to support versioning of both files and Oracle Designer objects. Designer objects are stored as rows in specially structured tables that support that specific product. When you look at PL/SQL definitions in the RON you're looking at Designer definitions - not files. As I mentioned before, these are not the definitions of 'real' PL/SQL objects in the data dictionary, but definitions used by Designer (from which the real things can be generated - but that's another story).
    If you're using TOAD you should probably avoid accessing the Designer objects. You need to work with files.
    Here's a suggestion for a sequence of operations:
    - In the RON check out & download the file (e.g. mypkg.plb)
    - In TOAD load the package (from DB, or downloaded file), edit, update package in DB
    - In TOAD save as mypkg.plb (overwriting the downloaded copy)
    - IN RON upload mypkg.plb and check in
    If you've not stored the file in Oracle SCM yet, jsut omit the first step.
    You could even automate this to an extent using SQL to query the data dictionary views (e.g. USER_SOURCE) after making changes to get the code and edit/overwrite the file contents that way.
    Does this help at all?
    Keith.

Maybe you are looking for

  • Downloading TV Shows to VIdeo IPOD

    I downloaded some tv shows through a tv tuner onto my hard drive. I also purchased Quick Time Pro and have it installed on my desktop. Somehow, while fiddling around with the tv videos, I got them into itunes. The videos play in itunes, but I cannot

  • JDeveloper and Java EE 5

    Hello all, Which version of JDeveloper with OC4J fully supports Java EE 5? We urgently want to use the web-services possibilities (JAX-WS) of Java EE 5, but ii is not clear whch version of JDeveloper version supports this. regards Ronald

  • RAW DNG sequence / Edit Original with ACR within Premier

    I need to speak to a Adobe Premier expert. I have a RAW DNG sequence shot on my Canon 5d Mark 3 via Magic Lantern imported into my premier project now. I want to edit the DNG's image settings with ACR (adobe camera raw). So i right click on my DNG se

  • Several invoices in single PDF (for print)..

    Hello experts, I have this issue.. I am generating invoices massively through WebDynpro Java, we need those invoices in their print format, so far I can put one invoice document per PDF, but it is non practical for the volume of generated invoices to

  • Cross Project Linking

    I am familiar with creating a Master Plan and linking milestones between sub projects and the master plan but can a single Project Manager create a link to another project plan without creating a master plan shell to facilitate the actions required?