native_plsql

native_plsql - NativePL/SQLCompilation inOracle9i...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Native PL/SQL Compilation in Oracle9i Roger Schrag Database Specialists, Inc. www.dbspecialists.com
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Today’s Topics Overview of PL/SQL native compilation What is it? How do you use it? Why? Documented limitations
Background image of page 2
3 More Topics My experience with PL/SQL native compilation Project background Ease of use Stability and reliability Performance Overall impressions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Feature Overview What is “PL/SQL native compilation”? How do you use this feature? Why would you want to bother? Are there any documented limitations?
Background image of page 4
5 PL/SQL Native Compilation Starting in Oracle9i Release 1, PL/SQL program units can be compiled directly into machine code. Stored procedures, functions, packages, types, and triggers Alternatively, PL/SQL code can be interpreted as in Oracle8i and earlier.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 When PL/SQL Native Compilation  Occurs When you create or explicitly recompile a PL/SQL program, the plsql_compiler_flags instance parameter tells Oracle whether or not to natively compile the code. This setting gets saved with the PL/SQL program and used in the future in the event of an implicit recompile.
Background image of page 6
7 Explicit vs. Implicit Compilation Explicit compilation is where you tell Oracle to compile a program unit: CREATE PACKAGE dbrx_util… CREATE OR REPLACE TRIGGER customers_t1… ALTER FUNCTION valid_email_address COMPILE; Implicit compilation is where Oracle needs to access a PL/SQL program unit that has been invalidated. In this case Oracle recompiles the program without being told to do so.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 How PL/SQL Code is Compiled When you compile PL/SQL into byte codes, Oracle parses the code, validates it, and gen- erates byte codes for interpretation at runtime. If plsql_compiler_flags is set to ‘native’, then Oracle generates a C code source file instead of the byte codes. The C code is compiled using your C compiler, and linked into a shared library callable by the oracle executable.
Background image of page 8
9 How to Natively Compile  PL/SQL Programs Locate C compiler, linker, and make utility. Edit the supplied make file as needed. Create a shared library directory. Set instance parameters. Explicitly compile PL/SQL programs. Query the data dictionary.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Locate Your C Compiler,  Linker, and Make Utility Oracle uses these tools on your database server to natively compile PL/SQL programs. See the Oracle Release Notes for your platform or Metalink bulletin #43208.1 for which C compiler is certified for use with Pro*C on your platform. Most operating systems come with one standard linker and make utility. Find where these utilities are installed on your database server.
Background image of page 10
11 Edit the Supplied Make File Oracle provides a make file called spnc_makefile.mk in $ORACLE_HOME/plsql. Verify the variable settings:
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 61

native_plsql - NativePL/SQLCompilation inOracle9i...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online