How to check if a SQL profile is used or not?

Hello

We have a few plans and profiles SQL in the database. There has been some changes to the code and it is now difficult to follow if a SQL profile or outline is still used? Is it possible to find out who?

Thanks in advance

Look for the entry corresponding to the SQL statement you are reviewing in V$ SQL. Look at the OUTLINE_CATEGORY and SQL_PROFILE columns. NULL indicates that no plan/profile has been used.

Tags: Database

Similar Questions

  • How to check if a string exists in varray or not

    Hi all

    How to check if a string exists in varray or not.

    Version Details 
    
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> get test
      1  DECLARE
      2     TYPE dnames_var IS VARRAY(7) OF VARCHAR2(30);
      3     dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5    if dept_names.exists('Shipping')
      6    then
      7       dbms_output.put_line('Exists ................');
      8    end if ;
      9  /*   DBMS_OUTPUT.PUT_LINE('dept_names has ' || dept_names.COUNT
     10                          || ' elements now');
     11     DBMS_OUTPUT.PUT_LINE('dept_names''s type can hold a maximum of '
     12                           || dept_names.LIMIT || ' elements');
     13     DBMS_OUTPUT.PUT_LINE('The maximum number you can use with '
     14         || 'dept_names.EXTEND() is ' || (dept_names.LIMIT - dept_names.COUNT));
     15  */
     16* END;
     17  
     18  /
    DECLARE
    *
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 5
    
    
    SQL> 
    
    Any help in this regard is appreciated ...
    Thank you
    Prakash P

    Published by: prakash on April 29, 2012 05:42

    EXISTS checks for the existence of an element, not a value. Since you're using VARRAY (btw, it is not recommended), your only choice is a loop through:

    SQL> DECLARE
      2       TYPE dnames_var IS VARRAY(7) OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      for i in 1..dept_names.count loop
      6        if dept_names(i) = 'Shipping'
      7          then
      8            dbms_output.put_line('Exists ................');
      9            exit;
     10        end if;
     11      end loop;
     12  END;
     13  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    If you use the nested table, you can use MEMBER, SUMBULTISET, MULTISET EXCEPT:

    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if 'Shipping' member of dept_names
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if dnames_var('Shipping') submultiset dept_names
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if dnames_var('Shipping') multiset except dept_names = dnames_var()
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • How to choose what Firefox 5 profile will use when it opens?

    I have several profiles in FF5. At each opening of FF, it opens with a different profile. So, how to choose what Firefox 5 profile will use when it opens?

    Type, it is in the Run dialog box: firefox.exe - p. This will bring up the Profile Manager where you can select the default profile. (See the screenshots)

  • How to check the type of memory installed (ECC or not)?

    all!

    I have some servers Dell PowerEdge R420 and I want to upgrade memory, install more...

    How to check the type of memory installed (ECC or not)?

    Dmidecode output here:

    Drive.google.com/.../View

    Hello.

    Unfortunately, we are not able to open the link you have provided. You can display information about your memory on the web iDRAC under hardware and memory interface. You see the type of error correction (ECC or Non ECC) within the information memory page. You can also view the same information on OpenManage Server Administrator and even make use of the memory part number to find out more information.

  • How to check if a key has been used

    Hi all

    Is there a way to determine whether a key has been used in a SQL statement?

    Example of
    I received a call from a developer said that their request was going very slow

    I checked what oracle was doing

    He was using an index with 5 distinct values on a table with a number of lines of 9.2 million

    Selectivity is very bad.

    Then I discovered after talking to the Director it was a hint to use the (silly) hints

    Once we had the suspicion that he did a scan of Table full and actually ran much faster.

    However, when I was watching the SQL text in v$ sql and v$ sqlarea he had no way of knowing if we used a hint

    IE, I saw: / * + RULE * / in the code.

    Does anyone know how to check (from the DB), if an indication is used in a sql statement?

    And if the indication is used, what is the indicator.

    Thank you

    G.

    You can use the following to see the execution plan with the outline and see advice

    Select * from table (dbms_xplan.display_cursor (null, null, 'schema'));

    select  /*+   rule  */  sum(id) from     t1 where     flag = 0
    
    Plan hash value: 2170464548
    
    ------------------------------------------------
    | Id  | Operation                    | Name    |
    ------------------------------------------------
    |   0 | SELECT STATEMENT             |         |
    |   1 |  SORT AGGREGATE              |         |
    |   2 |   TABLE ACCESS BY INDEX ROWID| T1      |
    |*  3 |    INDEX RANGE SCAN          | T1_FLAG |
    ------------------------------------------------
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.1')
          RBO_OUTLINE
          OUTLINE_LEAF(@"SEL$1")
          INDEX(@"SEL$1" "T1"@"SEL$1" ("T1"."FLAG"))
          END_OUTLINE_DATA
      */
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       3 - access("FLAG"=0)
    
    Note
    -----
       - rule based optimizer used (consider using cbo)
    

    HTH

    Kind regards

    Jagdeep Seven

  • How to check the CPU usage and paging using LabVIEW

    Hi guys,.

    I build an application that is used to check the CPU usage and paging using LabVIEW. How can I do?

    any help, suggestions or advice will be greatly appreciated...

    Kind regards

    Prashant

    Hello

    If you plan to build your app for Windows, you can use .NET classes. (System.PerformanceCounter), there is a simple example with LabVIEW:

    C:\Program NIUninstaller Instruments\LabVIEW 2010\examples\comm\dotnet\SimpleTaskMonitor.llb

    Also, you have several screws that you can use to verify information about the processor.

    Kind regards

  • How to check if a numeric value is around or not?

    Hello

    A form in LiveCycle Designer ES4, how to check (at the exit of field), if a numeric value is around or not?

    Hello

    You can verify if the rawValue contains a ', 'or'. ' using indexOf

    like the following

    If (NumericField1.rawValue.toString (.indexOf(","))! = - 1 |) NumericField1.rawValue.toString (.indexOf("."))! = -1) {}

    This is not an integer

    }

    Hope this will help you

  • How to check the slider back row contains data or not

    Hi all


    How to check whether or not the cursor returned row contains data in one of its field.


    Thank you and best regards,
    Prakash P

    Use ROWCOUNT %
    Use % NOTFOUND

    example of

    DECLARE
    
       id    number;
       desc varchar2(10);
       CURSOR cursor_one IS
          SELECT
              id, desc
          FROM
              table;
    BEGIN
       OPEN cursor_one;
       LOOP
          FETCH cursor_one INTO id, desc;
          EXIT WHEN cursor_one%ROWCOUNT > 20 OR cursor_one%NOTFOUND;
       ...
       END LOOP;
       CLOSE cursor_one;
    END;
    
  • How to check if the directory is created using create or replace directory

    Hello

    I create a directory like below:

    Create or replace directory TEST_DIR AS 'C:\ABCD '.

    How to check if the directory is created or not? Is there any request for it?

    Thanks in advance.

    PK

    SELECT * FROM ALL_DIRECTORIES WHERE DIRECTORY_NAME LIKE '% TEST_DIR %. "

    Published by: user3522507 on 2010.06.16. 07:19

  • How to check a timertask calendar is still active or not?

    Hello

    I created the following code:

    class StateTracker extends TimerTask
    {
    Minu private;
            
    public StateTracker()
    {
    Timer = new Timer();
    Timer.Schedule (this, 5000, 150000); begins after 5seconds Repeat task every 150 seconds
    }

    public void run()

    ....

    }

    The code runs allright, unless, in certain circumstances, the task stopped after a few periodic race (I suspect is disconnected network). Y at - there any API I could use to check whether the calendar is still active or not.

    I would like to reschedule the timertask if the original schedule was disrupted.

    timertasks should not be used for the treatment of blocking. I would say to put the actual work load in an own thread.

    as long as the enforcement code is surrounded by exception handling, execution continues. There is no method to check if the timer is running correctly.

  • How to get the storage allocated profile and used the plugin vCloud 5.1 Vdc

    How can I get the storage allocated and used for a Vdc in vCloud 5.1 plugin?

    VCloud plugin 1.5, there was a property of VclVdc.storageCapacity give us the space allotted, limit, use (s) and overhead costs.

    VCloud plugin 5.1 we allways null VclVdc.storageCapacity. Then VclVdc.getStorageProfiles () but presents the objects, there is that the "limit value".

    ¿WHERE are the other values?

    I have attached two screenshots. vCloud console shows the data, but not vCloud plugin.

    Thank you very much.

    Damian

    Tell me if this work. This was written in a few minutes.

    var host = vdc.getHost();
    
    var queryService = host.getQueryService();// toAdminObject().getAdminQueryService();
    
    var profs = vdc.getStorageProfiles();
    
    for each (var prof in profs) {
    
        var expression = new VclExpression(VclQueryAdminOrgVdcStorageProfileField.HREF, prof.getReference().href  , VclExpressionType.EQUALS);
        var filter = new VclFilter(expression);
        var params = new VclQueryParams();
        params.setFilter(filter);
        var resultSet = queryService.queryRecords(VclQueryRecordType.ADMINORGVDCSTORAGEPROFILE,params);
    
        while (resultSet != null) {
            var records = resultSet.getRecords(new VclQueryResultAdminOrgVdcStorageProfileRecord);
            System.log(records.length + " records found");
                for each (var record in records) {
                    //obtain data from record
                    System.log("storageUsedMB : " + record.storageUsedMB);
                    System.log("storageLimitMB : " + record.storageLimitMB);
                }
        resultSet = resultSet.getNextPage();
        }
    
    }
    
  • How to check my site to site vpn using ASDM?

    How can I check that my VPN site-to-site really works by using ASDM?  I was expecting to see some sort of graphical OWL or a counter is ASDM, but I see nothing.  The CLI by "sh crypto ipsec SA" I see the program and crypt increment so I think it works.

    ASA5505 at each end

    The ASA version: 8.0.5

    ASDM Version: 6.3.5

    Hi Tod,

    on the cli, indeed the counters in "crypto ipsec to show his" will tell you if the data passes over the tunnel.

    In ASDM, you can go to monitoring-> VPN-> statistical VPN-> Sessions and select "IPsec Site to Site" as the filter.

    I do not think that we have graphics for data on the tunnels, but you can have a graph of the number of active tunnels (surveillance-> VPN-> graphics-> tunnels IPsec VPN connection)

    HTH

    Herbert

  • How to check if R12 staged media is correct or not?

    Hello
    I copied the full R12 (12.0.4) media (software) on the external drive by making all the directories of resprected as follows:

    startCD - Start copied disc here
    oraApps - copied APPL_TOP Disk1, Disk2
    Orleans - copied disc TOOLS
    oraDB - copied disc RDBMS
    oraAppDB - copied databases Disk9 Disk1

    How can I check or ensure that installation can go smoothly with this media staging?

    Concerning

    arizuddin wrote:
    Hello
    I copied the full R12 (12.0.4) media (software) on the external drive by making all the directories of resprected as follows:

    startCD - Start copied disc here
    oraApps - copied APPL_TOP Disk1, Disk2
    Orleans - copied disc TOOLS
    oraDB - copied disc RDBMS
    oraAppDB - copied databases Disk9 Disk1

    How can I check or ensure that installation can go smoothly with this media staging?

    Concerning

    You must run the script adautostg.pl to create the scene area directory, copies only the files is not the right approach.

    Page 1-13 and 1-14, set up the scenic space
    http://docs.Oracle.com/CD/B40089_10/current/Acrobat/120oaig.PDF

    Thank you
    Hussein

  • How to check the value (if it is null or not) in the application process

    Hello

    I click on a particular record to access the home page of my search after go touch, but I need to check a validation of NULL at this point, if a particular column is null, then I need to make it false.
    My column type is BLOB.

    Can someone suggest me how to find whether or NOT this column is NULL.


    Thank you
    Mahesh

    Published by: user8996062 on August 25, 2010 10:35

    Mahesh

    If you receive the null pointer exception to

    XxafpEepStageRebateHdrVOImpl vo = (XxafpEepStageRebateHdrVOImpl) am.findViewObject ("XxafpEepStageRebateHdrVO1");

    This means that you not give the good instance of vo. Do something please post your VO.xml and AM.xml files.

    Thank you
    AJ

  • How to check if "PO output for communication" uses XLM or OracleReports

    I need to change the purchasing document "Exit IN. for communication", but I must first identify if it uses XML Publisher report or reports of the Oracle.
    How can I check that using the client?

    Any help is welcome.

    Rodrigo

    Hello

    OK, here's what I did to customize the presentation of PO:

    1 create new templates in BI Publisher:

    1.1 Please download the original models:
    In my evolution, I used the original models of Oracle as a starting point. If you get their first:

    Logon with respo XML Publisher administrator and navigate to 'Models' > search model whose name "Standard purchase order Stylesheet" and click on it in the result of the research. Click the download link to download the file .xls on your local drive. You can repeat that for all other models that I mentioned earlier, depending on which layout you want to change.

    I do not recommend to change the original files. In case of problems you can always return to the original version of Oracle.

    1.2 now to create your own templates:
    In XML Publisher administrator, you can create a new template. As model name, use a meaningful name with a prefix such as "XX" or something that you usually use for your own developments.

    The rest of the fields in the template definition must be equal to the standard models (so just copy & paste the values from there). And you can download the original .xsl file to the beginning.

    2 let know to use your own XML Publisher templates:

    connection with a PO administrator/super user responsibility:
    2.1 (by purchase) > Setup > organizations > Options purchases > control tab > set "Output PO Format" = PDF
    2.2 (by purchase) > Setup > purchases > Document Types > find the 'Purchase order - Standard' Document Type > define the presentation of the Document Type = "XX purchase order Stylesheet" (put the name of your custom here template!)

    Repeat step 2.2 for other Types of documents, such as agreements to cover and if necessary press coverage.

    3. test:
    Now try the PO output for communication. If everything has worked, you should see a purchase order as a PDF with the same layout as before. Now it's time to start customizing the layout.

    4 customize the page layout:
    You must change the XSL templates. You need some knowledge of XSL - FO, but with some programming experience little, you will have the concept quite easily. In fact, the XSL - FO offers many possibilities to model your page layout.

    BUT: Change the XSL template to change your "LAYOUT" only, not the data of the report part. Of course you can text coded hard and calculations in your XSL, but dramatic changes of the portion of data are not really possible with this.

    If you want to do, then search on Metalink, there is a document that explains how to customize the data for printing of PO. I don't have the Note in his hand right now...

    BTW. XML Publisher is the former name of the product, Oracle has renamed it BI Publisher. In EBS, it is still often referred to as "XML Editor". You can see the two names as synonyms. You pay more attention to the version of BI Publisher, which is integrated into EBS is different from what you can have as a stand-alone versions.

    Best regards
    David.

Maybe you are looking for