Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

Native Compilation of PL/SQL

Beginning with Oracle9i, you can speed up many of your PL/SQL programs by compiling the stored programs natively. Oracle will translate your PL/SQL program into C code and compile it into a shared library (a DLL on Windows). You must have a supported C compiler on your database server machine to support native compilation.

We’ve summarized the steps needed to compile your PL/SQL program natively, but refer to the Oracle documentation for details:

  1. Edit the makefile spnc_makefile.mk, which should be in the $ORACLE HOME/plsql subdirectory.

  2. Set the initialization parameter PLSQL_COMPILER_FLAGS = `NATIVE’. You may also need to set these additional parameters (see Chapter 2 for information):

    PLSQL_NATIVE_C_COMPILER
    PLSQL_NATIVE_LINKER
    PLSQL_NATIVE LIBRARY_DIR
    PLSQL_NATIVE_MAKE_UTILITY
    PLSQL_NATIVE_MAKE_FILE_NAME

    You can set these in the SPFILE/INIT.ORA file or with an ALTER SYSTEM statement.

  3. Create or replace your stored programs.

  4. Verify the native compilation by querying the data dictionary view USER_STORED_SETTINGS and also by locating the shared library or DLL in the database server’s filesystem.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page