Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

Linda Webb

Got breaking Oracle news?    Burleson Consulting Oracle News

Click here for more Oracle News Headlines

 


Hypercharge performance by compiling PL/SQL

 
Jean-Luc Touzalin has published step-by-step instrictions for compiling PL/SQL.
 
How to use the new feature native compilation in Oracle 9i
This new feature in 9i allows to transform a procedure writing in PL/SQL in a shared library (.so file)

It uses a C compiler on your system (+ make and ld).
 
It's usefull if the process is complex in PL/SQL and this feature allows up to 40% in performance.
I didn't find a lot of documentation on this topic so I'm sharing my experience.
My environment is Solaris 9 and GNU C


So, first download and install the current version of GNU C.
Modify your init.ora file
plsql_compiler_flags='NATIVE'
plsql_native_c_compiler ='/usr/local/bin/gcc'
plsql_native_library_dir  ='/appli_std/oracle_9i/9.2.0/NATIVE'
plsql_native_linker  =/usr/ccs/bin/sparcv9/ld
plsql_native_make_file_name  ='/appli_std/oracle_9i/9.2.0/plsql/spnc_makefile.mk'
plsql_native_make_utility ='/usr/ccs/bin/make'


Here I created a directory /appli_std/oracle_9i/9.2.0/NATIVE. Oracle will put the sources and .so libraries there.

Modify the file $ORACLE_HOME/plsql/spnc_makefile.mk
OPTIMIZE=-O1  # no optimization
CC=/usr/local/bin/gcc  
LD=/usr/ccs/bin/sparcv9/ld


That's all.

When you will compile a procedure, a source will be created in /appli_std/oracle_9i/9.2.0/NATIVE
If the compilation is ok, you should have a file containing the name of your procedure + __User_name.so
If it's not, the .c file still exist and you can test  manually to search for the problem with make
 
>/usr/ccs/bin/make -f ../plsql/spnc_makefile.mk PKG_DIFFUSER_TK__TK_ADM__3

gcc: unrecognized option `-Kpic'
ld: warning: option -o appears more than once, first setting taken

 
You see here 2 problems of type Warning.

On my part, I had problem with  the initial parameter OPTIMIZE

#OPTIMIZE=-xO1 -Xa  -xstrconst -dalign -xF -mr -xildoff -errtags=yes -v -xarch=v9 -xchip=ultra3 -W2,-AKNR_S -Wd,-xsafe=unboundsym -Wc,-Qiselect-funcalign=32 -xcode=abs44 -Wc,-Qgsched-trace_late=1 -Wc,-Qgsched-T5 -xalias_level=weak -D_REENTRANT -DBIT64 -DMACHINE64
 

 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational