Use business function: SQL profile

SQL profile is only a function of Enterprise edition as in, just by using a profile that was not created in this database?

I have a development environment, which is available for all.  I create a SQL profile for a bad statement on this database of the company, then I transfer in a database standard edition to help:

How to copy one database to another SQL profile. | David Marcos & amp; #039; Blog

When I now run the statement, I see that he is using the profile, but the following statement returns without success for me after using this feature:

name of the pass for a50

ALTER session set nls_date_format = "DD month yyyy";

Select ' # use features of Enterprise Edition: "of the double;

SELECT name, version, first_usage_date, last_usage_date of dba_feature_usage_statistics, whose name in ("Advanced Replication", "AWR report", "Basic AWR", "Automatic repository of workload", 'Encryption ","backup ZLIB Compression', "Block Media Recovery", "Database Replay: workload Capture ',' Database Replay: Replay of the workload ', 'Diagnostic Pack', em Page Performance", "Flashback Database" ") ","Security label"," OLAP - analytic workspaces, "OLAP - Cubes", "Oracle Secure Backup", "Parallel Execution of DDL SQL" 'Parallel DML SQL performance', "Parallel Execution of SQL query", "Partitioning (user)", "Real Time SQL Monitoring", "Result Cache", "SQL Monitoring and Tuning pages", 'SQL Plan Management', 'SQL Tuning Set (user)', "SecureFile encryption (user)", "Space", 'MView Tune', 'Tuning Pack', 'Automatic Maintenance - Setup SQL', 'SQL Profile. (, "SQL Tuning Advisor", "SQL Tuning Set (user)") and first_usage_date is not null order by ASC first_usage_date;

So my question is: if I haven't created the profile in the database Standard Edition... it is just been imported from another data base... Am, I violated my license?

Hello

> So my question is: if I haven't created the profile in the database Standard Edition... it is just been imported from another data base... I'm violating my license?

You break even your EE Oracle license, if you do not have a valid diagnostic + Tuning package for it. You can reproduce this very easily, as described by Kerry Osborne here: requirements for licenses for SQL profiles

SQL Plan Management is included in Oracle EE as an alternative, for example: the use of SQL Plan Management and database DBMS_SPM package require a license pack tuning or diagnostic?

Concerning

Stefan

Tags: Database

Similar Questions

  • Could not get the native web service response to Oracle using a PL/SQL < Message > function <! [CDATA [component "WS_CALC" must be said]] > < / Message >

    Hi, we have a problem with oracle native web service access using a PL/SQL function. We are running out of ideas how to solve the problem. Someone would be so nice to take a look at our case. Thank you much in advance. Best regards, Smiljana

    CREATE TABLE for_web_info (some_hello_text VARCHAR2 (150), when_inserted DATE, we_are_from VARCHAR2 (30));

    INSERT INTO for_web_info VALUES ('HI everyone :-) ', SYSDATE, 'Ljubljana, Slovenia');

    CREATE OR REPLACE

    PACKAGE ws_calc AUTHID CURRENT_USER AS

    FUNCTION CalcProduct (a NUMBER by DEFAULT 1,

    b in on NUMBER,

    g NUMBER of OUTPUT)

    RETURN NUMBER;

    END ws_calc;

    /

    CREATE OR REPLACE

    PACKAGE ws_calc AS BODY

    FUNCTION CalcProduct (a NUMBER by DEFAULT 1,

    b in on NUMBER,

    g NUMBER of OUTPUT)

    RETURN NUMBER IS

    product NUMBER;

    BEGIN

    SELECT SUM (1) IN the for_web_info OF g;

    product: = a * b;

    RETURN any product;

    END;

    END;

    /

    Our two DBA done all the steps described in the manual Oracle® XML DB's Guide Developer, 11 g Release 2 (11.2), E23094-04, February 2014, section using Oracle DB native XML Web Services.

    Access us two wsdl with browser without problem and get two of them. We also receive web serivce response which databese of query table.

    http://our_db:8080 / orawsv? WSDL

    http://our_db:8080 / orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT? WSDL

    ---------------

    | First WSDL.

    ---------------

    <? XML version = "1.0"? >

    " < name definitions = targetNamespace"orawsv"=" http://xmlns.Oracle.com/orawsv "" "

    " xmlns =" http://schemas.xmlsoap.org/wsdl/ "

    ' xmlns:tns = ' http://xmlns.Oracle.com/orawsv "" "

    ' xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ "

    " container = ' http://www.w3.org/2001/XMLSchema "

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    " xsi: schemaLocation =" http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/"> ".

    < types >

    < xsd: Schema

    " targetNamespace = ' http://xmlns.Oracle.com/orawsv "" "

    elementFormDefault = "qualified" >

    < xsd: element name = "query" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "DDL_text" type = "xsd: String".

    minOccurs = "0" maxOccurs = "unbounded" / >

    < xsd: element name = 'query_text' >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "type" >

    < xsd:simpleType >

    < xsd:restriction base = "xsd:NMTOKEN" >

    < value xsd: Enumeration = "SQL" / >

    < value xsd: Enumeration = "XQUERY" / >

    < / xsd:restriction >

    < / xsd:simpleType >

    < / xsd: attribute >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: Choice minOccurs = "0" maxOccurs = "unbounded" >

    < xsd: element name = "bind" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "name" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "bindXML" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: all / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: Choice >

    < xsd: element name = "null_handling" minOccurs = "0" >

    < xsd:simpleType >

    < xsd:restriction base = "xsd:NMTOKEN" >

    < value xsd: Enumeration = "DROP_NULLS" / >

    < value xsd: Enumeration = "NULL_ATTR" / >

    < value xsd: Enumeration = "EMPTY_TAG" / >

    < / xsd:restriction >

    < / xsd:simpleType >

    < / xsd: element >

    < xsd: element name = "max_rows" type = "positiveInteger" minOccurs = "0" / >

    < xsd: element name = "skip_rows" type = "positiveInteger" minOccurs = "0" / >

    < xsd: element name = "pretty_print" type = "xsd: Boolean" minOccurs = "0" / >

    < xsd: element name = "indentation_width" type = "positiveInteger" minOccurs = "0" / >

    < xsd: element name = "rowset_tag" type = "xsd: String" minOccurs = "0" / >

    < xsd: element name = "row_tag" type = "xsd: String" minOccurs = "0" / >

    < xsd: element name = "item_tags_for_coll" type = "xsd: Boolean" minOccurs = "0" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "queryOut" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: all / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: Schema >

    < / types >

    < name of message = "QueryInput" >

    < name of part = element "body" = "tns:query" / >

    < / message >

    < name of the message 'XMLOutput' = >

    < name of part = element "body" = "tns:queryOut" / >

    < / message >

    < portType name = "ORAWSVPortType" >

    < operation name = "XMLFromQuery" >

    < input message = "tns:QueryInput" / >

    < output message = "tns:XMLOutput" / >

    < / operation >

    < / portType >

    < connection name = "ORAWSVBinding" type = "tns:ORAWSVPortType" >

    " < style: soap = transport = 'document' binding ' http://schemas.xmlsoap.org/SOAP/HTTP "/>

    < operation name = "XMLFromQuery" >

    " < soap: operation soapAction = ' http://our_db:8080 / orawsv "/>

    < input >

    < use of soap: body = "literal" / >

    < / Entry >

    < output >

    < use of soap: body = "literal" / >

    < / output >

    < / operation >

    < / binding >

    < service name = "ORAWSVService" >

    < documentation > Oracle Web Service < / documentation >

    < name of port = "ORAWSVPort" binding = "tns:ORAWSVBinding" >

    " < soap: address location = ' http://our_db:8080 / orawsv "/>

    < / port >

    < / service >

    < / definitions >

    ----------------

    | Second WSDL.

    ----------------

    <? XML version = "1.0"? >

    < name of definitions = "CALCPRODUCT."

    " targetNamespace = ' http://xmlns.Oracle.com/orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT "" "

    " xmlns =" http://schemas.xmlsoap.org/wsdl/ "

    ' xmlns:tns = ' http://xmlns.Oracle.com/orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT "" "

    " container = ' http://www.w3.org/2001/XMLSchema "

    ' xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ ">

    < types >

    " < xsd: Schema targetNamespace = ' http://xmlns.Oracle.com/orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT "" "

    elementFormDefault = "qualified" >

    < xsd: element name = "SNUMBER-CALCPRODUCTInput" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "G-NUMBER-OUT" >

    < xsd: complexType / >

    < / xsd: element >

    < xsd: element name = "B-NUMBER-INOUT" type = "xsd: double" / >

    < xsd: element name = "A-NUMBER-IN" minOccurs = "0" maxOccurs = "1" type = "xsd: double" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "CALCPRODUCTOutput" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "RETURN" type = "xsd: double" / >

    < xsd: element name = "G" type = "xsd: double" / >

    < xsd: element name = "B" type = "xsd: double" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: Schema >

    < / types >

    < name of message = "CALCPRODUCTInputMessage" >

    < name of part = "parameters" element = "tns:SNUMBER - CALCPRODUCTInput" / >

    < / message >

    < name of message = "CALCPRODUCTOutputMessage" >

    < name of part = "parameters" element = "tns:CALCPRODUCTOutput" / >

    < / message >

    < portType name = "CALCPRODUCTPortType" >

    < operation name = "CALCPRODUCT" >

    < input message = "tns:CALCPRODUCTInputMessage" / >

    < output message = "tns:CALCPRODUCTOutputMessage" / >

    < / operation >

    < / portType >

    < connection name = "CALCPRODUCTBinding".

    Type = "tns:CALCPRODUCTPortType" >

    " < style: soap = transport = 'document' binding ' http://schemas.xmlsoap.org/SOAP/HTTP "/>

    < operation name = "CALCPRODUCT" >

    < soap: operation

    soapAction = "CALCPRODUCT" / >

    < input >

    < soap body parts: = 'settings' use = "literal" / >

    < / Entry >

    < output >

    < soap body parts: = 'settings' use = "literal" / >

    < / output >

    < / operation >

    < / binding >

    < service name = "CALCPRODUCTService" >

    < documentation > Oracle Web Service < / documentation >

    < name of port = "CALCPRODUCTPort" binding = "tns:CALCPRODUCTBinding" >

    < address soap:

    " location = ' http://our_db:8080 / orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT "/>

    < / port >

    < / service >

    < / definitions >

    -----------------

    | SQL Developer |

    -----------------

    SET serveroutput ON

    -------------

    | First WS.

    -------------

    DECLARE

    V_SOAP_REQUEST XMLTYPE: = XMLTYPE (' <? xml version = "1.0"? > < env:Envelope xmlns:env = "http://www.w3.org/2002/06/soap-envelope " > < env:Body > < query xmlns = "http://xmlns.oracle.com/orawsv" > < type of the argument texte_requete = "SQL" > <!) ([CDATA [SELECT * FROM for_web_info WHERE the INSTR (UPPER (we_are_from),: e) > 0]] > < / query_text > < link name 'e' = > SLOVENIA < / bind > < false pretty_print > < / pretty_print > < / query > < / env:Body > < / env:Envelope > ');

    V_SOAP_REQUEST_TEXT CLOB: = V_SOAP_REQUEST.getClobVal ();

    V_REQUEST UTL_HTTP. REQ;

    V_RESPONSE UTL_HTTP. RESP;

    V_BUFFER VARCHAR2 (1024);

    URL VARCHAR2 (4000): = ' http://our_db:8080 / orawsv ';

    BEGIN

    V_REQUEST: = UTL_HTTP. BEGIN_REQUEST (URL = > URL, METHOD = > 'POST');

    UTL_HTTP. SET_AUTHENTICATION (R = > V_REQUEST, username = > 'OUR_U', PASSWORD = > 'OUR_P'); -not case-sensitive

    V_REQUEST. METHOD: = 'POST';

    UTL_HTTP. SET_HEADER (R = > V_REQUEST, NAME = > 'Content-Length', VALUE = > DBMS_LOB.) GETLENGTH (V_SOAP_REQUEST_TEXT));

    UTL_HTTP. WRITE_TEXT (R = > V_REQUEST, DATA = > V_SOAP_REQUEST_TEXT);

    V_RESPONSE: = UTL_HTTP. GET_RESPONSE (V_REQUEST);

    LOOP

    UTL_HTTP. READ_LINE (V_RESPONSE, V_BUFFER, TRUE);

    DBMS_OUTPUT. PUT_LINE (V_BUFFER);

    END LOOP;

    UTL_HTTP. END_RESPONSE (V_RESPONSE);

    EXCEPTION

    WHEN UTL_HTTP. END_OF_BODY THEN

    UTL_HTTP. END_RESPONSE (V_RESPONSE);

    END;

    anonymous block filled

    " <? xml version ="1.0"? > < envelope soap: xmlns:soap = ' http://www.w3.org/2002/06/SOAP-envelope ' > < soap: Body > < queryOut xmlns = " http://xmlns.Oracle.com/orawsv "> "

    < set of LINES > < ROW > < SOME_HELLO_TEXT > HI everybody :-) < / SOME_HELLO_TEXT > < WHEN_INSERTED > 03.10.14 < / WHEN_INSERTED > < WE_ARE_FROM > Ljubljana, Slovenia < / WE_ARE_FROM > < / ROW > < / rowset > < / queryOut > < / soap: Body > < / envelope soap: >

    --------------

    | Second WS.

    --------------

    DECLARE

    V_SOAP_REQUEST XMLTYPE: = XMLTYPE ("<?") XML version = "1.0"? > < soap envelope: xmlns:soap = "http://www.w3.org/2002/06/soap-envelope" > < soap: Body > < xmlns SNUMBER-CALCPRODUCTInput = ""http://xmlns.oracle.com/orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT"(> < A-NUMBER-IN > 2 < / A-NUMBER-IN > < B-NUMBER-INOUT > 3 < / B-NUMBER-INOUT > < R-NUMBER-OUT / > < / SNUMBER-CALCPRODUCTInput > < / soap: Body > < / SOAP: envelope > '); "

    V_SOAP_REQUEST_TEXT CLOB: = V_SOAP_REQUEST.getClobVal ();

    V_REQUEST UTL_HTTP. REQ;

    V_RESPONSE UTL_HTTP. RESP;

    V_BUFFER VARCHAR2 (1024);

    URL VARCHAR2 (4000): = ' http://our_db:8080 / orawsv/OUR_SCHEMA/WS_CALC/CALCPRODUCT ';

    BEGIN

    V_REQUEST: = UTL_HTTP. BEGIN_REQUEST (URL = > URL, METHOD = > 'POST');

    UTL_HTTP. SET_AUTHENTICATION (R = > V_REQUEST, username = > 'OUR_U', PASSWORD = > 'OUR_P'); -not case-sensitive

    V_REQUEST. METHOD: = 'POST';

    UTL_HTTP. SET_HEADER (R = > V_REQUEST, NAME = > 'Content-Length', VALUE = > DBMS_LOB.) GETLENGTH (V_SOAP_REQUEST_TEXT));

    UTL_HTTP. WRITE_TEXT (R = > V_REQUEST, DATA = > V_SOAP_REQUEST_TEXT);

    V_RESPONSE: = UTL_HTTP. GET_RESPONSE (V_REQUEST);

    LOOP

    UTL_HTTP. READ_LINE (V_RESPONSE, V_BUFFER, TRUE);

    DBMS_OUTPUT. PUT_LINE (V_BUFFER);

    END LOOP;

    UTL_HTTP. END_RESPONSE (V_RESPONSE);

    EXCEPTION

    WHEN UTL_HTTP. END_OF_BODY THEN

    UTL_HTTP. END_RESPONSE (V_RESPONSE);

    END;

    anonymous block filled

    <? XML version = "1.0"? >

    " < envelope soap: xmlns:soap = ' http://www.w3.org/2002/06/SOAP-envelope/ ">

    < soap: Body >

    < soap: Fault >

    < Code: soap >

    < soap: value > SOAP: sender < / SOAP: value >

    < / Code: soap >

    entry processing < soap: reason > error < / SOAP: reason >

    < soap: detail >

    " < OracleErrors xmlns =" http://xmlns.Oracle.com/orawsv/faults "> "

    So OracleError >

    < ErrorNumber > ORA-19202 < / ErrorNumber >

    < message > <! [CDATA [error has occurred in the processing of XML]] > < / Message >

    < / OracleError >

    So OracleError >

    < ErrorNumber > ORA-06550 < / ErrorNumber >

    < message > <! [CDATA [line 1, column 24:]] > < / Message >

    < / OracleError >

    So OracleError >

    < ErrorNumber > PLS-00302 < / ErrorNumber >

    < message > <! [CDATA [component "WS_CALC" must be said]] > < / Message >

    < / OracleError >

    So OracleError >

    < ErrorNumber > ORA-06550 < / ErrorNumber >

    < message > <! [CDATA [line 1, column 7:]]

    [[PL/SQL: statement ignored]] > < / Message >

    < / OracleError >

    < / OracleErrors >

    < / Details: soap >

    < / soap fault: >

    < / soap: Body >

    < / envelope soap: >

    With reference APEX web service, the response is exactly the same and apex_web_service.make_request also work.

    Thanks again.

    The SOAP request is not correct.

    must be:

    So again, it does not solve the problem:

    -Which user you are using to authenticate on the other side?

    If it's another user the owner of the package, then of course you must grant the execute privilege appropriate to this user (and possibly one explicit SELECT on the table referenced too privilege).

  • A question, when you use the sql Profiler features!

    Hi all.

    I have a question, when using feautre profile sql to oracle 10 g 2.

    As you know, 'DBMS_SQLTUNE. Procedure EXECUTE_TUNING_TASK' gives us
    a sql plan imploved automatically.

    However, in the event that the sql recommended plan of 'DBMS_SQLTUNE. EXECUTE_TUNING_TASK ".
    is not good enough to accept the plan sql generated, and instead, I have a better plan of sql.
    What should I do?

    Is it possible to force oracle to use my plan sql instead of plan recommended by oracle sql?
    The stored outline is not an option.

    Thanks in advance.
    Best regards.

    It seems that you really want to use the sql Profiler then?

    You can grant not only the instruction for this plan you want?

    If you want to manually create a profile, and then see the post below Kerry Osborne, essentially, you can remove the indicators needed to education to listen to v$ sql_plan and then their card in a profile for the original statement:
    http://kerryosborne.Oracle-guy.com/2010/07/SQLT-coe_xfr_sql_profilesql/

    See also the paper of Christian Antognini on profiles:
    http://Antognini.ch/papers/SQLProfiles_20060622.PDF

    11 g, base lines offer a much better facility to trace a plan from a single statement in a reference to another database.

  • 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.

  • on exception handling in function, while using this function in sql

    Hi gurus,

    I have a question concerning the registration of exceptions when using functions.

    I wrote a separate package to handle errors, where I have a procedure.
    In this process, I connect my error in a table and then triggers the error on the front end.
    Ex:
    proc_log_and_raise    -- this proc... inserts my error into a table and then raise
    now, I have included this error procedure in all functions and procedures.

    Consider an example with an example of procedure and function.
    function func_1(( v_var   varchar2) return varchar2 is
    begin
         select   column2
         from     table2
        where col1 = v_var;
    exception 
        when others then 
             proc_log_and_raise;
    end;   
    procedure proc_1( v_var   varchar2) is
    begin
        select   func_1(v_var)  -- error occurs here..
        from     table_a
        where   col1 = v_var;
    exception 
        when others then 
             proc_log_and_raise;
    end;    
    now I do
    exec  proc_1( v_var );
    but now my problem is, when an error occurs in func_1, I get an error with the DML operation (as we are inserted in the table of errors)
    ORA-14551: cannot perform a DML operation within a query.

    So what I want to do, connect the two functions and procedure where the error occurred.

    So is it better otherwise, we can write our exception handling, so that I could mistake the newspaper and use the function in a select statement.

    Thank you.

    A small example of using autonomous transactions

    create table error_log (error varchar2(4000));
    
    Table created.
    
    SQL> create procedure log_error(p_error in varchar2) as
      2  pragma autonomous_transaction;
      3  begin
      4  insert into error_log values (p_error);
      5  commit;
      6  end;
      7  /
    
    Procedure created.
    
    SQL> create function will_fail return number as
      2  begin
      3  for x in (select 2/0 from dual) loop
      4  null;
      5  end loop;
      6  exception
      7  when others then
      8  log_error(sqlerrm);
      9  raise;
     10  end;
     11  /
    
    Function created.
    
    SQL> create procedure call_will_fail as
      2  begin
      3  for x in (select will_fail from dual) loop
      4  null;
      5  end loop;
      6  end;
      7  /
    
    Procedure created.
    
    SQL> exec call_Will_fail;
    BEGIN call_Will_fail; END;
    
    *
    ERROR at line 1:
    ORA-01476: divisor is equal to zero
    ORA-06512: at "WILL_FAIL", line 9
    ORA-06512: at "CALL_WILL_FAIL", line 3
    ORA-06512: at line 1
    
    SQL> select * from error_log;
    
    ERROR
    -----------------------------------------------------------------
    ORA-01476: divisor is equal to zero
    

    Note that the recovery is carried out by the exception handler.

  • How to extract a sql profile

    DB: 10.2
    10.2 business manager

    I know how to create profiles of sql. I did it manually. I had a complex query that I wanted to fix. So I used the Manager of the company to generate a sql tuning set and used the sql tuning Advisor. He integrate a sql profile.
    I can see the name of the sql profile and some details in DBA_SQL_PROFILEs.

    How can I extract the contents of the sql profile? I want to see what oracle oracle tips used. I know that some are internal when using enterprise manager.

    Guess2 wrote:
    DB: 10.2

    How can I extract the contents of the sql profile? I want to see what oracle oracle tips used. I know that some are internal when using enterprise manager.

    Here is a link to an article written by Kerry Osborne on SQL Profiler - and there is a link in the article to a script to extract the tips for a profile of the database: http://kerryosborne.oracle-guy.com/2009/04/oracle-sql-profiles/

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    Author: core Oracle

  • SQL profile will be lost after we recreate entire table?

    Hi people!

    Scenario:
    We have introduced by Sql Setup SQL profile and implemented since within the grid control in our database 10 g on a particular table.
    That forces the profile Sql optimizer oracle to use a base complete index instead of table scan function.

    A question is:
    This Sql profile will be lost if we do one of the following scenarios:
    1. recreate all the indexes on this table
    2. or we do Expdp, delete the table and then create a new and Impdp (export and import) that table?
    3. we rename the table and all indexes and then rename indexes and vice versa?

    Sql profile will disappear above scenarios?

    Any comments would be much appreciated.

    Bravo!

    That forces the profile Sql optimizer oracle to use a base complete index instead of table scan function.
    A question is:
    This Sql profile will be lost if we do one of the following scenarios:
    1. recreate all the indexes on this table
    2. or we do Expdp, delete the table and then create a new and Impdp (export and import) that table?
    3. we rename the table and all indexes and then rename indexes and vice versa?

    Hello

    Although I have not tested, but I think that there will be no impact on the profiles and it will stay there.
    Because unlike objects, a profile in SQL Statistics is mapped to an application, not an object or objects.
    You can see the SQL Profiler created in the view of the DBA_SQL_PROFILES dictionary. The SQL_TEXT column indicates the statement SQL profile has been attributed to; the STATUS column indicates whether the profile is enabled

    Kind regards
    Rajesh

  • How to use the: token of $ $PROFILE in a game of validation of table values

    Hello community,

    Let me explain the scenario.

    We have a set value (CLIENTS SERVICIO DIRECTO) Flex with a validation of the table included in the PO headers FDF, which shows a LOV with the recipient addressfrom the customer we want to serve the goods; that is, we act as a commisionists and the provider makes the goods to the customer's shipping address.

    This Flex value, as I said, have a table, with the following table of validation validation:

    Application of the table: Oracle receivables
    Table name: RA_ADDRESSES_ALL a, RA_CUSTOMERS b

    Table Columnns: b.CUSTOMER_NAME Varchar2 (20), a.PARTY_LOCATION_ID Varchar2 (20)

    Where / Order By: a.CUSTOMER_ID = b.CUSTOMER_ID

    Additional columns: a.ADDRESS1 "address" (20), a.CITY Ciudad "(10) «»

    If we translate this to a SQL code:

    Select a.address1,
    a.City,
    a.party_location_id,
    b.Customer_name
    ra_addresses_all a.,
    ra_customers b
    where a.customer_id = b.customer_id
    and b.customer_id = 6283 <-this last condition clause is intended to reduce the result to the interested customer.

    This select recover we two records; for the same customer, one of them for an organization_id (say 85) and one of them for the other organization_id (84).

    What are looking for us, and want to, it's that the LOV, which actually display two records, only shows the recipient site to the client that belongs to the organization_id that belongs to the user who questioned or creates the purchase order.

    That is, suppose that we enter in Purchasing using the who have been assigned to the business unit or Organization_id 84. We want this theLOV to show that the recipient Site to the client that belongs to the business unit or Organization_id 84.

    I believe that we can achieve this by using the: token of $ $PROFILE, but we do not know how.

    Any ideas?

    Thanks a lot for your answer.

    I think that we can use elsewhere as fnd_profile.value ('profile_name') (?)

    Kind regards.

  • Photo Viewer seem to use the incorrect color profile.

    I created a color profile by using X-Rite color grading equipment.   All my programs on my PC Windows 7 display the colors correctly except the photo viewer that shows all the colors in the dark.

    For example in Photoshop or Microsoft Office Picture Manager, you can see the details in the shadows, but with the same photo in Photo Viewer, the shadows are so dark that they don't see all the details and all the colors seem much more dark and intense.

    I used to use windows XP and did not have this problem.   Color calibration equipment is new and I use the latest version of the X-rite software on my Samsung SyncMaster monitor.  I found this same problem on another computer in Windows 7 with another Samsung monitor, but I don't think that its really a Samsung problem because I can not find another program except Windows 7 photo viewer that has this problem.

    I want to continue to use the Windows Photo Viewer, because it is quick and easy and is well integrated into other windows functions.
    I think it would be a simple solution to tell the photo viewer to use the correct color profile or simply to increase the brightness in Photo Viewer, but I can't find where is the setting.

    Thanks for any help to solve this problem.

    Success! ICC v2 switch fixed it. Thanks Alexander_L and dphildphil

  • SQL profiles persist?

    Article "How do I add a hint of query ORACLE without touching his text" intermediate SQL"I discovered that I can change the index of a particular query uses without changing the source code.»»»

    My question is: if I do this, it would last once I upgrade to the next version of Oracle?

    Thank you

    Thomas

    Hi Thomas,

    Yes because it is based on the SQL Profiler, but depending on your release (and editing), there are 'official' ways to do today.

    SQL patches

    Fixing of the base lines

    Concerning

    Stefan

  • ORA-06528: PL/SQL Profiler generator runtime error

    Version 11.2.0.3.  I have installad DBMS_PROFILER:

    SYS AS SYSDBA > @?/rdbms/admin/profload.sql

    SYS AS SYSDBA > @?/rdbms/admin/proftab.sql


    I tried to use dbms_profiler.start_profiler in PLSQL code with user NUFN and discovered that lacked the NUFN user privileges on the objects of the Profiler. So I ran the following grants:

    grant the update, insert and delete on plsql_profiler_units to NUFN;

    grant the update, insert and delete on plsql_profiler_runs to NUFN;

    Grant execute on DBMS_PROFILER to NUFN;

    But still no luck:

    SQL > START

    dbms_profiler.start_profiler ('test1');

    EXECUTE IMMEDIATE 'select max (STATS_UPDATE_TIME), owner of the DBA_TAB_STATS_HISTORY group from owner to owner.

    dbms_profiler.stop_profiler ();

    END;

    /

    BEGIN

    *

    ERROR on line 1:

    ORA-06528: PL/SQL Profiler generator runtime error

    ORA-06512: at "SYS." DBMS_PROFILER", line 123

    ORA-06512: at "SYS." DBMS_PROFILER", line 132

    ORA-06512: at line 2

    I can't find what is missing from my user NUFN for her to be able to run DBMS_PROFILER.  Help, please!

    Thanks Bella, I had not run @?/rdbms/admin/proftab.sql as my user NUFN but as sys.  But you know what?  Even after execution of @?/rdbms/admin/proftab.sql as NUFN, the problem persisted!

    So I traced my session, read the trace file and found nothing wrong (but I have no experience in finding fault with the workings of dbms_profiler).  But I found the SQL code executed by the dbms_profiler.start_profiler command, which is:

    PARSING IN CURSOR #4574691968 len = 155 dep = 2 uid = 155 oct 2 lid = 155 = tim = hv 530047132716 = ad 3718124591 = "7000000946da848" sqlid = "akx2pxvftw51g."

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL,: B1,: B2, USER) RETURN RUNID IN: O0

    END OF STMT

    ANALYSIS #4574691968:c = 315, e = 844, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 1, plh = 0, tim = 530047132715

    I tried manually the same HOME, and bingo, I discovered the cause of my problem:

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL, sysdate, 'manually', 'ME');

    ORA-01950: no privileges on tablespace execution times

    After performing ALTER USER NUFN QUOTA UNLIMITED ON STATES; the problem has been resolved.

    Conclusion: after DBMS_PROFILER installation for a user, make sure that the user can write in objects DBMS_PROFILER (SUBSIDIES and QUOTAS).

  • Shuttle value too long for use in LOV sql cascading

    Hello

    On APEX 4.2.2.0.11 & Oracle 10.2.0.5.0:

    I have a shuttle service set up as well as a select list with of LOV cascading.

    The shuttle shows organization name and returns a list of the IDs of the colon separated.

    The selection list shows the so-called events belonging to the organizations selected in the shuttle.

    The selection list is implemented as LOV cascading with the shuttle as a parent element.

    This works fine as long as the length of the shuttle point value does not exceed 4000 characters.

    If so, the LOV - sql select list will give an ' ORA-01704: string literal too long "-error on the instr function ().

    This is the query:

    Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE ORGS

    Join the LIFO ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DNR PART on (DNR. ADG_ID = ADG.ID)

    Join the TDR ON REGRET (TDR. DNR_ID = DNR.ID)

    Join the TEST TCT ON (TST.ID = RDT. TST_ID)

    where instr (': ' |: P1_ORG |) ':', ':' || OTE.ID | ') > 0

    order by 1

    Does anyone know how to make reference to the shuttle-value in sql, even if it is longer than 4000 characters?

    Well, I found a way to use LOVs cascading on page elements with values exceeding 4000 characters:

    Let's say I have a shuttle named P1_ORGANISATIE with "List of values" box, a dynamic LOV named "Source: lists of values Query" containing the value:

    Select NAAM as display_value, ID like return_value

    of NINEHAM

    order by 1

    If the number of records-NINEHAM is insufficient, the length of the value of P1_ORGANISATIE, which is a list of concatenated with colon separated digital ID, can exceed 4000 characters.

    Now suppose I have a list of selection called P1_TEST that is connected through "List of values"-> "En cascade LOV Parent article (s)" with P1_ORGANISATIE using a named LOV dynamics with "Source: lists of values Query" containing:

    Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | '':'') > 0

    order by 1

    In this case, when P1_ORGANISATIE exceeds 3998 characters, you'll get an "ORA-01704: string literal too long"-error and the P1_TEST will show an element called "undefined".

    A way around this is possible because for a named LOV, you can use a "function that returns a sql query" instead of a simple sql query. In other words, we can apply in the context of PL/SQL and thus have maximum for expressions of 32767 instead of 4000 characters. In addition, it is possible to use the two APEX_UTIL. STRING_TO_TABLE and APEX_COLLECTION.

    Setting "Source: lists of query values" on the LOV appointed to P1_TEST with the following code will work:

    DECLARE

    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;

    l_qry varchar2 (32767): =.

    "Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    $1

    order by 1';

    BEGIN

    IF: P1_ORGANISATIE IS NULL

    OR LENGTH(:P1_ORGANISATIE)<=>

    THEN RETURN

    Replace (l_qry

    ,'$1'

    ,' where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | '':'') > 0'

    );

    ON THE OTHER

    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P1_ORGANISATIE);

    APEX_COLLECTION. CREATE_OR_TRUNCATE_COLLECTION (p_collection_name-online 'ORGANISATIE_COLLECTIE');

    FOR id IN 1.l_selected.count

    LOOP

    APEX_COLLECTION.add_member (p_collection_name-online 'ORGANISATIE_COLLECTIE'

    p_n001-online to_number (l_selected (id))

    );

    END LOOP;

    RETURN

    Replace (l_qry

    ,'$1'

    ,'join apex_collections ON APC (APC. COLLECTION_NAME = "ORGANISATIE_COLLECTIE" AND APC. N001 = OTE.ID)"

    );

    END IF;

    END;

  • error in pseudo-column "DECODE" can be used within an SQL statement

    Hi gurus,

    Your help is grealty appreciated. Please help me.


    I'm trying to see if I can use the function decode as below and get the error, here below vPlatformfrom value would be QA or MTS


    vDataBase1 :='@'|| Decode (vPlatformfrom, 'STD', 'STD', 'QA', 'QA')


    Before we check function NVL to a single platform, but now we need the database based on the platform is here.

    -vDataBase1 :='@'|| NVL (vPlatformto, 'MTS');

    Error:

    PLS-00204: pseudo-column "DECODE" or function may be used within an SQL statement

    > So, here, instead of the decode function, I can use this case as below:

    Well... you can, but why?  In your CASE, you simply return the same value as the variable.

    You might as well use: vDataBase1: = vPlatformfrom;  It would reach exactly the same thing.

    If vPlatformfrom can be a null value, you will need to decide what database to use or an exception.  I think you're original code (NVL) were probably more correct, but I can't decide which.

    (and don't bother selecting double, it is an unnecessary sql statement which must be analysed, etc..)

  • SQL PROFILE


    Hi guys,.

    Database: 10.2.0.5

    One question.

    From my understanding, there are 2 types of sql Profiler:

    1. one who 'fixed' plan and produced exactly the same plan (this would be equivalent to the old contours "stored").
    2. one who 'does not' plan, but provide some clues such as "factors of scalling" which allow the optimizer produce a new plan, if conditions change, as more data.

    I look through a content of my profile. I confirm that the sql profile is type 1? And will not change in the future? (because new statistics, data change). Thank you

    DECLARE

    sql_txt CLOB.

    h SYS. SQLPROF_ATTR;

    BEGIN

    sql_txt: = q']

    < sql statement >

    ]';

    h: = SYS. () SQLPROF_ATTR

    q '[BEGIN_OUTLINE_DATA]. "

    q '[IGNORE_OPTIM_EMBEDDED_HINTS]. "

    Q '[OPTIMIZER_FEATURES_ENABLE ('10.2.0.5')]',

    q "[OPT_PARAM ("query_rewrite_enabled""false")]"

    Q '[OUTLINE_LEAF(@"sel$2")]',

    Q '[OUTLINE_LEAF(@"sel$1")]',

    Q '[Outline(@"sel$2")]',

    Q '[Outline(@"sel$1")]',

    q'[NO_ACCESS (@"SALT$ 1" "from$_subquery$_001"@"SEL$1")]',.

    q'[INDEX_RS_ASC (@"SALT$ 2" "B"@"SEL$2" ("TB_BOOK_METER".)] "METER_VALUE" "TB_BOOK_METER" "." " METER_TYPE' 'TB_BOOK_METER '. [(» METERID"))]',

    q'[INDEX_RS_ASC (@"SALT$ 2" "A"@"SEL$2" ("TB_METER".)] "METERID"))]',

    q'[LEADING (@"SALT$ 2" "B"@"SEL$2" "A"@"SEL$2")]',.

    q'[USE_NL (@"SALT$ 2" "A"@"SEL$2")]',.

    Q '[END_OUTLINE_DATA]');

    : signature: = DBMS_SQLTUNE. SQLTEXT_TO_SIGNATURE (sql_txt);

    DBMS_SQLTUNE. () IMPORT_SQL_PROFILE

    sql_text = > sql_txt,

    Profile = > h,

    name = > 'coe_7jryqf0abn6x8_117721467 ',.

    Description = > '7jryqf0abn6x8 CDE 117721467' | : signature: ",.

    Category = > 'DEFAULT ',.

    validate = > TRUE,

    replace = > TRUE,

    force_match = > TRUE / * TRUE: STRENGTH (even when match different literals in SQL). FALSE: RIGHT (similar to CURSOR_SHARING) * /);

    END;

    /

    Thank you

    It is more or less correct.

    The profile SQL mechanism has been con¸u to work with the wizard to setup in SQL for the cardinality of the feedback and the selectivity of execution statistics.

    If this use 'default' profile SQL tips as OPT_ESTIMATE.

    But the same mechanism can be used to apply a set of tips or tricks and so there are these 'default' SQL Profiler to use as well.

    I tend to call them profiles SQL WCC-style because of the COE_XFR_SQL_PROFILE provided by Oracle and supported. SQL script that uses DBMS_SQLTUNE. IMPORT_SQL_PROFILE to create this kind of profile after you have extracted the framework of memory or AWR.

    Yes, it is a profile of WCC-style SQL.

    And it is likely to be relatively stable as long as one or more of the tips are not disabled due to changes in the object.

    This kind of profile SQL does not have a concrete plan in the way a baseline does (so not relevant to 10.2.0.5 feature 11g)

    A reference doesn't know the specific plan hash, it must create, if it cannot reproduce it, the set of indicators is rejected.

    While the profile of SQL has no knowledge of hash of the plan, boards can be fully or partially implemented.

    It allows to reflect with the example of an index drop/change/rename.

    Some or all tips in SQL profile can still be applied.

    For the baseline, it is likely that all of the advice is rejected.

  • Using the function PLSQL return Record Type Index of Tables in ADF

    I have a PLSQL function, a return type. My ultimate goal is to take this binary integer index Table and print it on the screen...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table ;
    END my_pkg;


    OPTION 1:

    1) has anyone got best practices to accept plsql RECORDS returned by a function?

    Here is an example.

    http://adfpractice-Fedor.blogspot.SG/2013/01/working-with-PLSQL-procedures-in-ADF-BC.html

    But it will be a lot of work... first of all accept the results in a loop... then store in a temporary storage can be a few VO or global temporary table and then display them on the page


    OPTION 2:

    Using the functions PIPLELINED and use in the select statement.  While I can use this select statement in the SQL query to create VO... and drag and drop the VO...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table PIPELINED;
    END my_pkg;


    select * from table(my_pkg.return_table);


    Wow... I'm so smart! .. really possible?  who is the best/possible/recommended option?

    I'm sure that will be the question most read by many who wants to use PLSQL instead of JAVA to the treatment and CHOSEN to use only to display the output of the PLSQL functions or procedures.


    Thank you

    Rahul


    Dario

    Do you mean the scope of the defined Type pkg will be finished?

    I created guy outside the pkg as 'Create Type' if it works in this case?

    Yes, level objects schema (created with "create or replace type...") can be used in java and this can work.

    I think that then the scope of this TYPE will remain until the user session passes.

    Object definitions is not worn, but have their bodies.

    So, if you instantiate the data level object type schema in a plsql function, scope of this object is this function.

    Of course, if you instantiate the object as a variable package, then life of this object is equal to the lifetime of the package (which usually equals life of session db).

    Dario

Maybe you are looking for