DBMS sql: native compilation

Salvation;

We develop several packges in pl/sql.

In order to spin faster, we decided to compile natively. (don't really know now if it was a good decision!)
ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;
change the package XXX compilation package.
change the package package YYY compilation;

After this compilation, SYS. Trows DBMS_SQL (used in our packages) a mistake:
ORA-29471 dbms_sql access denied

It works well, if we also compile the SYS. DBMS_SQL natively.
ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;
change the package package sys.dbms_sql compilation;

Is it safe to do? Is this native compilation a good pratice pl/sql?

PauloSMO wrote:
In order to spin faster, we decided to compile natively. (don't really know now if it was a good decision!)
ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;

After this compilation, SYS. Trows DBMS_SQL (used in our packages) a mistake:
ORA-29471 dbms_sql access denied

If you have clearly chosen foruse dynamic SQL, you chose to give priority less LOC on the performance. So, why go this route? Precompile your PL/SQL in native C won't make a big difference for the overhead of constantly Assembly and analysis of SQL statements.

In addition, advice on native compilation are that it is beneficial for pure PL/SQL programs but does not have much of a difference to programs that are controlled by the data. If you use dynamic SQL statements chances are your routines are data-driven (otherwise, what's the point to use dynamic SQL statements?) it seems very little probable that you will see a lot of value to native compilation, although YMMV.

Cheers, APC

Tags: Database

Similar Questions

  • Native compilation on XE running on Windows XP

    Hi all
    is it possible to make a native compilation on XE that runs on Windows? Also, I find some difficulties to find a concise documentation describing the configuration of installation process.

    I'm also curious about spnc_commands (since the installation of windows by default XE) script that generates the shared object, because I don't know how to confirm if one executes the correct command:
    cl.exe %(src) /nologo /Zm200 /Og /Oy /MD /Fo%(obj) /I$(ORACLE_HOME)/rdbms/public /I$(ORACLE_HOME)/plsql/include /link /nologo /dll $(ORACLE_HOME)/lib/orapls10.lib /out:%(dll)
    My questions are:
    1. How can I make sure if the command above is correct?
    2. cl.exe is a compiler for windows? If Yes, is it supposed to located in $ORACLE_HOME/bin? Because I can not find this file in the directory.
    3. I was a book to the installation for the object files directory resulting in $ORACLE_HOME/ncomps. Can I edit the spnc_commands and add the directory of the file object in the script? If so, how?
    4. is it possible to make a native compilation on XE that runs on Windows?
    5. in addition, I find some difficulties to find a concise documentation describing the configuration of installation process. Someone I could point out to correct docs that explains every detail for Windows XE?

    Kind regards
    TA.

    My questions are:
    1. How can I make sure if the command above is correct?
    2. cl.exe is a compiler for windows? If Yes, is it supposed to located in $ORACLE_HOME/bin? Because I can not find this file in the directory.
    3. I was a book to the installation for the object files directory resulting in $ORACLE_HOME/ncomps. Can I edit the spnc_commands and add the directory of the file object in the script? If so, how?
    4. is it possible to make a native compilation on XE that runs on Windows?
    5. in addition, I find some difficulties to find a concise documentation describing the configuration of installation process. Someone I could point out to correct docs that explains every detail for Windows XE?

    Kind regards
    TA.

    Hello

    It is possible to make a native compilation on Windows XP with Oracle 10 g XE

    1. you can copy, fill in the parameters, and execute it in the command line tool
    2 cl.exe is compiler, but it is not delivered with Oracle. You must install the external C compiler to compile pl/sql in native binary code
    3. you must set plsql_native_library_dir to specify where the dll files will be stored
    4 YES :)
    5 see the steps below:

    There are a lot of prequerities that must be met to make the native compilation on Windows XE using Oracle 10 g XE, but it is possible.

    I. first - you need to install external C compiler for all works. I use MinGW for free and install it in C:\MinGW\

    Make sure that the PATH environment variable includes C:\MinGW\bin\, then the database is restarted.

    II. you must create the directory where the binaries will be stored and specify the path to the Oracle parameter

    ALTER SYSTEM SET plsql_native_library_dir = "c:\native\";

    III. must specify that the pl/sql code should be compile native

    ALTER SESSION SET plsql_code_type = native;

    ALTER SESSION SET plsql_compiler_flags = native;

    IV. you must specify the path to the directory of the compiler:

    ALTER SESSION SET plsql_native_c_compiler = ' c: / MinGW/bin /';

    V. the last thing is to modify the spnc_commands file. Caution - there is error in the example command delivered by Oracle (some include directory failed if I remember correctly). My file looks like:

    c:/MinGW/bin/gcc - c % (CBC) - O1-I$ (ORACLE_HOME) / rdbms/public - I$ (ORACLE_HOME) / plsql/include - I$ (ORACLE_HOME) / BEAK/include o %(obj)
    c:/MinGW/bin/ld-shared e 0 x 0 %(obj) $(ORACLE_HOME)/lib/orapls10.lib o %(dll)

    VI. Note that I used ALTER SESSION for the parameters that will be result in fact after having reconnected you will need to reconfigure. For a permament configuration using ALTER SYSTEM

    Edited by: krycek6 2011-06-10 03:24

  • Error-2147286787 installation of Microsoft Sql Native Client on Windows XP

    Hi all

    I'm having a problem with my sql Server 2005. When im clicking on the components of the server, tools, books online and samples, and license agreement for the popup
    and when I click on it it shows me "Microsoft Sql Native Client and Microsoft SQl Server 2005 Setup Support files" and when I click on install error messages r dispalyed:

    Microsoft Sql Native Client: An error has occurred during installation:
    Error-2147286787 installation of Microsoft Sql Native Client. See the log file for more information. An unexpected error has occurred.

    I installed IIS and .net framework 2.0, as im using the service don't pack 3 no need to Windows Installer. Is there a problem with my system, or is - this software problem.
    Please help my project happens and im stuck. Thanks in advance.

    Kind regards

    Rohit.

    Hello

    Given that the problem is related to SQL Server, I recommend that you post this question in the Instances of SQL Server.

  • Connection failed SQL State 08001 SQL Server Error 10061 SQL Native Client TCP provider no. could be made because the target machine actively refused it

    Wandering SQL Native Client Datasource - apparently, it's a pretty common problem and I see several resolutions to it.  This problem started for our long company until I started working here.  We do not allow remote connections.  JDE Enterprise Server and SQL server are on the same subnet.  Users are on a different subnet.  SQL Server gets this message tries to connect to the Server Enterprise JDE:

    Connection failed: State 08001 ' SQL': SQL Server Error 10061: Microsoft SQL Native Client TCP provider: no connection could be made because the target machine actively refused it.

    I tried several suggested solutions and do not get the case. Any help is appreciated. Thank you, Sophie

    Hello

    The issue of Windows XP, you have posted is better suited for the IT Pro TechNet public. Please ask your question in the SQL Serversupport for assistance.

    Hope the helps of information.

    Concerning
    Joel S
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Change Vcenter DSN 2005 SQL native client for SQL 2008 native client

    Hi all.

    I tried to upgrade our Vsphere for VM Windows 5.5 to Vsphere 6.0 for Windows (latest version of January).

    The upgrade checking failed after entering the credentials of user Vcenter. The error is 'unsupported database driver.

    In fact the DSN connection uses the SQL native client 2005.90.2047. Is also on the system SQL native client 10. (Version 2009.100.2500) is installed. I think it's the SQL 2008 R2 native client.

    The SQL Vcenter database is on a remote database SQL 2008 R2 server.

    I tried to change the DSN of SQL native client 10. The service started, but I've seen lots of SQL errors in the vpxd.log. I could solve only to return to the snapshot and restore the SQL database.

    How can I change the SQL Native client to connect DSN correctly?

    Thank you very much in advance?

    Edy

    Have you removed the old DSN entry and created a new using the driver of the new (and good)? And have you checked the registry if your change reflected here (\VMware Virtualcenter\DB HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.)?

  • Are SQLs form compiled in PLSQL?

    Hi all

    After the right amount of discussion with a number of developers, I'm posting this question.

    Are SQL statements in the PLSQL stored in compiled form, procedure as procedural statements or SQLs are compiled in a stored procedure is called?

    Thanks in advance.

    Kind regards
    Alex

    Ateet Mehta wrote:

    This means, the entrance to the sql engine is exactly the same for 1) static sql fired from 2) static sql and sqlplus inside plsql... ?

    We can confirm that static SQL, when compiled in PL/SQL, does not create a cursor pool shared, but that cursor is created only at run time.

    Cannot therefore a ' + create cursor + "call to the engine SQL pass a struct already validated/analyze/semantically analyzed, instead of SQL source code?

    Don't know how to confirm or deny that the use of tables in v$. I would not say that I can not remember ever having seen such a structure or call the OCI (Oracle Call Interface). It would also be a dangerous and risky interface to the SQL engine to support - that it should rely on the appellant to a valid structure. In addition, what concurrency? The SQL engine to use this structure and the objects referred to in this document, to the shared locks on these objects to prevent any change/withdrawal between where the struct validated/analyze/semantically analyzed was created by the caller (for example, PL/SQL) and received for processing by the SQL engine. If the appellant must also required locks put on the data dictionary.

    This approach seems not very reliable for me. She relies heavily on the appellant to spend a working structure for the SQL engine and change the State of the database accordingly to maintain the integrity of the structure for the SQL engine to use.

    And even in this case, the SQL engine will always have to use the CBO to determine an execution plan for this struct has received.

    So exactly what is the percentage of run time was saved by the presence of the appellant passing this structure to the SQL engine, instead of a source code structure?

    If the motor input sql is exactly the same, what is the importance to generate pcode for static sql plsql inside?

    Because of things like bind variables. The static SQL in PL/SQL is often not "pure" SQL It contains references to structures and PL/SQL variables. This requires for example bind calls (take a look at the DBMS_SQL package that illustrates the basic principles of the OIC well enough).

    which, in my view, is there not any need for syntax and semantic analysis for sql static writtein in plsql, when they are sent to the static sql, unlike sql engine from sqlplus or client application.

    I have to disagree on that. I do not see a real performance benefit of such an approach - and IMO it will be not very strong either.

  • C# SQL Native client connection methods

    Hello

    I am new to programming in c# and would like to know the/favorite for the best method to connect to a SQL database using the native client.

    I tried to TCP/IP which seems very slow and the outdoors and also appointed who is almost instantaneous.

    Having not used before named pipes are there advantages or disadvantages to use?

    What is the recommended method?

    Thank you

    Oil

    Micro Focus systems


    This issue is beyond the scope of this site and to make sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
  • DBMS SQL DIAG package

    Hi all

    Recently I came across the "dbms.sqldiag_internal" package in oracle's blog.

    It has been mentioned that this package can be used to create fix sql with notes, thus changing the path queries generated by applications packaged as siebel.

    I googled carefully on the creation of this patch, but in vain. There was one and only reference to blogs.oracle.com with an example. Also, this has not been documented by Oracle.

    So I would like to know if someone tried to create patches SQL in this way and they was useful?

    If so could provide me with some references for the implementation step by step?


    Please find below oracle blog link:

    https://blogs.Oracle.com/optimizer/entry/how_can_i_hint_a

    Recently I came across the "dbms.sqldiag_internal" package in oracle's blog

    I think that it was news to most of us.

    The implementation step by step has been detailed in the blog that you linked.

    The most important point on application of your own sql patch is if it is supported, and why you would use this approach on an approach supported and documented using a base plan sql?

    I asked the question on the blog, but he has not spent with moderation and not responded to.

    You can certainly use base lines to amend the plan packaged sql using dbms_spm.load_plans_from_cursor_cache, for example
    http://OraStory.WordPress.com/2011/10/13/no-need-to-change-source-code-hint-it-using-a-baseline/

  • Reg - pl sql conditional compilation

    Version details
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production
    create or replace package r_dummy_pkg
    is
         procedure proc_table_doesnt_exist;
         procedure proc_valid;
    end;
    /
    
    show err;
    
    create or replace package body r_dummy_pkg
    is
         procedure proc_table_doesnt_exist
         is
              l_count number;
         begin
              select count(*)
              into l_count
              from doesnt_exist_tbl;
         
         end proc_table_doesnt_exist;
         
         procedure proc_valid
         is
         begin
              dbms_output.put_line('Fine');
         end proc_valid;
    end;
    /
    
    show err;
    SQL> @"H:\Raghu\INDEX\cc.sql"
    
    Package created.
    
    No errors.
    
    Warning: Package Body created with compilation errors.
    
    Errors for PACKAGE BODY R_DUMMY_PKG:
    7/3      PL/SQL: SQL Statement ignored
    9/8      PL/SQL: ORA-00942: table or view does not exist
    SQL>
    Updated the my code using conditional Compilation and she got well compiled
    create or replace package r_dummy_pkg
    is
         $if $$rgh_cc $then
         procedure proc_table_doesnt_exist;
         $end
         procedure proc_valid;
    
    end;
    /
    
    show err;
    
    create or replace package body r_dummy_pkg
    is
         $if $$rgh_cc $then
         procedure proc_table_doesnt_exist
         is
              l_count number;
         begin
              select count(*)
              into l_count
              from doesnt_exist_tbl;
         
         end proc_table_doesnt_exist;
         $end
         
         procedure proc_valid
         is
         begin
              dbms_output.put_line('Fine');
         end proc_valid;
    end;
    /
    
    show err;
    SQL> @"H:\Raghu\INDEX\cc.sql"
    
    Package created.
    
    No errors.
    
    Package body created.
    
    No errors.
    SQL>
    I tried activation conditioning block, but I don't understand how
    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    
    
    SQL> alter package r_dummy_pkg compile body plsql_ccflags='rgh_cc:true';
    
    Warning: Package Body altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    Is something wrong with the alter, I published? How to make part of the compiled code?

    First of all I don't know how you get:

    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    

    I can't reproduce on 10.2.0.4.0 and 11.2.0.1.0:

    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    SP2-0564: Object "r_dummy_pkgplsql_ccflags='rgh_cc:true'" is INVALID, it may not be described.
    SQL> 
    

    For errors you need:

    SQL>  select  text
      2    from  user_errors
      3    where name = 'R_DUMMY_PKG'
      4  /
    
    TEXT
    -------------------------------------------------------------
    PL/SQL: ORA-00942: table or view does not exist
    PL/SQL: SQL Statement ignored
    
    SQL> 
    

    Now ' is something wrong with the alter, I published? How to make part of the compiled code? ».

    There is nothing wrong with the ALTER statement. Since when the package was compiled for the first time $$ rgh_cc has not been set to TRUE proc_table_doesnt_exist procedure was not part of compilation - just part of the source code. But as soon as you issue ALTER that defines $$ rgh_cc was true package is recompiled and procedure proc_table_doesnt_exist becomes a part of the compilation. Obviously the compilation fails because the proc_table_doesnt_exist procedure reference table while no.

    SY.

  • SQL Native Performance difference between coded hard and parameter value

    Hello

    I have a SQL query (Oracle) native (quite long and complex with many subqueries) which returns in less than a second in ODSI and using an external SQL tool. This query contains a hardcoded for a particular, namely column value, a date column.
    When I change the function ODSI signature so that I have pass a parameter, and then replace the hardcoded value in the native SQL with the appropriate parameter binding notation (i.e. '?'), the query takes much longer (2-30 seconds). The duration of the query depends on how many records is returned, so he must execute a separate query for each of the outcomes (i.e. most returned results, longer the query takes to return).
    What can I do to maintain the duration of my low ODSI request while allowing the setting?

    Thank you. Try the oracle.jdbc.OracleDriver in WLS/ODSI, let know us.

  • Error 2203 when try to install Microsoft SQL Native Client

    Hello, good afternoon. I tried so many ways to install the program, change the security of the folder, etc, but for a reason, the error still occurs. I don't know if I just forgot to do something else; I use Windows Server 2012 Standard.

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_programs/error-2203-when-using-Windows-Installer/6ee19473-91e9-4DC1-8937-d0ce6b9c3e85?auth=1

    https://support.Microsoft.com/en-us/KB/2000547
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_programs/Windows-Installer-error-2203-and-system-error/731c8862-8A9E-4f6d-9a7e-8f599790b18e

    Thank you.

    Hello

    Your question is beyond the scope of this community.

    Please repost your question in the SQL Server TechNet Forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • How to get to the APEX of the variables within the pl/sql function compiled.

    Hello
    My initial problem is to create the pl/sql code returning the names of columns for my custom calendar report.
    There are 7 columns for each day of the week and I want to make on two rows - all first day of the week, as the word 'Monday' and below (with the BR tag) the date as August 18, 2008 "."
    What I want is to define any additional tags to underline, italic, etc. on the column for which the date is selected for display (I point DATE for this purpose).
    But as the code becomes very complex, I decided to write a function in my pattern that returns the values of the columns defined for the titles.

    What I can't do is the following.
    (1) how to reference a value of element APEX, such that my point DATE? using results of unknown function 'v' ('P4_DATE') v
    (2) how to use tank-date and vice versa, conversion using the format mask, available at the APEX 3.1 already implemented application? So that when I change the date format mask in the application, it would still work.
    10 x and I hope I'm not repeating someone else question.

    Hello

    That's correct - any item (including elements of application) in the session can be used from : nom_element as parameter in a function (or procedure) is defined as the function (or procedure) with PARAMETERS.

    Concerning

    Andy

  • Is pl/sql language of the compiler or interpreter of programming language?

    Hello guys,.

    Is pl/sql language of the compiler or interpreter of programming language?

    Thank you

    Published by: Polat on 14.Mar.2012 09:09

    >
    Is pl/sql language of the compiler or interpreter of programming language?
    >
    The two-

    See compilation of PL/SQL units for running Native in the Doc of the PL/SQL language
    http://docs.Oracle.com/CD/E18283_01/AppDev.112/e17126/tuning.htm#sthref1023

    >
    You can usually speed up the units of PL/SQL compile native code (code system processor-dependent), which is stored in the SYSTEM tablespace.

    You can compile natively any PL/SQL for any unit, including those providing the database Oracle.

    The program compiled natively units work in all environments of servers, including the configuration of shared server (formerly called "multi-threaded server") and Oracle Real Application Clusters (Oracle RAC).
    >

    And this from the section How PL/SQL Native Compilation Works
    >
    How does the Native Compilation of PL/SQL
    Without native compilation, statements from PL/SQL in a PL/SQL unit are compiled into an intermediate form, the system code, which is stored in the catalog and interpreted at run time.

    With native compilation of PL/SQL, PL/SQL instructions in a PL/SQL unit are compiled into native code and stored in the catalog. Native code should not be interpreted at the time of execution, so that it runs faster.

    Because the native compilation applies only to the PL/SQL statements, a unit of PL/SQL that uses only SQL statements may not work faster when it is compiled into native mode, but it works at least as fast as the interpreted code. The compiled code and the interpreted code are the same library calls, their action is the same.

  • Table external slow access of compiled PL/SQL, quick of SQLPLUS

    I'm under Oracle Standard Edition One 12.1.0.1.0 Windows x 64.  Small and simple external table queries since met PL/SQL are run very slowly with a second 18 delay, but the same sqlplus queries run very fast, both on the same instance.  I ran Profiler DBMS and debugged PL/SQL to confirm that it takes 18 seconds to query the file header record in an external table in PL/SQL, but the same exact sqlplus query runs in 0.07 seconds.

    This seems very odd.  I searched online and OTN, but I can find no example of why this would happen between the two access methods in the same instance.  Something is suspended until the execution of the external PL/SQL table compiled very hurt to be 18 seconds vs 0.07 seconds of sqlplus.  Before you buy the license Oracle I tried the table external access on trial Enterprise Edition on a laptop Windows x 64 where approaches both the PL/SQL and SQL executed just as fast (0.07 seconds in this case).  The main difference now is Standard Edition and Enterprise and production running on a Windows x 64 server.  I have no parallel enabled in the environment.

    The log file of external table displays this information message:

    KUP-05004: WARNING: disabled source Intra concurrency because select parallel is not sought.

    I think it's just because I'm not under parallel access on the external table.  The message is the same if the questioning of PL/SQL or sqlplus.

    It seems to be something coherent overall of all external PL/SQL tables in this case, because I studied 3 external tables and they all almost exactly 18 seconds later to PL/SQL vs sqlplus, even if number of rows of tables outside and requests files access to them are different.

    How can I know which slows down access PL/SQL method and correct to my production programs?  I created a test case and ran to share results:

    I create an external table of test:

    -Create table

    create the table TEMP_EXT

    (

    Field1 VARCHAR2 (10),

    VARCHAR2 (10) Field2.

    field3 VARCHAR2 (10)

    )

    external organization

    (

    type ORACLE_LOADER

    STRATESIS_DATA_DIR default directory

    access settings

    (

    RECORDS DELIMITED BY '\n '.

    BADFILE STRATESIS_LOG_DIR: 'temp.bad'

    STRATESIS_LOG_DIR LOG file: 'temp.log'

    NODISCARDFILE

    FIELDS TERMINATED BY ', '.

    SURROUNDED OF POSSIBLY "" "

    MISSING FIELD VALUES ARE NULL

    (Field1, Field2, field3)

    )

    location (STRATESIS_DATA_DIR: 'temp.txt')

    )

    reject the limit 0.

    I already have the directories above put in place in the database.

    I create a file temp.txt in the above data directory. It has two rows:

    Field1, Field2, field3

    2field1, 2field2, 2field3

    I create an autonomous PL/SQL procedure (not in a package, but I get the same result if I put it in a package):

    create or replace procedure tryplsql is

    l_field1 temp_ext.field1%TYPE;

    l_field2 temp_ext.field2%TYPE;

    l_field3 temp_ext.field3%TYPE;

    BEGIN

    SELECT field1, Field2, field3

    IN l_field1, l_field2, l_field3

    OF temp_ext

    WHERE field1 = "field1";

    Dbms_output.put_line(l_field1 ||) ',' || l_field2 | ',' || l_field3);

    end tryplsql;

    I run as a sqlplus pl/sql procedure:

    SQL > exec tryplsql

    Field1, Field2, field3

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:17.68

    SQL > spool off;

    It takes almost 18 seconds?

    I performed the simple query of sqlplus and it's quick:

    SQL > select Field1, Field2, field3 from temp_ext where field1 = "field1";

    FIELD1 FIELD2 FIELD3

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

    Field1 Field2 field3

    Elapsed time: 00:00:00.01

    SQL > spool off;

    Very fast 0.01 second.

    I run the following block of sqlplus:

    SQL > DECLARE

    l_field1 2 temp_ext.field1%TYPE;

    3 l_field2 temp_ext.field2%TYPE;

    4 l_field3 temp_ext.field3%TYPE;

    5

    6 BEGIN

    7 SELECT field1, Field2, field3

    8 l_field1, l_field2, l_field3

    9 FROM temp_ext

    10. WHERE field1 = "field1";

    11

    12 DBMS_OUTPUT.put_line(l_field1 ||) ',' || l_field2 | ',' || l_field3);

    13

    14 END;

    15.

    Field1, Field2, field3

    PL/SQL procedure successfully completed

    Elapsed time: 00:00:00.01

    SQL > spool off

    It is also very fast.  In SQL, and even a PL/SQL block sqlplus are fast, but a procedure have complied is slow?

    I have a lot of packages, procedures, functions, etc., running very fast in the DB as long as there are no external table access (no time 18 seconds).  I ran DBMS Profiler on several sections of code - in all cases, that the call to the external tables takes 18 seconds.  I tried to debug PL/SQL and again the request to the external tables takes 18 seconds every time.

    Probably something obvious I'm missing, but I am confused.  Any help is appreciated.

    Support of Oracle has identified the issue as a known bug in 12.1.0.1.   Bug #18824125

    The workaround until patched is drop the PL/SQL as sys (not a good option), or to grant any directory of the user who executes the PL/SQL will be launched.  It worked.

  • Compiling native vs interpreted

    Hello

    May anywhone contact me the answer on the question of sample size on OCP Oracle Database 11g: Advanced PL/SQL.

    7. you change the value for the parameter PLSQL_CODE_TYPE to the previously defined value of the NATIVES INTERPRETED. Which of the two statements would be true in this scenario? (Choose two.)

    1. all compiled into native PL/SQL program units could be invalidated.
    2. He has no effect on PL/SQL program units that have already been compiled.
    3. for all program units PL/SQL that have been compiled as native, as a result of the automatic recompilations would use native compilation.
    4. for any program PL/SQL units that have been compiled as native, as a result of the automatic recompilations would use interpreted compilation.

    The correct answer is 1 and 3.

    Why 3 is correct, not 4?

    Welcome to the forum.

    Why 3 is correct, not 4?

    Sometimes the search of the Oracle online documentation can be very helpful:
    "When the value of this parameter is changed, it has no effect on PL/SQL library units that have already been compiled. The value of this parameter is stored persistently with each library unit.
    If a PL/SQL library unit is compiled natively, all subsequent automatic recompilations of that library unit uses native compilation. »
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17110/initparams191.htm#REFRN10253

    http://www.Oracle.com/pls/db112/search?remark=quick_search&Word=PLSQL_CODE_TYPE
    11g Doc House:
    http://www.Oracle.com/pls/db112/homepage

Maybe you are looking for