Taking too long? Close loading screen.

Oracle Database 11g R2: Advanced PL SQL Programming and Tuning

Overview

The PL/SQL programming language is at the core of most Oracle database applications. This training course will give attention to three fundamental pillars of effective implementation of PL/SQL applications.

First, we will explore the advanced features of the language which allow powerful and effective database applications to be built. Next, we will discuss performance tuning techniques which allows these applications to run efficiently. Finally, we will consider critical security measures which should be implemented to counter hacker attacks and other security threats.

Course Objectives Among the specific topics contained within these training materials are:

• Invoking external procedures and integrating these into PL/SQL applications. These include external Java classes using the JDBC interface and external C programs contained within DLL libraries.

• Exploiting and managing cursor sharing and bind variables to maximize embedded SQL execution performance.

• Obtain the performance benefits that come from employing SQL and PL/SQL result caching.

• Using dynamic SQL to extend the functionality and flexibility of database programs, including the DBMS_SQL() system-supplied package for maximum flexibility.

• Identifying SQL injection attack vulnerabilities within an application and applying countermeasures to address security risks and protect against hacking.

• Incorporating collections and other advanced types into application logic to increase efficiency and execution speed.

• Working with LOBs, including piece-wise data manipulation and dynamic modification of SecureFile storage options.

• Expanding functionality with system-supplied database utility packages.

• Tuning with the DBMS_PROFILER() system-supplied package and debugging with the DBMS_TRACE() system-supplied package.

• Writing efficient PL/SQL code and avoiding common coding mistakes.

• Enabling native compilation and execution of all database-resident program units.

• Controlling and managing PL/SQL compilation for high-efficiency execution.

• Analyze PL/SQL code structure by means of the PL/Scope facility.

• Analyze PL/SQL application performance and tune bottlenecks using the PL/SQL Hierachical Profiler.

• Recognizing the dangers of SQL injection attacks against PL/SQL applications and applying countermeasures to this potential security threat from hackers.

• Implementing fine-grained security mechanisms as part of an advanced security model using application contexts and the Oracle virtual private database (VPD).

Who Should Attend

The target audience for this course is senior application developers. Developers who will be building, debugging and tuning PL/SQL program units will benefit from this course.

Course Outline

EXPLOITING & MANAGING CURSOR SHARING • ABOUT CURSOR SHARING • BIND VARIABLES & CURSOR PEEKING • USING THE CURSOR_SHARING PARAMETER
USING THE DATABASE RESULT CACHE • ABOUT THE RESULT CACHE • CONFIGURING THE RESULT CACHE • RESULT_CACHE_MAX_SIZE • RESULT_CACHE_MODE • RESULT_CACHE_MAX_RESULT • RESULT_CACHE_REMOTE_EXPIRATION • USING THE RESULT CACHE • MANAGING & MONITORING THE RESULT CACHE • Using V$RESULT_CACHE_STATISTICS • V$RESULT_CACHE_MEMORY • V$RESULT_CACHE_OBJECTS • V$RESULT_CACHE_DEPENDENCY DYNAMIC SQL • ADVANTAGES & DISADVANTAGES OF DYNAMIC SQL • NATIVE DYNAMIC SQL • Dynamic UPDATE…RETURNING • PROGRAMMATIC DYNAMIC SQL USING DBMS_SQL()
USING COLLECTIONS • BULK BIND USING COLLECTIONS • About SQL%BULK_ROWCOUNT() • About SQL%BULK_EXCEPTIONS() • COLLECTION METHODS • MORE ABOUT THE RETURNING CLAUSE • RETURNING Clause With Multiple Rows • RETURNING With A Summary Function • ADVANCED COLLECTION FEATURES • IN INDICES OF Clause • IN VALUES OF Clause
SYSTEM-SUPPLIED PACKAGES: DBMS_METADATA() – PART I • WHY RETRIEVE OBJECT DEFINITIONS? • RETRIEVING DEFAULT METADATA • Using GET_DDL() • RETRIEVING CUSTOMIZED METADATA • Using OPEN() & CLOSE() • Using SET_FILTER() • Using SET_COUNT() • Using ADD_TRANSFORM() • Using FETCH DDL() • About SYS.KU$_DDL • About SYS.KU$_DDLS • Calling FETCH_DDL()
SYSTEM-SUPPLIED PACKAGES: DBMS_METADATA() – PART II • SET_TRANSFORM_PARAM() • GET_QUERY()
SYSTEM-SUPPLIED PACKAGES: DBMS_METADATA() – PART III • FETCH CLOB() • USING SET_FILTER() FOR DEPENDENT OBJECTS • SET_PARSE_ITEM() • RETRIEVING PRIMARY & DEPENDENT OBJECT DDL
SYSTEM-SUPPLIED PACKAGES: DBMS_REDEFINITION() • USING THE DBMS_REDEFINITION() PACKAGE • DBA_REDEFINITION_ERRORS • CAN_REDEF_TABLE() • START_REDEF_TABLE() • FINISH_REDEF_TABLE() • ABORT_REDEF_TABLE() • COPY_TABLE_DEPENDENTS() • SYNC_INTERIM_TABLE()
SYSTEM-SUPPLIED PACKAGES: • DBMS_LOB() • WORKING WITH EXTERNAL BFILES • WORKING WITH INTERNAL LOBS • SUBSTR() • INSTR() • DYNAMICALLY SETTING SECUREFILE OPTIONS
SYSTEM-SUPPLIED PACKAGES: OTHERS • LOB COMPRESSION WITH UTL_COMPRESS() • LZ_COMPRESS() • LZ_UNCOMPRESS() • DBMS_DESCRIBE() • UTL_MAIL()
ADVANCED INTERFACE METHODS • ABOUT EXTERNAL PROCEDURES • CALLING JAVA CLASSES • CALLING C PROGRAMS
PL/SQL ADVANCED PROGRAMMING & CODING TECHNIQUES • AUTONOMOUS TRANSACTIONS • USING NOCOPY FOR PARAMETERS • CHOOSING THE OPTIMUM DATA TYPE • About PLS_INTEGER • Using SIMPLE_INTEGER • CHAR Vs. VARCHAR2 • USEFUL PL/SQL CODING TECHNIQUES • HANDLING STRING LITERALS
INFLUENCING ORACLE PL/SQL COMPILATION • PL/SQL COMPILER OPTIMIZATION • PLSQL_OPTIMIZE_LEVEL • CONTROLLING COMPILATION MESSAGES • PL/SQL NATIVE EXECUTION
USING PL/SCOPE • CONFIGURING PL/SCOPE • PLSCOPE_SETTINGS • USING PL/SCOPE DATA • WORKSHOP SECTION • USING PL/SCOPE
APPLICATION TUNING WITH THE PL/SQL HIERARCHICAL PROFILER • WHAT IS THE HIERARCHICAL PROFILER? • CONFIGURING THE PROFILER • MANAGING PROFILER RUNS • ANALYZING PROFILER DATA • INTERPRETING THE RESULTS • DBMSHP_RUNS • DBMSHP_FUNCTION_INFO • DBMSHP_PARENT_CHILD_INFO
PL/SQL DEBUGGING WITH DBMS_TRACE() • USING THE TRACE FACILITY • USING DBMS_TRACE() TO MANAGE RUNS • EXAMINING THE TRACE DATA
PROTECTING AGAINST SQL INJECTION ATTACKS • UNDERSTANDING THE THREAT • APPLYING COUNTERMEASURES
IMPLEMENTING VIRTUAL PRIVATE DATABASES • UNDERSTANDING VPDS • PREPARING FOR A VPD • CONFIGURING A VPD • MANAGING APPLICATION CONTEXTS • MANAGING POLICIES & SECURITY RULES.